blob: 7a5d55aec24f51bc9c13b81225658128df928d82 [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; }
Mark Dickinsoncaa44c02009-12-31 21:20:06 +000012699if test "$have_long_long" = yes
12700then
12701if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012702 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012703
Martin v. Löwis11437992002-04-12 09:54:03 +000012704cat >>confdefs.h <<\_ACEOF
12705#define HAVE_LARGEFILE_SUPPORT 1
12706_ACEOF
12707
Martin v. Löwiseba40652007-08-30 20:10:57 +000012708 { echo "$as_me:$LINENO: result: yes" >&5
12709echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012710else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012711 { echo "$as_me:$LINENO: result: no" >&5
12712echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012713fi
Mark Dickinsoncaa44c02009-12-31 21:20:06 +000012714else
12715 { echo "$as_me:$LINENO: result: no" >&5
12716echo "${ECHO_T}no" >&6; }
12717fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012718
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012719# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012720{ echo "$as_me:$LINENO: checking size of time_t" >&5
12721echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012722if test "${ac_cv_sizeof_time_t+set}" = set; then
12723 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012724else
12725 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012726 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012727else
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012729/* confdefs.h. */
12730_ACEOF
12731cat confdefs.h >>conftest.$ac_ext
12732cat >>conftest.$ac_ext <<_ACEOF
12733/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012734#include <stdio.h>
12735#include <time.h>
12736main()
12737{
12738 FILE *f=fopen("conftestval", "w");
12739 if (!f) exit(1);
12740 fprintf(f, "%d\n", sizeof(time_t));
12741 exit(0);
12742}
Martin v. Löwis11437992002-04-12 09:54:03 +000012743_ACEOF
12744rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012745if { (ac_try="$ac_link"
12746case "(($ac_try" in
12747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12748 *) ac_try_echo=$ac_try;;
12749esac
12750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12751 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012752 ac_status=$?
12753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12754 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012755 { (case "(($ac_try" in
12756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12757 *) ac_try_echo=$ac_try;;
12758esac
12759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12760 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 ac_status=$?
12762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12763 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012764 ac_cv_sizeof_time_t=`cat conftestval`
12765else
Martin v. Löwis11437992002-04-12 09:54:03 +000012766 echo "$as_me: program exited with status $ac_status" >&5
12767echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012768sed 's/^/| /' conftest.$ac_ext >&5
12769
Martin v. Löwis11437992002-04-12 09:54:03 +000012770( exit $ac_status )
12771ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012773rm -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 +000012774fi
12775
Martin v. Löwiseba40652007-08-30 20:10:57 +000012776
12777
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012778fi
12779
Martin v. Löwiseba40652007-08-30 20:10:57 +000012780{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12781echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
12783cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012784#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012785_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012786
Michael W. Hudson54241132001-12-07 15:38:26 +000012787
12788
Trent Mick635f6fb2000-08-23 21:33:05 +000012789# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012790ac_save_cc="$CC"
12791if test "$ac_cv_kpthread" = "yes"
12792then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012793elif test "$ac_cv_kthread" = "yes"
12794then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012795elif test "$ac_cv_pthread" = "yes"
12796then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012798{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12799echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012800have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012801cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012802/* confdefs.h. */
12803_ACEOF
12804cat confdefs.h >>conftest.$ac_ext
12805cat >>conftest.$ac_ext <<_ACEOF
12806/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012807#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012808int
12809main ()
12810{
Guido van Rossum12580492000-09-24 16:47:19 +000012811pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 ;
12813 return 0;
12814}
12815_ACEOF
12816rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012817if { (ac_try="$ac_compile"
12818case "(($ac_try" in
12819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12820 *) ac_try_echo=$ac_try;;
12821esac
12822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012825 grep -v '^ *+' conftest.er1 >conftest.err
12826 rm -f conftest.er1
12827 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012829 (exit $ac_status); } && {
12830 test -z "$ac_c_werror_flag" ||
12831 test ! -s conftest.err
12832 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012833 have_pthread_t=yes
12834else
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012836sed 's/^/| /' conftest.$ac_ext >&5
12837
Martin v. Löwiseba40652007-08-30 20:10:57 +000012838
Trent Mick635f6fb2000-08-23 21:33:05 +000012839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012840
12841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12842{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12843echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012844if test "$have_pthread_t" = yes ; then
12845 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012846 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12847echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012848 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12849 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012850else
12851 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012852 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012853else
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012855/* confdefs.h. */
12856_ACEOF
12857cat confdefs.h >>conftest.$ac_ext
12858cat >>conftest.$ac_ext <<_ACEOF
12859/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012860#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012861#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012862 main()
12863 {
12864 FILE *f=fopen("conftestval", "w");
12865 if (!f) exit(1);
12866 fprintf(f, "%d\n", sizeof(pthread_t));
12867 exit(0);
12868 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012869_ACEOF
12870rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012871if { (ac_try="$ac_link"
12872case "(($ac_try" in
12873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12874 *) ac_try_echo=$ac_try;;
12875esac
12876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12877 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012878 ac_status=$?
12879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12880 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012881 { (case "(($ac_try" in
12882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12883 *) ac_try_echo=$ac_try;;
12884esac
12885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12886 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012887 ac_status=$?
12888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12889 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012890 ac_cv_sizeof_pthread_t=`cat conftestval`
12891else
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 echo "$as_me: program exited with status $ac_status" >&5
12893echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012894sed 's/^/| /' conftest.$ac_ext >&5
12895
Martin v. Löwis11437992002-04-12 09:54:03 +000012896( exit $ac_status )
12897ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012899rm -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 +000012900fi
12901
Martin v. Löwiseba40652007-08-30 20:10:57 +000012902
12903
Trent Mick635f6fb2000-08-23 21:33:05 +000012904fi
12905
Martin v. Löwiseba40652007-08-30 20:10:57 +000012906 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12907echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012908
12909cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012910#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012911_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012912
12913fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012914CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012915
Martin v. Löwiseba40652007-08-30 20:10:57 +000012916{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12917echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12918# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012919if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012920 enableval=$enable_toolbox_glue;
12921fi
Jack Jansene578a632001-08-15 01:27:14 +000012922
12923
12924if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012925then
Jack Jansene578a632001-08-15 01:27:14 +000012926 case $ac_sys_system/$ac_sys_release in
12927 Darwin/*)
12928 enable_toolbox_glue="yes";;
12929 *)
12930 enable_toolbox_glue="no";;
12931 esac
12932fi
12933case "$enable_toolbox_glue" in
12934yes)
Jack Jansene578a632001-08-15 01:27:14 +000012935 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012936 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012937
12938cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012939#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012940_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012941
12942 ;;
12943*)
Jack Jansene578a632001-08-15 01:27:14 +000012944 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012945 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012946 ;;
12947esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012948{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12949echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012950
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012951
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000012952
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012953case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012954 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012955 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12956 ;;
12957 Darwin/*)
12958 OTHER_LIBTOOL_OPT=""
12959 ;;
12960esac
12961
12962
Ronald Oussoren7ab74352009-09-08 07:10:07 +000012963ARCH_RUN_32BIT=""
12964
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012965case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012966 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012967 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12968 if test "${enable_universalsdk}"; then
12969 :
12970 else
Ronald Oussoren7ab74352009-09-08 07:10:07 +000012971 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000012972 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012973 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012974 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012975 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012976 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12977 if test ${gcc_version} '<' 4.0
12978 then
12979 LIBTOOL_CRUFT="-lcc_dynamic"
12980 else
12981 LIBTOOL_CRUFT=""
12982 fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000012983 if test "$cross_compiling" = yes; then
12984 ac_osx_32bit=yes
12985else
12986 cat >conftest.$ac_ext <<_ACEOF
12987/* confdefs.h. */
12988_ACEOF
12989cat confdefs.h >>conftest.$ac_ext
12990cat >>conftest.$ac_ext <<_ACEOF
12991/* end confdefs.h. */
12992
12993 #include <unistd.h>
12994 int main(int argc, char*argv[])
12995 {
12996 if (sizeof(long) == 4) {
12997 return 0;
12998 } else {
12999 return 1;
13000 }
13001 }
13002
13003_ACEOF
13004rm -f conftest$ac_exeext
13005if { (ac_try="$ac_link"
13006case "(($ac_try" in
13007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13008 *) ac_try_echo=$ac_try;;
13009esac
13010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13011 (eval "$ac_link") 2>&5
13012 ac_status=$?
13013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13014 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13015 { (case "(($ac_try" in
13016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13017 *) ac_try_echo=$ac_try;;
13018esac
13019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13020 (eval "$ac_try") 2>&5
13021 ac_status=$?
13022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13023 (exit $ac_status); }; }; then
13024 ac_osx_32bit=yes
13025else
13026 echo "$as_me: program exited with status $ac_status" >&5
13027echo "$as_me: failed program was:" >&5
13028sed 's/^/| /' conftest.$ac_ext >&5
13029
13030( exit $ac_status )
13031ac_osx_32bit=no
13032fi
13033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13034fi
13035
13036
13037
13038 if test "${ac_osx_32bit}" = "yes"; then
13039 case `arch` in
13040 i386)
13041 MACOSX_DEFAULT_ARCH="i386"
13042 ;;
13043 ppc)
13044 MACOSX_DEFAULT_ARCH="ppc"
13045 ;;
13046 *)
13047 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13048echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
13049 { (exit 1); exit 1; }; }
13050 ;;
13051 esac
13052 else
13053 case `arch` in
13054 i386)
13055 MACOSX_DEFAULT_ARCH="x86_64"
13056 ;;
13057 ppc)
13058 MACOSX_DEFAULT_ARCH="ppc64"
13059 ;;
13060 *)
13061 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13062echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
13063 { (exit 1); exit 1; }; }
13064 ;;
13065 esac
13066
13067 #ARCH_RUN_32BIT="true"
13068 fi
13069
13070 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013071 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013072 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013073esac
13074
Martin v. Löwiseba40652007-08-30 20:10:57 +000013075{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13076echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013077if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013078then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013079 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013081 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013082
Martin v. Löwis11437992002-04-12 09:54:03 +000013083cat >>confdefs.h <<\_ACEOF
13084#define WITH_NEXT_FRAMEWORK 1
13085_ACEOF
13086
Martin v. Löwiseba40652007-08-30 20:10:57 +000013087 { echo "$as_me:$LINENO: result: yes" >&5
13088echo "${ECHO_T}yes" >&6; }
Ronald Oussorene6e62672009-06-08 21:19:36 +000013089 if test $enable_shared = "yes"
13090 then
Ronald Oussorend0841712009-09-29 13:01:59 +000013091 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
13092echo "$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 +000013093 { (exit 1); exit 1; }; }
13094 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013095else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013096 { echo "$as_me:$LINENO: result: no" >&5
13097echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013098fi
13099
Martin v. Löwiseba40652007-08-30 20:10:57 +000013100{ echo "$as_me:$LINENO: checking for dyld" >&5
13101echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013102case $ac_sys_system/$ac_sys_release in
13103 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013104
Martin v. Löwis11437992002-04-12 09:54:03 +000013105cat >>confdefs.h <<\_ACEOF
13106#define WITH_DYLD 1
13107_ACEOF
13108
Martin v. Löwiseba40652007-08-30 20:10:57 +000013109 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13110echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013111 ;;
13112 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013113 { echo "$as_me:$LINENO: result: no" >&5
13114echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013115 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013116esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013117
Guido van Rossum0a516c91994-09-12 10:58:40 +000013118# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013119
Michael W. Hudson54241132001-12-07 15:38:26 +000013120
13121
13122
13123
Guido van Rossum0a516c91994-09-12 10:58:40 +000013124# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013125# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000013126{ echo "$as_me:$LINENO: checking SO" >&5
13127echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013128if test -z "$SO"
13129then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013130 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000013131 hp*|HP*)
13132 case `uname -m` in
13133 ia64) SO=.so;;
13134 *) SO=.sl;;
13135 esac
13136 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013137 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013138 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013139 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013140else
13141 # this might also be a termcap variable, see #610332
13142 echo
13143 echo '====================================================================='
13144 echo '+ +'
13145 echo '+ WARNING: You have set SO in your environment. +'
13146 echo '+ Do you really mean to change the extension for shared libraries? +'
13147 echo '+ Continuing in 10 seconds to let you to ponder. +'
13148 echo '+ +'
13149 echo '====================================================================='
13150 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013152{ echo "$as_me:$LINENO: result: $SO" >&5
13153echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013154
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013155
Neal Norwitz58e28882006-05-19 07:00:58 +000013156cat >>confdefs.h <<_ACEOF
13157#define SHLIB_EXT "$SO"
13158_ACEOF
13159
Guido van Rossum0a516c91994-09-12 10:58:40 +000013160# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013161# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013162# (Shared libraries in this instance are shared modules to be loaded into
13163# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013164{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13165echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013166if test -z "$LDSHARED"
13167then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013168 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013169 AIX*)
13170 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013171 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013172 ;;
13173 BeOS*)
13174 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013175 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013176 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013177 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013178 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013179 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013180 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013181 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013182 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013183 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013184 hp*|HP*)
13185 if test "$GCC" = "yes"
13186 then LDSHARED='$(CC) -shared'
13187 else LDSHARED='ld -b';
13188 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013189 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013190 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013191 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13192 if test "$enable_framework" ; then
13193 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013194 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13195 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013196 else
13197 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013198 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013199 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013200 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013201 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13202 if test "$enable_framework" ; then
13203 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013204 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13205 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013206 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013207 # No framework, use the Python app as bundle-loader
13208 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013209 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013210 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013211 Darwin/*)
13212 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13213 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013214
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013215 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013216 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013217 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013218 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013219 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013220 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13221 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013222 else
13223 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13224 if test "$enable_framework" ; then
13225 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013226 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13227 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013228 else
13229 # No framework, use the Python app as bundle-loader
13230 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13231 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13232 fi
13233 fi
13234 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013235 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013236 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013237 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013238 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013239 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013240 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013241 else
13242 LDSHARED="ld -Bshareable ${LDFLAGS}"
13243 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013244 OpenBSD*)
13245 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13246 then
13247 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13248 else
13249 case `uname -r` in
13250 [01].* | 2.[0-7] | 2.[0-7].*)
13251 LDSHARED="ld -Bshareable ${LDFLAGS}"
13252 ;;
13253 *)
13254 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13255 ;;
13256 esac
13257 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013258 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013259 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013260 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013261 then LDSHARED='$(CC) -shared'
13262 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013263 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013264 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013265 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013266 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013267 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013268 *) LDSHARED="ld";;
13269 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013271{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13272echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013273BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013274# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013275# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013276{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13277echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013278if test -z "$CCSHARED"
13279then
Guido van Rossum07397971997-04-29 21:49:50 +000013280 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013281 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013282 then CCSHARED="-fPIC";
13283 elif test `uname -p` = sparc;
13284 then CCSHARED="-xcode=pic32";
13285 else CCSHARED="-Kpic";
13286 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013287 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013288 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013289 else CCSHARED="+z";
13290 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013291 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013292 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013293 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013294 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013295 if test "$GCC" = "yes"
13296 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013297 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013298 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013299 SCO_SV*)
13300 if test "$GCC" = "yes"
13301 then CCSHARED="-fPIC"
13302 else CCSHARED="-Kpic -belf"
13303 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013304 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013305 IRIX*/6*) case $CC in
13306 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013307 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013308 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013309 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013310 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013312{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13313echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013314# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013315# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013316{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13317echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013318if test -z "$LINKFORSHARED"
13319then
Guido van Rossum07397971997-04-29 21:49:50 +000013320 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013321 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013322 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013323 LINKFORSHARED="-Wl,-E -Wl,+s";;
13324# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013325 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013326 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013327 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013328 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013329 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13330 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013331 # not used by the core itself but which needs to be in the core so
13332 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013333 # -prebind is no longer used, because it actually seems to give a
13334 # slowdown in stead of a speedup, maybe due to the large number of
13335 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013336
13337 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013338 if test "$enable_framework"
13339 then
Jack Jansenda49e192005-01-07 13:08:22 +000013340 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013341 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013342 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013343 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013344 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013345 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013346 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013347 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13348 then
13349 LINKFORSHARED="-Wl,--export-dynamic"
13350 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013351 SunOS/5*) case $CC in
13352 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013353 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013354 then
13355 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013356 fi;;
13357 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013358 CYGWIN*)
13359 if test $enable_shared = "no"
13360 then
13361 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13362 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013363 QNX*)
13364 # -Wl,-E causes the symbols to be added to the dynamic
13365 # symbol table so that they can be found when a module
13366 # is loaded. -N 2048K causes the stack size to be set
13367 # to 2048 kilobytes so that the stack doesn't overflow
13368 # when running test_compile.py.
13369 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013370 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013372{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13373echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013374
Michael W. Hudson54241132001-12-07 15:38:26 +000013375
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013376
Martin v. Löwiseba40652007-08-30 20:10:57 +000013377{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13378echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013379if test ! "$LIBRARY" = "$LDLIBRARY"
13380then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013381 case $ac_sys_system in
13382 CYGWIN*)
13383 # Cygwin needs CCSHARED when building extension DLLs
13384 # but not when building the interpreter DLL.
13385 CFLAGSFORSHARED='';;
13386 *)
13387 CFLAGSFORSHARED='$(CCSHARED)'
13388 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013390{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13391echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013392
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013393# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13394# library (with --enable-shared).
13395# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013396# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13397# if it is not required, since it creates a dependency of the shared library
13398# to LIBS. This, in turn, means that applications linking the shared libpython
13399# don't need to link LIBS explicitly. The default should be only changed
13400# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013401
Martin v. Löwiseba40652007-08-30 20:10:57 +000013402{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13403echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013404case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013405 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013406 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013407esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013408{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13409echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013410
13411
Guido van Rossum627b2d71993-12-24 10:39:16 +000013412# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013413
Martin v. Löwiseba40652007-08-30 20:10:57 +000013414{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13415echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013416if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13417 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418else
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013420LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013421cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013422/* confdefs.h. */
13423_ACEOF
13424cat confdefs.h >>conftest.$ac_ext
13425cat >>conftest.$ac_ext <<_ACEOF
13426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013427
Martin v. Löwiseba40652007-08-30 20:10:57 +000013428/* Override any GCC internal prototype to avoid an error.
13429 Use char because int might match the return type of a GCC
13430 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013431#ifdef __cplusplus
13432extern "C"
13433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013434char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013435int
13436main ()
13437{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013438return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013439 ;
13440 return 0;
13441}
13442_ACEOF
13443rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013444if { (ac_try="$ac_link"
13445case "(($ac_try" in
13446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13447 *) ac_try_echo=$ac_try;;
13448esac
13449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13450 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013452 grep -v '^ *+' conftest.er1 >conftest.err
13453 rm -f conftest.er1
13454 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013456 (exit $ac_status); } && {
13457 test -z "$ac_c_werror_flag" ||
13458 test ! -s conftest.err
13459 } && test -s conftest$ac_exeext &&
13460 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013461 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013462else
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013464sed 's/^/| /' conftest.$ac_ext >&5
13465
Martin v. Löwiseba40652007-08-30 20:10:57 +000013466 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013468
13469rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013471LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013473{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13474echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013475if test $ac_cv_lib_dl_dlopen = yes; then
13476 cat >>confdefs.h <<_ACEOF
13477#define HAVE_LIBDL 1
13478_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013479
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013480 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013481
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482fi
13483 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
Martin v. Löwiseba40652007-08-30 20:10:57 +000013485{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13486echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013487if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013489else
Martin v. Löwis11437992002-04-12 09:54:03 +000013490 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013491LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013492cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013493/* confdefs.h. */
13494_ACEOF
13495cat confdefs.h >>conftest.$ac_ext
13496cat >>conftest.$ac_ext <<_ACEOF
13497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013498
Martin v. Löwiseba40652007-08-30 20:10:57 +000013499/* Override any GCC internal prototype to avoid an error.
13500 Use char because int might match the return type of a GCC
13501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013502#ifdef __cplusplus
13503extern "C"
13504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013505char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013506int
13507main ()
13508{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013509return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 ;
13511 return 0;
13512}
13513_ACEOF
13514rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013515if { (ac_try="$ac_link"
13516case "(($ac_try" in
13517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13518 *) ac_try_echo=$ac_try;;
13519esac
13520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13521 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013523 grep -v '^ *+' conftest.er1 >conftest.err
13524 rm -f conftest.er1
13525 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013527 (exit $ac_status); } && {
13528 test -z "$ac_c_werror_flag" ||
13529 test ! -s conftest.err
13530 } && test -s conftest$ac_exeext &&
13531 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013532 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013533else
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013535sed 's/^/| /' conftest.$ac_ext >&5
13536
Martin v. Löwiseba40652007-08-30 20:10:57 +000013537 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013539
13540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013542LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013544{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13545echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013546if test $ac_cv_lib_dld_shl_load = yes; then
13547 cat >>confdefs.h <<_ACEOF
13548#define HAVE_LIBDLD 1
13549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013550
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013551 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013552
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013553fi
13554 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013555
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013556# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013557if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013558 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13559echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013560if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013562else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013563 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013565/* confdefs.h. */
13566_ACEOF
13567cat confdefs.h >>conftest.$ac_ext
13568cat >>conftest.$ac_ext <<_ACEOF
13569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013570
Martin v. Löwiseba40652007-08-30 20:10:57 +000013571/* Override any GCC internal prototype to avoid an error.
13572 Use char because int might match the return type of a GCC
13573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013574#ifdef __cplusplus
13575extern "C"
13576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013577char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013578int
13579main ()
13580{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013581return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 ;
13583 return 0;
13584}
13585_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013586for ac_lib in '' pthread rt posix4; do
13587 if test -z "$ac_lib"; then
13588 ac_res="none required"
13589 else
13590 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013591 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013592 fi
13593 rm -f conftest.$ac_objext conftest$ac_exeext
13594if { (ac_try="$ac_link"
13595case "(($ac_try" in
13596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13597 *) ac_try_echo=$ac_try;;
13598esac
13599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13600 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013601 ac_status=$?
13602 grep -v '^ *+' conftest.er1 >conftest.err
13603 rm -f conftest.er1
13604 cat conftest.err >&5
13605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013606 (exit $ac_status); } && {
13607 test -z "$ac_c_werror_flag" ||
13608 test ! -s conftest.err
13609 } && test -s conftest$ac_exeext &&
13610 $as_test_x conftest$ac_exeext; then
13611 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013612else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013613 echo "$as_me: failed program was:" >&5
13614sed 's/^/| /' conftest.$ac_ext >&5
13615
Martin v. Löwiseba40652007-08-30 20:10:57 +000013616
Brett Cannon19fab762007-06-02 03:02:29 +000013617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013618
13619rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13620 conftest$ac_exeext
13621 if test "${ac_cv_search_sem_init+set}" = set; then
13622 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013624done
13625if test "${ac_cv_search_sem_init+set}" = set; then
13626 :
13627else
13628 ac_cv_search_sem_init=no
13629fi
13630rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013631LIBS=$ac_func_search_save_LIBS
13632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013633{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13634echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13635ac_res=$ac_cv_search_sem_init
13636if test "$ac_res" != no; then
13637 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013638
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013639fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013640 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013641 # posix4 on Solaris 2.6
13642 # pthread (first!) on Linux
13643fi
13644
Martin v. Löwis19d17342003-06-14 21:03:05 +000013645# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013646{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13647echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013648if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13649 echo $ECHO_N "(cached) $ECHO_C" >&6
13650else
13651 ac_check_lib_save_LIBS=$LIBS
13652LIBS="-lintl $LIBS"
13653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013654/* confdefs.h. */
13655_ACEOF
13656cat confdefs.h >>conftest.$ac_ext
13657cat >>conftest.$ac_ext <<_ACEOF
13658/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013659
Martin v. Löwiseba40652007-08-30 20:10:57 +000013660/* Override any GCC internal prototype to avoid an error.
13661 Use char because int might match the return type of a GCC
13662 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013663#ifdef __cplusplus
13664extern "C"
13665#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013666char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013667int
13668main ()
13669{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013670return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013671 ;
13672 return 0;
13673}
13674_ACEOF
13675rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013676if { (ac_try="$ac_link"
13677case "(($ac_try" in
13678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13679 *) ac_try_echo=$ac_try;;
13680esac
13681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13682 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013683 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013684 grep -v '^ *+' conftest.er1 >conftest.err
13685 rm -f conftest.er1
13686 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013688 (exit $ac_status); } && {
13689 test -z "$ac_c_werror_flag" ||
13690 test ! -s conftest.err
13691 } && test -s conftest$ac_exeext &&
13692 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013693 ac_cv_lib_intl_textdomain=yes
13694else
13695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013696sed 's/^/| /' conftest.$ac_ext >&5
13697
Martin v. Löwiseba40652007-08-30 20:10:57 +000013698 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013700
13701rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013702 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013703LIBS=$ac_check_lib_save_LIBS
13704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013705{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13706echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013707if test $ac_cv_lib_intl_textdomain = yes; then
13708
13709cat >>confdefs.h <<\_ACEOF
13710#define WITH_LIBINTL 1
13711_ACEOF
13712
13713fi
13714
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013715
13716# checks for system dependent C++ extensions support
13717case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013718 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13719echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013721/* confdefs.h. */
13722_ACEOF
13723cat confdefs.h >>conftest.$ac_ext
13724cat >>conftest.$ac_ext <<_ACEOF
13725/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013726#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013727int
13728main ()
13729{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013730loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 ;
13732 return 0;
13733}
13734_ACEOF
13735rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013736if { (ac_try="$ac_link"
13737case "(($ac_try" in
13738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13739 *) ac_try_echo=$ac_try;;
13740esac
13741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13742 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013744 grep -v '^ *+' conftest.er1 >conftest.err
13745 rm -f conftest.er1
13746 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013748 (exit $ac_status); } && {
13749 test -z "$ac_c_werror_flag" ||
13750 test ! -s conftest.err
13751 } && test -s conftest$ac_exeext &&
13752 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013753
Martin v. Löwis11437992002-04-12 09:54:03 +000013754cat >>confdefs.h <<\_ACEOF
13755#define AIX_GENUINE_CPLUSPLUS 1
13756_ACEOF
13757
Martin v. Löwiseba40652007-08-30 20:10:57 +000013758 { echo "$as_me:$LINENO: result: yes" >&5
13759echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013760else
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013762sed 's/^/| /' conftest.$ac_ext >&5
13763
Martin v. Löwiseba40652007-08-30 20:10:57 +000013764 { echo "$as_me:$LINENO: result: no" >&5
13765echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013767
13768rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013769 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013770 *) ;;
13771esac
13772
Guido van Rossum70c7f481998-03-26 18:44:10 +000013773# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013774# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013775{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13776echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013777if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13778 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013779else
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013781LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013783/* confdefs.h. */
13784_ACEOF
13785cat confdefs.h >>conftest.$ac_ext
13786cat >>conftest.$ac_ext <<_ACEOF
13787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
Martin v. Löwiseba40652007-08-30 20:10:57 +000013789/* Override any GCC internal prototype to avoid an error.
13790 Use char because int might match the return type of a GCC
13791 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013792#ifdef __cplusplus
13793extern "C"
13794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013795char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013796int
13797main ()
13798{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013799return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 ;
13801 return 0;
13802}
13803_ACEOF
13804rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013805if { (ac_try="$ac_link"
13806case "(($ac_try" in
13807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13808 *) ac_try_echo=$ac_try;;
13809esac
13810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13811 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013813 grep -v '^ *+' conftest.er1 >conftest.err
13814 rm -f conftest.er1
13815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013817 (exit $ac_status); } && {
13818 test -z "$ac_c_werror_flag" ||
13819 test ! -s conftest.err
13820 } && test -s conftest$ac_exeext &&
13821 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013822 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013823else
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013825sed 's/^/| /' conftest.$ac_ext >&5
13826
Martin v. Löwiseba40652007-08-30 20:10:57 +000013827 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013829
13830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013832LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013834{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13835echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013836if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013837 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013838fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013839 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013840{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13841echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013842if test "${ac_cv_lib_socket_socket+set}" = set; then
13843 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013844else
Martin v. Löwis11437992002-04-12 09:54:03 +000013845 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013846LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013848/* confdefs.h. */
13849_ACEOF
13850cat confdefs.h >>conftest.$ac_ext
13851cat >>conftest.$ac_ext <<_ACEOF
13852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013853
Martin v. Löwiseba40652007-08-30 20:10:57 +000013854/* Override any GCC internal prototype to avoid an error.
13855 Use char because int might match the return type of a GCC
13856 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013857#ifdef __cplusplus
13858extern "C"
13859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013860char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013861int
13862main ()
13863{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013864return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013865 ;
13866 return 0;
13867}
13868_ACEOF
13869rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013870if { (ac_try="$ac_link"
13871case "(($ac_try" in
13872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13873 *) ac_try_echo=$ac_try;;
13874esac
13875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13876 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013878 grep -v '^ *+' conftest.er1 >conftest.err
13879 rm -f conftest.er1
13880 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013882 (exit $ac_status); } && {
13883 test -z "$ac_c_werror_flag" ||
13884 test ! -s conftest.err
13885 } && test -s conftest$ac_exeext &&
13886 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013887 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013888else
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013890sed 's/^/| /' conftest.$ac_ext >&5
13891
Martin v. Löwiseba40652007-08-30 20:10:57 +000013892 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013894
13895rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013896 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013897LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13900echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013901if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013902 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013903fi
13904 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013905
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013906case "$ac_sys_system" in
13907BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013908{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13909echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013910if test "${ac_cv_lib_net_socket+set}" = set; then
13911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013912else
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013914LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013915cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013916/* confdefs.h. */
13917_ACEOF
13918cat confdefs.h >>conftest.$ac_ext
13919cat >>conftest.$ac_ext <<_ACEOF
13920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013921
Martin v. Löwiseba40652007-08-30 20:10:57 +000013922/* Override any GCC internal prototype to avoid an error.
13923 Use char because int might match the return type of a GCC
13924 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013925#ifdef __cplusplus
13926extern "C"
13927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013928char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013929int
13930main ()
13931{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013932return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 ;
13934 return 0;
13935}
13936_ACEOF
13937rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013938if { (ac_try="$ac_link"
13939case "(($ac_try" in
13940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13941 *) ac_try_echo=$ac_try;;
13942esac
13943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13944 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013946 grep -v '^ *+' conftest.er1 >conftest.err
13947 rm -f conftest.er1
13948 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013950 (exit $ac_status); } && {
13951 test -z "$ac_c_werror_flag" ||
13952 test ! -s conftest.err
13953 } && test -s conftest$ac_exeext &&
13954 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013955 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013956else
Martin v. Löwis11437992002-04-12 09:54:03 +000013957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013958sed 's/^/| /' conftest.$ac_ext >&5
13959
Martin v. Löwiseba40652007-08-30 20:10:57 +000013960 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013962
13963rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013965LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013967{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13968echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013969if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013970 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013971fi
13972 # BeOS
13973;;
13974esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013975
Martin v. Löwiseba40652007-08-30 20:10:57 +000013976{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13977echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013978
Martin v. Löwiseba40652007-08-30 20:10:57 +000013979# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013980if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013981 withval=$with_libs;
13982{ echo "$as_me:$LINENO: result: $withval" >&5
13983echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013984LIBS="$withval $LIBS"
13985
13986else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013987 { echo "$as_me:$LINENO: result: no" >&5
13988echo "${ECHO_T}no" >&6; }
13989fi
13990
Guido van Rossum7f43da71994-08-01 12:15:30 +000013991
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013992# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013993{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13994echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013995
Martin v. Löwiseba40652007-08-30 20:10:57 +000013996# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013997if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013998 withval=$with_system_ffi;
13999fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014000
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014001
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14003echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014004
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014005# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014006
14007
Martin v. Löwiseba40652007-08-30 20:10:57 +000014008{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14009echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014010
Martin v. Löwiseba40652007-08-30 20:10:57 +000014011# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014012if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014013 withval=$with_signal_module;
14014fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014015
14016
14017if test -z "$with_signal_module"
14018then with_signal_module="yes"
14019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014020{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14021echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014022
14023if test "${with_signal_module}" = "yes"; then
14024 USE_SIGNAL_MODULE=""
14025 SIGNAL_OBJS=""
14026else
14027 USE_SIGNAL_MODULE="#"
14028 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14029fi
14030
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014031# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014032
Barry Warsawc0d24d82000-06-29 16:12:00 +000014033USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014034
Martin v. Löwiseba40652007-08-30 20:10:57 +000014035{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14036echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014037
Guido van Rossumec2f0731997-01-22 20:54:01 +000014038
Martin v. Löwiseba40652007-08-30 20:10:57 +000014039# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014040if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014041 withval=$with_dec_threads;
14042{ echo "$as_me:$LINENO: result: $withval" >&5
14043echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014044LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014045if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014046 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014047fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014048else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014049 { echo "$as_me:$LINENO: result: no" >&5
14050echo "${ECHO_T}no" >&6; }
14051fi
14052
Martin v. Löwis11437992002-04-12 09:54:03 +000014053
14054# Templates for things AC_DEFINEd more than once.
14055# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014056
14057
Martin v. Löwis11437992002-04-12 09:54:03 +000014058
14059
14060
14061
14062
Martin v. Löwiseba40652007-08-30 20:10:57 +000014063{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14064echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014065
Martin v. Löwiseba40652007-08-30 20:10:57 +000014066# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014067if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014068 withval=$with_threads;
14069fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014070
14071
Barry Warsawc0d24d82000-06-29 16:12:00 +000014072# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014073
Martin v. Löwiseba40652007-08-30 20:10:57 +000014074# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014075if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014076 withval=$with_thread; with_threads=$with_thread
14077fi
14078
Barry Warsawc0d24d82000-06-29 16:12:00 +000014079
14080if test -z "$with_threads"
14081then with_threads="yes"
14082fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014083{ echo "$as_me:$LINENO: result: $with_threads" >&5
14084echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000014085
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014086
Barry Warsawc0d24d82000-06-29 16:12:00 +000014087if test "$with_threads" = "no"
14088then
14089 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014090elif test "$ac_cv_pthread_is_default" = yes
14091then
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 WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014094_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014095
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014096 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014098#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014099_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014100
14101 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014102 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014103elif test "$ac_cv_kpthread" = "yes"
14104then
14105 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014106 if test "$ac_cv_cxx_thread" = "yes"; then
14107 CXX="$CXX -Kpthread"
14108 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014110#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014111_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014112
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014113 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014114 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014115elif test "$ac_cv_kthread" = "yes"
14116then
14117 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014118 if test "$ac_cv_cxx_thread" = "yes"; then
14119 CXX="$CXX -Kthread"
14120 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014121 cat >>confdefs.h <<\_ACEOF
14122#define WITH_THREAD 1
14123_ACEOF
14124
14125 posix_threads=yes
14126 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014127elif test "$ac_cv_pthread" = "yes"
14128then
14129 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014130 if test "$ac_cv_cxx_thread" = "yes"; then
14131 CXX="$CXX -pthread"
14132 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014133 cat >>confdefs.h <<\_ACEOF
14134#define WITH_THREAD 1
14135_ACEOF
14136
14137 posix_threads=yes
14138 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014139else
14140 if test ! -z "$with_threads" -a -d "$with_threads"
14141 then LDFLAGS="$LDFLAGS -L$with_threads"
14142 fi
14143 if test ! -z "$withval" -a -d "$withval"
14144 then LDFLAGS="$LDFLAGS -L$withval"
14145 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014146
14147 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014148 # define _POSIX_THREADS in unistd.h. Some apparently don't
14149 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014150 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14151echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014153/* confdefs.h. */
14154_ACEOF
14155cat confdefs.h >>conftest.$ac_ext
14156cat >>conftest.$ac_ext <<_ACEOF
14157/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014158
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014159#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014160#ifdef _POSIX_THREADS
14161yes
14162#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014163
14164_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014166 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014167 unistd_defines_pthreads=yes
14168else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014169 unistd_defines_pthreads=no
14170fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000014171rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014172
Martin v. Löwiseba40652007-08-30 20:10:57 +000014173 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14174echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014175
Martin v. Löwis11437992002-04-12 09:54:03 +000014176 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014177#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014178_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014179
Martin v. Löwis11437992002-04-12 09:54:03 +000014180 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014181 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14182echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014183if test "${ac_cv_header_cthreads_h+set}" = set; then
14184 echo $ECHO_N "(cached) $ECHO_C" >&6
14185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014186{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14187echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014188else
Martin v. Löwis11437992002-04-12 09:54:03 +000014189 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014190{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14191echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014192cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014193/* confdefs.h. */
14194_ACEOF
14195cat confdefs.h >>conftest.$ac_ext
14196cat >>conftest.$ac_ext <<_ACEOF
14197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014198$ac_includes_default
14199#include <cthreads.h>
14200_ACEOF
14201rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014202if { (ac_try="$ac_compile"
14203case "(($ac_try" in
14204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14205 *) ac_try_echo=$ac_try;;
14206esac
14207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014210 grep -v '^ *+' conftest.er1 >conftest.err
14211 rm -f conftest.er1
14212 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014214 (exit $ac_status); } && {
14215 test -z "$ac_c_werror_flag" ||
14216 test ! -s conftest.err
14217 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014218 ac_header_compiler=yes
14219else
14220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014221sed 's/^/| /' conftest.$ac_ext >&5
14222
Martin v. Löwiseba40652007-08-30 20:10:57 +000014223 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014225
14226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14227{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14228echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014229
14230# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014231{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14232echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014233cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014234/* confdefs.h. */
14235_ACEOF
14236cat confdefs.h >>conftest.$ac_ext
14237cat >>conftest.$ac_ext <<_ACEOF
14238/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014239#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014240_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014241if { (ac_try="$ac_cpp conftest.$ac_ext"
14242case "(($ac_try" in
14243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14244 *) ac_try_echo=$ac_try;;
14245esac
14246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14247 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014249 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 rm -f conftest.er1
14251 cat conftest.err >&5
14252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014253 (exit $ac_status); } >/dev/null && {
14254 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14255 test ! -s conftest.err
14256 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014257 ac_header_preproc=yes
14258else
14259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014260sed 's/^/| /' conftest.$ac_ext >&5
14261
Martin v. Löwis11437992002-04-12 09:54:03 +000014262 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014264
Martin v. Löwis11437992002-04-12 09:54:03 +000014265rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014266{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14267echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014268
14269# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014270case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14271 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014272 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14273echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014274 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14275echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14276 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014277 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014278 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014279 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14280echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014281 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14282echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14283 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14284echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14285 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14286echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014287 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14288echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014289 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14290echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014291 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014292## ------------------------------------------------ ##
14293## Report this to http://www.python.org/python-bugs ##
14294## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014295_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014296 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014297 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014298esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014299{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14300echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014301if test "${ac_cv_header_cthreads_h+set}" = set; then
14302 echo $ECHO_N "(cached) $ECHO_C" >&6
14303else
14304 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014306{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14307echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
14309fi
14310if test $ac_cv_header_cthreads_h = yes; then
14311 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014312#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014313_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014314
Martin v. Löwis11437992002-04-12 09:54:03 +000014315 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014316#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014317_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014318
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
14320cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014321#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014322_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014323
14324 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014325 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014326else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014327
Martin v. Löwis11437992002-04-12 09:54:03 +000014328 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14330echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014331if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14332 echo $ECHO_N "(cached) $ECHO_C" >&6
14333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014334{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14335echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014336else
Martin v. Löwis11437992002-04-12 09:54:03 +000014337 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014338{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14339echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014340cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014341/* confdefs.h. */
14342_ACEOF
14343cat confdefs.h >>conftest.$ac_ext
14344cat >>conftest.$ac_ext <<_ACEOF
14345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014346$ac_includes_default
14347#include <mach/cthreads.h>
14348_ACEOF
14349rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014350if { (ac_try="$ac_compile"
14351case "(($ac_try" in
14352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14353 *) ac_try_echo=$ac_try;;
14354esac
14355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014358 grep -v '^ *+' conftest.er1 >conftest.err
14359 rm -f conftest.er1
14360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014362 (exit $ac_status); } && {
14363 test -z "$ac_c_werror_flag" ||
14364 test ! -s conftest.err
14365 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014366 ac_header_compiler=yes
14367else
14368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014369sed 's/^/| /' conftest.$ac_ext >&5
14370
Martin v. Löwiseba40652007-08-30 20:10:57 +000014371 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014373
14374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14375{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14376echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
14378# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014379{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14380echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014381cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014382/* confdefs.h. */
14383_ACEOF
14384cat confdefs.h >>conftest.$ac_ext
14385cat >>conftest.$ac_ext <<_ACEOF
14386/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014387#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014388_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014389if { (ac_try="$ac_cpp conftest.$ac_ext"
14390case "(($ac_try" in
14391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14392 *) ac_try_echo=$ac_try;;
14393esac
14394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14395 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014397 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 rm -f conftest.er1
14399 cat conftest.err >&5
14400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014401 (exit $ac_status); } >/dev/null && {
14402 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14403 test ! -s conftest.err
14404 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 ac_header_preproc=yes
14406else
14407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014408sed 's/^/| /' conftest.$ac_ext >&5
14409
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014412
Martin v. Löwis11437992002-04-12 09:54:03 +000014413rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014414{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14415echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014416
14417# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014418case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14419 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14421echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014422 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14423echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14424 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014425 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014426 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014427 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14428echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014429 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14430echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14431 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14432echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14433 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14434echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014435 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14436echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014437 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14438echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014439 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014440## ------------------------------------------------ ##
14441## Report this to http://www.python.org/python-bugs ##
14442## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014443_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014444 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014445 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014446esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014447{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14448echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014449if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14450 echo $ECHO_N "(cached) $ECHO_C" >&6
14451else
14452 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014454{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14455echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014456
14457fi
14458if test $ac_cv_header_mach_cthreads_h = yes; then
14459 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014460#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014461_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014462
Martin v. Löwis11437992002-04-12 09:54:03 +000014463 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014464#define 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öwis11437992002-04-12 09:54:03 +000014467
14468cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014469#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014470_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014471
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014472 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014473else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014474
Martin v. Löwiseba40652007-08-30 20:10:57 +000014475 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14476echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014477
Martin v. Löwiseba40652007-08-30 20:10:57 +000014478# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014479if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014480 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14481echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014482 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014483#define WITH_THREAD 1
14484_ACEOF
14485
14486
14487cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014488#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014489_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014490
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014491 LIBS="-lpth $LIBS"
14492 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014493else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494 { echo "$as_me:$LINENO: result: no" >&5
14495echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014496
14497 # Just looking for pthread_create in libpthread is not enough:
14498 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14499 # So we really have to include pthread.h, and then link.
14500 _libs=$LIBS
14501 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014502 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14503echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014505/* confdefs.h. */
14506_ACEOF
14507cat confdefs.h >>conftest.$ac_ext
14508cat >>conftest.$ac_ext <<_ACEOF
14509/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014510#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014511
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014512void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014513int
14514main ()
14515{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014516
14517pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014518 ;
14519 return 0;
14520}
14521_ACEOF
14522rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014523if { (ac_try="$ac_link"
14524case "(($ac_try" in
14525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14526 *) ac_try_echo=$ac_try;;
14527esac
14528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14529 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014531 grep -v '^ *+' conftest.er1 >conftest.err
14532 rm -f conftest.er1
14533 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014535 (exit $ac_status); } && {
14536 test -z "$ac_c_werror_flag" ||
14537 test ! -s conftest.err
14538 } && test -s conftest$ac_exeext &&
14539 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014540
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541 { echo "$as_me:$LINENO: result: yes" >&5
14542echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014543 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014544#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014545_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014546
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014547 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014548 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014549else
Martin v. Löwis11437992002-04-12 09:54:03 +000014550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014551sed 's/^/| /' conftest.$ac_ext >&5
14552
Martin v. Löwis11437992002-04-12 09:54:03 +000014553
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014554 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014555 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14556echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014557if test "${ac_cv_func_pthread_detach+set}" = set; then
14558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014559else
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014561/* confdefs.h. */
14562_ACEOF
14563cat confdefs.h >>conftest.$ac_ext
14564cat >>conftest.$ac_ext <<_ACEOF
14565/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014566/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14567 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14568#define pthread_detach innocuous_pthread_detach
14569
Guido van Rossumad678af1998-10-02 14:42:15 +000014570/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014571 which can conflict with char pthread_detach (); below.
14572 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014573 <limits.h> exists even on freestanding compilers. */
14574
14575#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014576# include <limits.h>
14577#else
14578# include <assert.h>
14579#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014580
14581#undef pthread_detach
14582
Martin v. Löwiseba40652007-08-30 20:10:57 +000014583/* Override any GCC internal prototype to avoid an error.
14584 Use char because int might match the return type of a GCC
14585 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014586#ifdef __cplusplus
14587extern "C"
14588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014589char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014590/* The GNU C library defines this for functions which it implements
14591 to always fail with ENOSYS. Some functions are actually named
14592 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014593#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014594choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014595#endif
14596
Skip Montanaro6dead952003-09-25 14:50:04 +000014597int
14598main ()
14599{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014600return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014601 ;
14602 return 0;
14603}
14604_ACEOF
14605rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014606if { (ac_try="$ac_link"
14607case "(($ac_try" in
14608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14609 *) ac_try_echo=$ac_try;;
14610esac
14611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14612 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014614 grep -v '^ *+' conftest.er1 >conftest.err
14615 rm -f conftest.er1
14616 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014618 (exit $ac_status); } && {
14619 test -z "$ac_c_werror_flag" ||
14620 test ! -s conftest.err
14621 } && test -s conftest$ac_exeext &&
14622 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014623 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014624else
Martin v. Löwis11437992002-04-12 09:54:03 +000014625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014626sed 's/^/| /' conftest.$ac_ext >&5
14627
Martin v. Löwiseba40652007-08-30 20:10:57 +000014628 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630
14631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014632 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014634{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14635echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014636if test $ac_cv_func_pthread_detach = yes; then
14637 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014638#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014639_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014640
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014641 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014642 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014643else
Guido van Rossumad678af1998-10-02 14:42:15 +000014644
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014645 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014646 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14647echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014648if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14649 echo $ECHO_N "(cached) $ECHO_C" >&6
14650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014651{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14652echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014653else
14654 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014655{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14656echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014658/* confdefs.h. */
14659_ACEOF
14660cat confdefs.h >>conftest.$ac_ext
14661cat >>conftest.$ac_ext <<_ACEOF
14662/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014663$ac_includes_default
14664#include <atheos/threads.h>
14665_ACEOF
14666rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014667if { (ac_try="$ac_compile"
14668case "(($ac_try" in
14669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14670 *) ac_try_echo=$ac_try;;
14671esac
14672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014675 grep -v '^ *+' conftest.er1 >conftest.err
14676 rm -f conftest.er1
14677 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014679 (exit $ac_status); } && {
14680 test -z "$ac_c_werror_flag" ||
14681 test ! -s conftest.err
14682 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014683 ac_header_compiler=yes
14684else
14685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014686sed 's/^/| /' conftest.$ac_ext >&5
14687
Martin v. Löwiseba40652007-08-30 20:10:57 +000014688 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014690
14691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14692{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14693echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014694
14695# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014696{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14697echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014699/* confdefs.h. */
14700_ACEOF
14701cat confdefs.h >>conftest.$ac_ext
14702cat >>conftest.$ac_ext <<_ACEOF
14703/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014704#include <atheos/threads.h>
14705_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014706if { (ac_try="$ac_cpp conftest.$ac_ext"
14707case "(($ac_try" in
14708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14709 *) ac_try_echo=$ac_try;;
14710esac
14711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14712 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014713 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014714 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014715 rm -f conftest.er1
14716 cat conftest.err >&5
14717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014718 (exit $ac_status); } >/dev/null && {
14719 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14720 test ! -s conftest.err
14721 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014722 ac_header_preproc=yes
14723else
14724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014725sed 's/^/| /' conftest.$ac_ext >&5
14726
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014727 ac_header_preproc=no
14728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014729
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014730rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014731{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14732echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014733
14734# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014735case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14736 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014737 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14738echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014739 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14740echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14741 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014742 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014743 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014744 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14745echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014746 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14747echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14748 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14749echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14750 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14751echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014752 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14753echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014754 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14755echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014756 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014757## ------------------------------------------------ ##
14758## Report this to http://www.python.org/python-bugs ##
14759## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014760_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014761 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014762 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014763esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014764{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14765echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014766if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14767 echo $ECHO_N "(cached) $ECHO_C" >&6
14768else
14769 ac_cv_header_atheos_threads_h=$ac_header_preproc
14770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014771{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14772echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014773
14774fi
14775if test $ac_cv_header_atheos_threads_h = yes; then
14776 cat >>confdefs.h <<\_ACEOF
14777#define WITH_THREAD 1
14778_ACEOF
14779
14780
14781cat >>confdefs.h <<\_ACEOF
14782#define ATHEOS_THREADS 1
14783_ACEOF
14784
14785 THREADOBJ="Python/thread.o"
14786else
14787
Martin v. Löwis11437992002-04-12 09:54:03 +000014788 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014789 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14790echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014791if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14792 echo $ECHO_N "(cached) $ECHO_C" >&6
14793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014794{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14795echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014796else
Martin v. Löwis11437992002-04-12 09:54:03 +000014797 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014798{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14799echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014801/* confdefs.h. */
14802_ACEOF
14803cat confdefs.h >>conftest.$ac_ext
14804cat >>conftest.$ac_ext <<_ACEOF
14805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014806$ac_includes_default
14807#include <kernel/OS.h>
14808_ACEOF
14809rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014810if { (ac_try="$ac_compile"
14811case "(($ac_try" in
14812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14813 *) ac_try_echo=$ac_try;;
14814esac
14815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014818 grep -v '^ *+' conftest.er1 >conftest.err
14819 rm -f conftest.er1
14820 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014822 (exit $ac_status); } && {
14823 test -z "$ac_c_werror_flag" ||
14824 test ! -s conftest.err
14825 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014826 ac_header_compiler=yes
14827else
14828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014829sed 's/^/| /' conftest.$ac_ext >&5
14830
Martin v. Löwiseba40652007-08-30 20:10:57 +000014831 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014833
14834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14835{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14836echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014837
14838# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014839{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14840echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014841cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014842/* confdefs.h. */
14843_ACEOF
14844cat confdefs.h >>conftest.$ac_ext
14845cat >>conftest.$ac_ext <<_ACEOF
14846/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014847#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014848_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014849if { (ac_try="$ac_cpp conftest.$ac_ext"
14850case "(($ac_try" in
14851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14852 *) ac_try_echo=$ac_try;;
14853esac
14854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14855 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014857 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014858 rm -f conftest.er1
14859 cat conftest.err >&5
14860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014861 (exit $ac_status); } >/dev/null && {
14862 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14863 test ! -s conftest.err
14864 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 ac_header_preproc=yes
14866else
14867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014868sed 's/^/| /' conftest.$ac_ext >&5
14869
Martin v. Löwis11437992002-04-12 09:54:03 +000014870 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014872
Martin v. Löwis11437992002-04-12 09:54:03 +000014873rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014874{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14875echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014876
Martin v. Löwis11437992002-04-12 09:54:03 +000014877# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014878case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14879 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14881echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014882 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14883echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14884 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014885 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014886 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014887 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14888echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014889 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14890echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14891 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14892echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14893 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14894echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014895 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14896echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014897 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14898echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014899 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014900## ------------------------------------------------ ##
14901## Report this to http://www.python.org/python-bugs ##
14902## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014903_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014904 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014905 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014906esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014907{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14908echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014909if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14910 echo $ECHO_N "(cached) $ECHO_C" >&6
14911else
14912 ac_cv_header_kernel_OS_h=$ac_header_preproc
14913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014914{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14915echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014916
14917fi
14918if test $ac_cv_header_kernel_OS_h = yes; then
14919 cat >>confdefs.h <<\_ACEOF
14920#define WITH_THREAD 1
14921_ACEOF
14922
14923
14924cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014925#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014926_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014927
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014928 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014929else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014930
Martin v. Löwiseba40652007-08-30 20:10:57 +000014931 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14932echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014933if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014935else
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014937LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014938cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014939/* confdefs.h. */
14940_ACEOF
14941cat confdefs.h >>conftest.$ac_ext
14942cat >>conftest.$ac_ext <<_ACEOF
14943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014944
Martin v. Löwiseba40652007-08-30 20:10:57 +000014945/* Override any GCC internal prototype to avoid an error.
14946 Use char because int might match the return type of a GCC
14947 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014948#ifdef __cplusplus
14949extern "C"
14950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014951char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014952int
14953main ()
14954{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014955return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 ;
14957 return 0;
14958}
14959_ACEOF
14960rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014961if { (ac_try="$ac_link"
14962case "(($ac_try" in
14963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14964 *) ac_try_echo=$ac_try;;
14965esac
14966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14967 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014969 grep -v '^ *+' conftest.er1 >conftest.err
14970 rm -f conftest.er1
14971 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014973 (exit $ac_status); } && {
14974 test -z "$ac_c_werror_flag" ||
14975 test ! -s conftest.err
14976 } && test -s conftest$ac_exeext &&
14977 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014979else
Martin v. Löwis11437992002-04-12 09:54:03 +000014980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014981sed 's/^/| /' conftest.$ac_ext >&5
14982
Martin v. Löwiseba40652007-08-30 20:10:57 +000014983 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014985
14986rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014987 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014988LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014990{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14991echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014992if test $ac_cv_lib_pthreads_pthread_create = yes; then
14993 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014994#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014995_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014996
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014997 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014998 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014999 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015000else
Greg Steinadf63d62000-07-05 10:38:09 +000015001
Martin v. Löwiseba40652007-08-30 20:10:57 +000015002 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15003echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015004if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
15005 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015006else
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015008LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015009cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015010/* confdefs.h. */
15011_ACEOF
15012cat confdefs.h >>conftest.$ac_ext
15013cat >>conftest.$ac_ext <<_ACEOF
15014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015015
Martin v. Löwiseba40652007-08-30 20:10:57 +000015016/* Override any GCC internal prototype to avoid an error.
15017 Use char because int might match the return type of a GCC
15018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015019#ifdef __cplusplus
15020extern "C"
15021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015022char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015023int
15024main ()
15025{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015026return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 ;
15028 return 0;
15029}
15030_ACEOF
15031rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015032if { (ac_try="$ac_link"
15033case "(($ac_try" in
15034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15035 *) ac_try_echo=$ac_try;;
15036esac
15037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15038 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015040 grep -v '^ *+' conftest.er1 >conftest.err
15041 rm -f conftest.er1
15042 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015044 (exit $ac_status); } && {
15045 test -z "$ac_c_werror_flag" ||
15046 test ! -s conftest.err
15047 } && test -s conftest$ac_exeext &&
15048 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015050else
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015052sed 's/^/| /' conftest.$ac_ext >&5
15053
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015056
15057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015059LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15062echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015063if test $ac_cv_lib_c_r_pthread_create = yes; then
15064 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015065#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015066_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015067
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015068 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015069 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015070 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015071else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015072
Martin v. Löwiseba40652007-08-30 20:10:57 +000015073 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15074echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015075if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015077else
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015079LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015081/* confdefs.h. */
15082_ACEOF
15083cat confdefs.h >>conftest.$ac_ext
15084cat >>conftest.$ac_ext <<_ACEOF
15085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015086
Martin v. Löwiseba40652007-08-30 20:10:57 +000015087/* Override any GCC internal prototype to avoid an error.
15088 Use char because int might match the return type of a GCC
15089 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015090#ifdef __cplusplus
15091extern "C"
15092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015093char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015094int
15095main ()
15096{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015097return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015098 ;
15099 return 0;
15100}
15101_ACEOF
15102rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015103if { (ac_try="$ac_link"
15104case "(($ac_try" in
15105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15106 *) ac_try_echo=$ac_try;;
15107esac
15108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15109 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015111 grep -v '^ *+' conftest.er1 >conftest.err
15112 rm -f conftest.er1
15113 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015115 (exit $ac_status); } && {
15116 test -z "$ac_c_werror_flag" ||
15117 test ! -s conftest.err
15118 } && test -s conftest$ac_exeext &&
15119 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015120 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015121else
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015123sed 's/^/| /' conftest.$ac_ext >&5
15124
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015127
15128rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015130LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015132{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15133echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015134if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15135 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015136#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015137_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015138
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015139 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015140 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015141 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015142else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015143
Martin v. Löwiseba40652007-08-30 20:10:57 +000015144 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15145echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015146if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15147 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015148else
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015150LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015151cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015152/* confdefs.h. */
15153_ACEOF
15154cat confdefs.h >>conftest.$ac_ext
15155cat >>conftest.$ac_ext <<_ACEOF
15156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015157
Martin v. Löwiseba40652007-08-30 20:10:57 +000015158/* Override any GCC internal prototype to avoid an error.
15159 Use char because int might match the return type of a GCC
15160 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015161#ifdef __cplusplus
15162extern "C"
15163#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015164char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015165int
15166main ()
15167{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015168return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 ;
15170 return 0;
15171}
15172_ACEOF
15173rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015174if { (ac_try="$ac_link"
15175case "(($ac_try" in
15176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15177 *) ac_try_echo=$ac_try;;
15178esac
15179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15180 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015182 grep -v '^ *+' conftest.er1 >conftest.err
15183 rm -f conftest.er1
15184 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015186 (exit $ac_status); } && {
15187 test -z "$ac_c_werror_flag" ||
15188 test ! -s conftest.err
15189 } && test -s conftest$ac_exeext &&
15190 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015191 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015192else
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015194sed 's/^/| /' conftest.$ac_ext >&5
15195
Martin v. Löwiseba40652007-08-30 20:10:57 +000015196 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198
15199rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015201LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015203{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15204echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015205if test $ac_cv_lib_cma_pthread_create = yes; then
15206 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015207#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015208_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015209
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015210 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015211 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015212 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015213else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015214
Martin v. Löwis130fb172001-07-19 11:00:41 +000015215 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015216fi
15217
Guido van Rossum627b2d71993-12-24 10:39:16 +000015218
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015219fi
15220
Guido van Rossum0be3e491997-05-22 20:33:33 +000015221fi
15222
Guido van Rossum49545951997-12-02 19:28:29 +000015223fi
15224
Guido van Rossumb93a8621998-05-07 13:27:32 +000015225fi
15226
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015227
Michael W. Hudson54241132001-12-07 15:38:26 +000015228fi
15229
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015230
15231fi
15232
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015234
15235rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237fi
15238
Martin v. Löwis11437992002-04-12 09:54:03 +000015239fi
15240
15241
15242fi
15243
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015244
Michael W. Hudson54241132001-12-07 15:38:26 +000015245
Martin v. Löwiseba40652007-08-30 20:10:57 +000015246 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15247echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015248if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15249 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015250else
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015252LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015253cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015254/* confdefs.h. */
15255_ACEOF
15256cat confdefs.h >>conftest.$ac_ext
15257cat >>conftest.$ac_ext <<_ACEOF
15258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015259
Martin v. Löwiseba40652007-08-30 20:10:57 +000015260/* Override any GCC internal prototype to avoid an error.
15261 Use char because int might match the return type of a GCC
15262 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015263#ifdef __cplusplus
15264extern "C"
15265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015266char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015267int
15268main ()
15269{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015270return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015271 ;
15272 return 0;
15273}
15274_ACEOF
15275rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015276if { (ac_try="$ac_link"
15277case "(($ac_try" in
15278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15279 *) ac_try_echo=$ac_try;;
15280esac
15281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15282 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015283 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015284 grep -v '^ *+' conftest.er1 >conftest.err
15285 rm -f conftest.er1
15286 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015288 (exit $ac_status); } && {
15289 test -z "$ac_c_werror_flag" ||
15290 test ! -s conftest.err
15291 } && test -s conftest$ac_exeext &&
15292 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015293 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015294else
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015296sed 's/^/| /' conftest.$ac_ext >&5
15297
Martin v. Löwiseba40652007-08-30 20:10:57 +000015298 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015300
15301rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015302 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015303LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015305{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15306echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015307if test $ac_cv_lib_mpc_usconfig = yes; then
15308 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015309#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015310_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015311
Martin v. Löwis130fb172001-07-19 11:00:41 +000015312 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015313 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015314 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015315fi
15316
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015317
Neal Norwitza978ab02002-11-02 16:58:05 +000015318 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015319 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15320echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015321if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015323else
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015325LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015327/* confdefs.h. */
15328_ACEOF
15329cat confdefs.h >>conftest.$ac_ext
15330cat >>conftest.$ac_ext <<_ACEOF
15331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015332
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333/* Override any GCC internal prototype to avoid an error.
15334 Use char because int might match the return type of a GCC
15335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015336#ifdef __cplusplus
15337extern "C"
15338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015339char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015340int
15341main ()
15342{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015343return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 ;
15345 return 0;
15346}
15347_ACEOF
15348rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015349if { (ac_try="$ac_link"
15350case "(($ac_try" in
15351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15352 *) ac_try_echo=$ac_try;;
15353esac
15354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15355 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015357 grep -v '^ *+' conftest.er1 >conftest.err
15358 rm -f conftest.er1
15359 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015361 (exit $ac_status); } && {
15362 test -z "$ac_c_werror_flag" ||
15363 test ! -s conftest.err
15364 } && test -s conftest$ac_exeext &&
15365 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015367else
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015369sed 's/^/| /' conftest.$ac_ext >&5
15370
Martin v. Löwiseba40652007-08-30 20:10:57 +000015371 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373
15374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015376LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015378{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15379echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015380if test $ac_cv_lib_thread_thr_create = yes; then
15381 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015382#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015383_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015384
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015385 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015386 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015387 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015388fi
15389
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015390 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015391
Martin v. Löwis130fb172001-07-19 11:00:41 +000015392 if test "$USE_THREAD_MODULE" != "#"
15393 then
15394 # If the above checks didn't disable threads, (at least) OSF1
15395 # needs this '-threads' argument during linking.
15396 case $ac_sys_system in
15397 OSF1) LDLAST=-threads;;
15398 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015399 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015400fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015401
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015402if test "$posix_threads" = "yes"; then
15403 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015404
15405cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015406#define _POSIX_THREADS 1
15407_ACEOF
15408
15409 fi
15410
15411 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15412 case $ac_sys_system/$ac_sys_release in
15413 SunOS/5.6)
15414cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015415#define HAVE_PTHREAD_DESTRUCTOR 1
15416_ACEOF
15417
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015418 ;;
15419 SunOS/5.8)
15420cat >>confdefs.h <<\_ACEOF
15421#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15422_ACEOF
15423
15424 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015425 AIX/5)
15426cat >>confdefs.h <<\_ACEOF
15427#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15428_ACEOF
15429
15430 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015431 esac
15432
Martin v. Löwiseba40652007-08-30 20:10:57 +000015433 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15434echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015435 if test "${ac_cv_pthread_system_supported+set}" = set; then
15436 echo $ECHO_N "(cached) $ECHO_C" >&6
15437else
15438 if test "$cross_compiling" = yes; then
15439 ac_cv_pthread_system_supported=no
15440else
15441 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015442/* confdefs.h. */
15443_ACEOF
15444cat confdefs.h >>conftest.$ac_ext
15445cat >>conftest.$ac_ext <<_ACEOF
15446/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015447#include <pthread.h>
15448 void *foo(void *parm) {
15449 return NULL;
15450 }
15451 main() {
15452 pthread_attr_t attr;
15453 pthread_t id;
15454 if (pthread_attr_init(&attr)) exit(-1);
15455 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15456 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15457 exit(0);
15458 }
15459_ACEOF
15460rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015461if { (ac_try="$ac_link"
15462case "(($ac_try" in
15463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15464 *) ac_try_echo=$ac_try;;
15465esac
15466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15467 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015468 ac_status=$?
15469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15470 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471 { (case "(($ac_try" in
15472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15473 *) ac_try_echo=$ac_try;;
15474esac
15475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15476 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015477 ac_status=$?
15478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15479 (exit $ac_status); }; }; then
15480 ac_cv_pthread_system_supported=yes
15481else
15482 echo "$as_me: program exited with status $ac_status" >&5
15483echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015484sed 's/^/| /' conftest.$ac_ext >&5
15485
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015486( exit $ac_status )
15487ac_cv_pthread_system_supported=no
15488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015489rm -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 +000015490fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015491
Martin v. Löwiseba40652007-08-30 20:10:57 +000015492
15493
Guido van Rossum627b2d71993-12-24 10:39:16 +000015494fi
15495
Martin v. Löwiseba40652007-08-30 20:10:57 +000015496 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15497echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015498 if test "$ac_cv_pthread_system_supported" = "yes"; then
15499
15500cat >>confdefs.h <<\_ACEOF
15501#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15502_ACEOF
15503
15504 fi
15505
15506for ac_func in pthread_sigmask
15507do
15508as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015509{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15510echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15511if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015512 echo $ECHO_N "(cached) $ECHO_C" >&6
15513else
15514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015515/* confdefs.h. */
15516_ACEOF
15517cat confdefs.h >>conftest.$ac_ext
15518cat >>conftest.$ac_ext <<_ACEOF
15519/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015520/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15521 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15522#define $ac_func innocuous_$ac_func
15523
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015524/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015525 which can conflict with char $ac_func (); below.
15526 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015527 <limits.h> exists even on freestanding compilers. */
15528
15529#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015530# include <limits.h>
15531#else
15532# include <assert.h>
15533#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015534
15535#undef $ac_func
15536
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537/* Override any GCC internal prototype to avoid an error.
15538 Use char because int might match the return type of a GCC
15539 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015540#ifdef __cplusplus
15541extern "C"
15542#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015543char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015544/* The GNU C library defines this for functions which it implements
15545 to always fail with ENOSYS. Some functions are actually named
15546 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015547#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015548choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015549#endif
15550
Skip Montanaro6dead952003-09-25 14:50:04 +000015551int
15552main ()
15553{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015554return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015555 ;
15556 return 0;
15557}
15558_ACEOF
15559rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015560if { (ac_try="$ac_link"
15561case "(($ac_try" in
15562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15563 *) ac_try_echo=$ac_try;;
15564esac
15565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15566 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015568 grep -v '^ *+' conftest.er1 >conftest.err
15569 rm -f conftest.er1
15570 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015572 (exit $ac_status); } && {
15573 test -z "$ac_c_werror_flag" ||
15574 test ! -s conftest.err
15575 } && test -s conftest$ac_exeext &&
15576 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015577 eval "$as_ac_var=yes"
15578else
15579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015580sed 's/^/| /' conftest.$ac_ext >&5
15581
Martin v. Löwiseba40652007-08-30 20:10:57 +000015582 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015584
15585rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015586 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015588ac_res=`eval echo '${'$as_ac_var'}'`
15589 { echo "$as_me:$LINENO: result: $ac_res" >&5
15590echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015591if test `eval echo '${'$as_ac_var'}'` = yes; then
15592 cat >>confdefs.h <<_ACEOF
15593#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15594_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015595 case $ac_sys_system in
15596 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015597
Jason Tishlerfac083d2003-07-22 15:20:49 +000015598cat >>confdefs.h <<\_ACEOF
15599#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15600_ACEOF
15601
15602 ;;
15603 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015604fi
15605done
15606
15607fi
15608
15609
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015610# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015611
15612
Martin v. Löwiseba40652007-08-30 20:10:57 +000015613{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15614echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15615# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015616if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015617 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015618 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015619 { echo "$as_me:$LINENO: result: no" >&5
15620echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015621 ipv6=no
15622 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015623 *) { echo "$as_me:$LINENO: result: yes" >&5
15624echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015625 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015626#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015627_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015628
15629 ipv6=yes
15630 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015631 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015632else
Martin v. Löwis11437992002-04-12 09:54:03 +000015633
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015634 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015635 { echo "$as_me:$LINENO: result: no" >&5
15636echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015637 ipv6=no
15638
15639else
Martin v. Löwis11437992002-04-12 09:54:03 +000015640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015641/* confdefs.h. */
15642_ACEOF
15643cat confdefs.h >>conftest.$ac_ext
15644cat >>conftest.$ac_ext <<_ACEOF
15645/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015646 /* AF_INET6 available check */
15647#include <sys/types.h>
15648#include <sys/socket.h>
15649main()
15650{
15651 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15652 exit(1);
15653 else
15654 exit(0);
15655}
15656
Martin v. Löwis11437992002-04-12 09:54:03 +000015657_ACEOF
15658rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015659if { (ac_try="$ac_link"
15660case "(($ac_try" in
15661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15662 *) ac_try_echo=$ac_try;;
15663esac
15664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15665 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015666 ac_status=$?
15667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015669 { (case "(($ac_try" in
15670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15671 *) ac_try_echo=$ac_try;;
15672esac
15673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15674 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 ac_status=$?
15676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15677 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015678 { echo "$as_me:$LINENO: result: yes" >&5
15679echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015680 ipv6=yes
15681else
Martin v. Löwis11437992002-04-12 09:54:03 +000015682 echo "$as_me: program exited with status $ac_status" >&5
15683echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015684sed 's/^/| /' conftest.$ac_ext >&5
15685
Martin v. Löwis11437992002-04-12 09:54:03 +000015686( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015687{ echo "$as_me:$LINENO: result: no" >&5
15688echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015689 ipv6=no
15690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015691rm -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 +000015692fi
15693
Martin v. Löwiseba40652007-08-30 20:10:57 +000015694
15695
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015696if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015697 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15698echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015700/* confdefs.h. */
15701_ACEOF
15702cat confdefs.h >>conftest.$ac_ext
15703cat >>conftest.$ac_ext <<_ACEOF
15704/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015705#include <sys/types.h>
15706#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015707int
15708main ()
15709{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015710struct sockaddr_in6 x;
15711x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015712 ;
15713 return 0;
15714}
15715_ACEOF
15716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015717if { (ac_try="$ac_compile"
15718case "(($ac_try" in
15719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15720 *) ac_try_echo=$ac_try;;
15721esac
15722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015725 grep -v '^ *+' conftest.er1 >conftest.err
15726 rm -f conftest.er1
15727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015729 (exit $ac_status); } && {
15730 test -z "$ac_c_werror_flag" ||
15731 test ! -s conftest.err
15732 } && test -s conftest.$ac_objext; then
15733 { echo "$as_me:$LINENO: result: yes" >&5
15734echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015735 ipv6=yes
15736else
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015738sed 's/^/| /' conftest.$ac_ext >&5
15739
Martin v. Löwiseba40652007-08-30 20:10:57 +000015740 { echo "$as_me:$LINENO: result: no" >&5
15741echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015742 ipv6=no
15743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015744
15745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015746fi
15747
15748if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015749 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015750#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015751_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015752
15753fi
15754
Martin v. Löwiseba40652007-08-30 20:10:57 +000015755fi
15756
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015757
15758ipv6type=unknown
15759ipv6lib=none
15760ipv6trylibc=no
15761
15762if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015763 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15764echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015765 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15766 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015767 case $i in
15768 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015770/* confdefs.h. */
15771_ACEOF
15772cat confdefs.h >>conftest.$ac_ext
15773cat >>conftest.$ac_ext <<_ACEOF
15774/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015775
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015776#include <netinet/in.h>
15777#ifdef IPV6_INRIA_VERSION
15778yes
15779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015780_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015782 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015783 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015784fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015785rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015786
15787 ;;
15788 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015790/* confdefs.h. */
15791_ACEOF
15792cat confdefs.h >>conftest.$ac_ext
15793cat >>conftest.$ac_ext <<_ACEOF
15794/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015795
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015796#include <netinet/in.h>
15797#ifdef __KAME__
15798yes
15799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015800_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015801if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015802 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015803 ipv6type=$i;
15804 ipv6lib=inet6
15805 ipv6libdir=/usr/local/v6/lib
15806 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015807fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015808rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015809
15810 ;;
15811 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015813/* confdefs.h. */
15814_ACEOF
15815cat confdefs.h >>conftest.$ac_ext
15816cat >>conftest.$ac_ext <<_ACEOF
15817/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015818
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015819#include <features.h>
15820#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15821yes
15822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015823_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015825 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015826 ipv6type=$i;
15827 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015828fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015829rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015830
15831 ;;
15832 linux-inet6)
15833 if test -d /usr/inet6; then
15834 ipv6type=$i
15835 ipv6lib=inet6
15836 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015837 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015838 fi
15839 ;;
15840 solaris)
15841 if test -f /etc/netconfig; then
15842 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15843 ipv6type=$i
15844 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015845 fi
15846 fi
15847 ;;
15848 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015850/* confdefs.h. */
15851_ACEOF
15852cat confdefs.h >>conftest.$ac_ext
15853cat >>conftest.$ac_ext <<_ACEOF
15854/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015855
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015856#include <sys/param.h>
15857#ifdef _TOSHIBA_INET6
15858yes
15859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015860_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015862 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015863 ipv6type=$i;
15864 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015865 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015866fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015867rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015868
15869 ;;
15870 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015872/* confdefs.h. */
15873_ACEOF
15874cat confdefs.h >>conftest.$ac_ext
15875cat >>conftest.$ac_ext <<_ACEOF
15876/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015878#include </usr/local/v6/include/sys/v6config.h>
15879#ifdef __V6D__
15880yes
15881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015882_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015884 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015885 ipv6type=$i;
15886 ipv6lib=v6;
15887 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015888 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015889fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015890rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015891
15892 ;;
15893 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015895/* confdefs.h. */
15896_ACEOF
15897cat confdefs.h >>conftest.$ac_ext
15898cat >>conftest.$ac_ext <<_ACEOF
15899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015901#include <sys/param.h>
15902#ifdef _ZETA_MINAMI_INET6
15903yes
15904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015907 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015908 ipv6type=$i;
15909 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015910 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015911fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015913
15914 ;;
15915 esac
15916 if test "$ipv6type" != "unknown"; then
15917 break
15918 fi
15919 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015920 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15921echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015922fi
15923
15924if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15925 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15926 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15927 echo "using lib$ipv6lib"
15928 else
15929 if test $ipv6trylibc = "yes"; then
15930 echo "using libc"
15931 else
15932 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15933 echo "You need to fetch lib$ipv6lib.a from appropriate"
15934 echo 'ipv6 kit and compile beforehand.'
15935 exit 1
15936 fi
15937 fi
15938fi
15939
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015940{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15941echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
15942cat >conftest.$ac_ext <<_ACEOF
15943/* confdefs.h. */
15944_ACEOF
15945cat confdefs.h >>conftest.$ac_ext
15946cat >>conftest.$ac_ext <<_ACEOF
15947/* end confdefs.h. */
15948#include <Carbon/Carbon.h>
15949int
15950main ()
15951{
15952FSIORefNum fRef = 0
15953 ;
15954 return 0;
15955}
15956_ACEOF
15957rm -f conftest.$ac_objext
15958if { (ac_try="$ac_compile"
15959case "(($ac_try" in
15960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15961 *) ac_try_echo=$ac_try;;
15962esac
15963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15964 (eval "$ac_compile") 2>conftest.er1
15965 ac_status=$?
15966 grep -v '^ *+' conftest.er1 >conftest.err
15967 rm -f conftest.er1
15968 cat conftest.err >&5
15969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15970 (exit $ac_status); } && {
15971 test -z "$ac_c_werror_flag" ||
15972 test ! -s conftest.err
15973 } && test -s conftest.$ac_objext; then
15974
15975cat >>confdefs.h <<\_ACEOF
15976#define HAVE_OSX105_SDK 1
15977_ACEOF
15978
15979 { echo "$as_me:$LINENO: result: yes" >&5
15980echo "${ECHO_T}yes" >&6; }
15981else
15982 echo "$as_me: failed program was:" >&5
15983sed 's/^/| /' conftest.$ac_ext >&5
15984
15985 { echo "$as_me:$LINENO: result: no" >&5
15986echo "${ECHO_T}no" >&6; }
15987
15988fi
15989
15990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15991
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015992# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015993{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15994echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015995
Martin v. Löwiseba40652007-08-30 20:10:57 +000015996# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015997if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015998 withval=$with_doc_strings;
15999fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016000
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016001
16002if test -z "$with_doc_strings"
16003then with_doc_strings="yes"
16004fi
16005if test "$with_doc_strings" != "no"
16006then
16007
16008cat >>confdefs.h <<\_ACEOF
16009#define WITH_DOC_STRINGS 1
16010_ACEOF
16011
16012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016013{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16014echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016015
Neil Schemenauera35c6882001-02-27 04:45:05 +000016016# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016017{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16018echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016019
Martin v. Löwiseba40652007-08-30 20:10:57 +000016020# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016021if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016022 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016023if test "$withval" != no
16024then
16025
16026cat >>confdefs.h <<\_ACEOF
16027#define WITH_TSC 1
16028_ACEOF
16029
Martin v. Löwiseba40652007-08-30 20:10:57 +000016030 { echo "$as_me:$LINENO: result: yes" >&5
16031echo "${ECHO_T}yes" >&6; }
16032else { echo "$as_me:$LINENO: result: no" >&5
16033echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016034fi
16035else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016036 { echo "$as_me:$LINENO: result: no" >&5
16037echo "${ECHO_T}no" >&6; }
16038fi
16039
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016040
16041# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016042{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16043echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016044
Martin v. Löwiseba40652007-08-30 20:10:57 +000016045# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016046if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016047 withval=$with_pymalloc;
16048fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016049
Neil Schemenauera35c6882001-02-27 04:45:05 +000016050
Neil Schemenauer16c22972002-03-22 15:34:49 +000016051if test -z "$with_pymalloc"
16052then with_pymalloc="yes"
16053fi
16054if test "$with_pymalloc" != "no"
16055then
Martin v. Löwis11437992002-04-12 09:54:03 +000016056
16057cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016058#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016059_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016060
16061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016062{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16063echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016064
Barry Warsawef82cd72000-06-30 16:21:01 +000016065# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000016066{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16067echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016068
Martin v. Löwiseba40652007-08-30 20:10:57 +000016069# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016070if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016071 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016072if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016073then
16074
16075cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016076#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016077_ACEOF
16078
Martin v. Löwiseba40652007-08-30 20:10:57 +000016079 { echo "$as_me:$LINENO: result: yes" >&5
16080echo "${ECHO_T}yes" >&6; }
16081else { echo "$as_me:$LINENO: result: no" >&5
16082echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016083fi
16084else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016085 { echo "$as_me:$LINENO: result: no" >&5
16086echo "${ECHO_T}no" >&6; }
16087fi
16088
Barry Warsawef82cd72000-06-30 16:21:01 +000016089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016090# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016091
Guido van Rossum98935bf2001-09-05 19:13:16 +000016092DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016093
Guido van Rossume97ee181999-12-20 21:27:22 +000016094# the dlopen() function means we might want to use dynload_shlib.o. some
16095# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016096
Thomas Wouters3a584202000-08-05 23:28:51 +000016097for ac_func in dlopen
16098do
Martin v. Löwis11437992002-04-12 09:54:03 +000016099as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016100{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16101echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16102if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016103 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016104else
Martin v. Löwis11437992002-04-12 09:54:03 +000016105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016106/* confdefs.h. */
16107_ACEOF
16108cat confdefs.h >>conftest.$ac_ext
16109cat >>conftest.$ac_ext <<_ACEOF
16110/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016111/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16112 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16113#define $ac_func innocuous_$ac_func
16114
Guido van Rossume97ee181999-12-20 21:27:22 +000016115/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016116 which can conflict with char $ac_func (); below.
16117 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016118 <limits.h> exists even on freestanding compilers. */
16119
16120#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016121# include <limits.h>
16122#else
16123# include <assert.h>
16124#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016125
16126#undef $ac_func
16127
Martin v. Löwiseba40652007-08-30 20:10:57 +000016128/* Override any GCC internal prototype to avoid an error.
16129 Use char because int might match the return type of a GCC
16130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016131#ifdef __cplusplus
16132extern "C"
16133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016134char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016135/* The GNU C library defines this for functions which it implements
16136 to always fail with ENOSYS. Some functions are actually named
16137 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016138#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016139choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016140#endif
16141
Skip Montanaro6dead952003-09-25 14:50:04 +000016142int
16143main ()
16144{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016145return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016146 ;
16147 return 0;
16148}
16149_ACEOF
16150rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016151if { (ac_try="$ac_link"
16152case "(($ac_try" in
16153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16154 *) ac_try_echo=$ac_try;;
16155esac
16156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16157 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016159 grep -v '^ *+' conftest.er1 >conftest.err
16160 rm -f conftest.er1
16161 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016163 (exit $ac_status); } && {
16164 test -z "$ac_c_werror_flag" ||
16165 test ! -s conftest.err
16166 } && test -s conftest$ac_exeext &&
16167 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016168 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016169else
Martin v. Löwis11437992002-04-12 09:54:03 +000016170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016171sed 's/^/| /' conftest.$ac_ext >&5
16172
Martin v. Löwiseba40652007-08-30 20:10:57 +000016173 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016175
16176rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016177 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016179ac_res=`eval echo '${'$as_ac_var'}'`
16180 { echo "$as_me:$LINENO: result: $ac_res" >&5
16181echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016182if test `eval echo '${'$as_ac_var'}'` = yes; then
16183 cat >>confdefs.h <<_ACEOF
16184#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16185_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016186
Guido van Rossume97ee181999-12-20 21:27:22 +000016187fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016188done
Guido van Rossume97ee181999-12-20 21:27:22 +000016189
Michael W. Hudson54241132001-12-07 15:38:26 +000016190
Guido van Rossume97ee181999-12-20 21:27:22 +000016191# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16192# loading of modules.
16193
Martin v. Löwiseba40652007-08-30 20:10:57 +000016194{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16195echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016196if test -z "$DYNLOADFILE"
16197then
16198 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016199 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16200 if test "$ac_cv_func_dlopen" = yes
16201 then DYNLOADFILE="dynload_shlib.o"
16202 else DYNLOADFILE="dynload_aix.o"
16203 fi
16204 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016205 BeOS*) DYNLOADFILE="dynload_beos.o";;
16206 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016207 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16208 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016209 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016210 *)
16211 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16212 # out any dynamic loading
16213 if test "$ac_cv_func_dlopen" = yes
16214 then DYNLOADFILE="dynload_shlib.o"
16215 else DYNLOADFILE="dynload_stub.o"
16216 fi
16217 ;;
16218 esac
16219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016220{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16221echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016222if test "$DYNLOADFILE" != "dynload_stub.o"
16223then
Martin v. Löwis11437992002-04-12 09:54:03 +000016224
16225cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016226#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016227_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016228
16229fi
16230
Neil Schemenauer4e425612001-06-19 15:44:15 +000016231# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16232
Michael W. Hudson54241132001-12-07 15:38:26 +000016233
Martin v. Löwiseba40652007-08-30 20:10:57 +000016234{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16235echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016236if test -z "$MACHDEP_OBJS"
16237then
Jack Jansene578a632001-08-15 01:27:14 +000016238 MACHDEP_OBJS=$extra_machdep_objs
16239else
16240 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16243echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016244
Guido van Rossum627b2d71993-12-24 10:39:16 +000016245# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016246
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
16312
16313
16314
16315
16316
Martin v. Löwisd6320502004-08-12 13:45:08 +000016317
Martin v. Löwisc3001752005-01-23 09:27:24 +000016318
16319
Neal Norwitz05a45592006-03-20 06:30:08 +000016320
16321
Martin v. Löwis382abef2007-02-19 10:55:19 +000016322
16323
Christian Heimes36281872007-11-30 21:11:28 +000016324
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016325
16326
16327for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16328 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016329 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016330 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016331 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016332 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016333 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016334 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016335 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016336 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016337 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016338 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016339do
Martin v. Löwis11437992002-04-12 09:54:03 +000016340as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016341{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16342echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16343if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016345else
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016347/* confdefs.h. */
16348_ACEOF
16349cat confdefs.h >>conftest.$ac_ext
16350cat >>conftest.$ac_ext <<_ACEOF
16351/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016352/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16353 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16354#define $ac_func innocuous_$ac_func
16355
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016356/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016357 which can conflict with char $ac_func (); below.
16358 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016359 <limits.h> exists even on freestanding compilers. */
16360
16361#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016362# include <limits.h>
16363#else
16364# include <assert.h>
16365#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016366
16367#undef $ac_func
16368
Martin v. Löwiseba40652007-08-30 20:10:57 +000016369/* Override any GCC internal prototype to avoid an error.
16370 Use char because int might match the return type of a GCC
16371 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016372#ifdef __cplusplus
16373extern "C"
16374#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016375char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016376/* The GNU C library defines this for functions which it implements
16377 to always fail with ENOSYS. Some functions are actually named
16378 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016379#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016380choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016381#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016382
Skip Montanaro6dead952003-09-25 14:50:04 +000016383int
16384main ()
16385{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016386return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 ;
16388 return 0;
16389}
16390_ACEOF
16391rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016392if { (ac_try="$ac_link"
16393case "(($ac_try" in
16394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16395 *) ac_try_echo=$ac_try;;
16396esac
16397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16398 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016400 grep -v '^ *+' conftest.er1 >conftest.err
16401 rm -f conftest.er1
16402 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404 (exit $ac_status); } && {
16405 test -z "$ac_c_werror_flag" ||
16406 test ! -s conftest.err
16407 } && test -s conftest$ac_exeext &&
16408 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016409 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016410else
Martin v. Löwis11437992002-04-12 09:54:03 +000016411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016412sed 's/^/| /' conftest.$ac_ext >&5
16413
Martin v. Löwiseba40652007-08-30 20:10:57 +000016414 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016416
16417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016418 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016420ac_res=`eval echo '${'$as_ac_var'}'`
16421 { echo "$as_me:$LINENO: result: $ac_res" >&5
16422echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016423if test `eval echo '${'$as_ac_var'}'` = yes; then
16424 cat >>confdefs.h <<_ACEOF
16425#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16426_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016427
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016428fi
16429done
16430
Michael W. Hudson54241132001-12-07 15:38:26 +000016431
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016432# For some functions, having a definition is not sufficient, since
16433# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016434{ echo "$as_me:$LINENO: checking for chroot" >&5
16435echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016436cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016437/* confdefs.h. */
16438_ACEOF
16439cat confdefs.h >>conftest.$ac_ext
16440cat >>conftest.$ac_ext <<_ACEOF
16441/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016442#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016443int
16444main ()
16445{
16446void *x=chroot
16447 ;
16448 return 0;
16449}
16450_ACEOF
16451rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016452if { (ac_try="$ac_compile"
16453case "(($ac_try" in
16454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16455 *) ac_try_echo=$ac_try;;
16456esac
16457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016460 grep -v '^ *+' conftest.er1 >conftest.err
16461 rm -f conftest.er1
16462 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016464 (exit $ac_status); } && {
16465 test -z "$ac_c_werror_flag" ||
16466 test ! -s conftest.err
16467 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016468
16469cat >>confdefs.h <<\_ACEOF
16470#define HAVE_CHROOT 1
16471_ACEOF
16472
Martin v. Löwiseba40652007-08-30 20:10:57 +000016473 { echo "$as_me:$LINENO: result: yes" >&5
16474echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016475else
16476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016477sed 's/^/| /' conftest.$ac_ext >&5
16478
Martin v. Löwiseba40652007-08-30 20:10:57 +000016479 { echo "$as_me:$LINENO: result: no" >&5
16480echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016481
16482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016483
16484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16485{ echo "$as_me:$LINENO: checking for link" >&5
16486echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016487cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016488/* confdefs.h. */
16489_ACEOF
16490cat confdefs.h >>conftest.$ac_ext
16491cat >>conftest.$ac_ext <<_ACEOF
16492/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016493#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016494int
16495main ()
16496{
16497void *x=link
16498 ;
16499 return 0;
16500}
16501_ACEOF
16502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016503if { (ac_try="$ac_compile"
16504case "(($ac_try" in
16505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16506 *) ac_try_echo=$ac_try;;
16507esac
16508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016511 grep -v '^ *+' conftest.er1 >conftest.err
16512 rm -f conftest.er1
16513 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016515 (exit $ac_status); } && {
16516 test -z "$ac_c_werror_flag" ||
16517 test ! -s conftest.err
16518 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016519
16520cat >>confdefs.h <<\_ACEOF
16521#define HAVE_LINK 1
16522_ACEOF
16523
Martin v. Löwiseba40652007-08-30 20:10:57 +000016524 { echo "$as_me:$LINENO: result: yes" >&5
16525echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016526else
16527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016528sed 's/^/| /' conftest.$ac_ext >&5
16529
Martin v. Löwiseba40652007-08-30 20:10:57 +000016530 { echo "$as_me:$LINENO: result: no" >&5
16531echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016532
16533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016534
16535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16536{ echo "$as_me:$LINENO: checking for symlink" >&5
16537echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016538cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016539/* confdefs.h. */
16540_ACEOF
16541cat confdefs.h >>conftest.$ac_ext
16542cat >>conftest.$ac_ext <<_ACEOF
16543/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016544#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016545int
16546main ()
16547{
16548void *x=symlink
16549 ;
16550 return 0;
16551}
16552_ACEOF
16553rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016554if { (ac_try="$ac_compile"
16555case "(($ac_try" in
16556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16557 *) ac_try_echo=$ac_try;;
16558esac
16559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16560 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016562 grep -v '^ *+' conftest.er1 >conftest.err
16563 rm -f conftest.er1
16564 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016566 (exit $ac_status); } && {
16567 test -z "$ac_c_werror_flag" ||
16568 test ! -s conftest.err
16569 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016570
16571cat >>confdefs.h <<\_ACEOF
16572#define HAVE_SYMLINK 1
16573_ACEOF
16574
Martin v. Löwiseba40652007-08-30 20:10:57 +000016575 { echo "$as_me:$LINENO: result: yes" >&5
16576echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016577else
16578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016579sed 's/^/| /' conftest.$ac_ext >&5
16580
Martin v. Löwiseba40652007-08-30 20:10:57 +000016581 { echo "$as_me:$LINENO: result: no" >&5
16582echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016583
16584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016585
16586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16587{ echo "$as_me:$LINENO: checking for fchdir" >&5
16588echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016589cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016590/* confdefs.h. */
16591_ACEOF
16592cat confdefs.h >>conftest.$ac_ext
16593cat >>conftest.$ac_ext <<_ACEOF
16594/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016595#include <unistd.h>
16596int
16597main ()
16598{
16599void *x=fchdir
16600 ;
16601 return 0;
16602}
16603_ACEOF
16604rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016605if { (ac_try="$ac_compile"
16606case "(($ac_try" in
16607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16608 *) ac_try_echo=$ac_try;;
16609esac
16610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16611 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016613 grep -v '^ *+' conftest.er1 >conftest.err
16614 rm -f conftest.er1
16615 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016617 (exit $ac_status); } && {
16618 test -z "$ac_c_werror_flag" ||
16619 test ! -s conftest.err
16620 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016621
16622cat >>confdefs.h <<\_ACEOF
16623#define HAVE_FCHDIR 1
16624_ACEOF
16625
Martin v. Löwiseba40652007-08-30 20:10:57 +000016626 { echo "$as_me:$LINENO: result: yes" >&5
16627echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016628else
16629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016630sed 's/^/| /' conftest.$ac_ext >&5
16631
Martin v. Löwiseba40652007-08-30 20:10:57 +000016632 { echo "$as_me:$LINENO: result: no" >&5
16633echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016634
16635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016636
16637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16638{ echo "$as_me:$LINENO: checking for fsync" >&5
16639echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016640cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016641/* confdefs.h. */
16642_ACEOF
16643cat confdefs.h >>conftest.$ac_ext
16644cat >>conftest.$ac_ext <<_ACEOF
16645/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016646#include <unistd.h>
16647int
16648main ()
16649{
16650void *x=fsync
16651 ;
16652 return 0;
16653}
16654_ACEOF
16655rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016656if { (ac_try="$ac_compile"
16657case "(($ac_try" in
16658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16659 *) ac_try_echo=$ac_try;;
16660esac
16661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16662 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016664 grep -v '^ *+' conftest.er1 >conftest.err
16665 rm -f conftest.er1
16666 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016668 (exit $ac_status); } && {
16669 test -z "$ac_c_werror_flag" ||
16670 test ! -s conftest.err
16671 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016672
16673cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016674#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016675_ACEOF
16676
Martin v. Löwiseba40652007-08-30 20:10:57 +000016677 { echo "$as_me:$LINENO: result: yes" >&5
16678echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016679else
16680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016681sed 's/^/| /' conftest.$ac_ext >&5
16682
Martin v. Löwiseba40652007-08-30 20:10:57 +000016683 { echo "$as_me:$LINENO: result: no" >&5
16684echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016685
16686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016687
16688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16689{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16690echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016691cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016692/* confdefs.h. */
16693_ACEOF
16694cat confdefs.h >>conftest.$ac_ext
16695cat >>conftest.$ac_ext <<_ACEOF
16696/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016697#include <unistd.h>
16698int
16699main ()
16700{
16701void *x=fdatasync
16702 ;
16703 return 0;
16704}
16705_ACEOF
16706rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016707if { (ac_try="$ac_compile"
16708case "(($ac_try" in
16709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16710 *) ac_try_echo=$ac_try;;
16711esac
16712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016715 grep -v '^ *+' conftest.er1 >conftest.err
16716 rm -f conftest.er1
16717 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016719 (exit $ac_status); } && {
16720 test -z "$ac_c_werror_flag" ||
16721 test ! -s conftest.err
16722 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016723
16724cat >>confdefs.h <<\_ACEOF
16725#define HAVE_FDATASYNC 1
16726_ACEOF
16727
Martin v. Löwiseba40652007-08-30 20:10:57 +000016728 { echo "$as_me:$LINENO: result: yes" >&5
16729echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016730else
16731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016732sed 's/^/| /' conftest.$ac_ext >&5
16733
Martin v. Löwiseba40652007-08-30 20:10:57 +000016734 { echo "$as_me:$LINENO: result: no" >&5
16735echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016736
16737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016738
16739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016740{ echo "$as_me:$LINENO: checking for epoll" >&5
16741echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16742cat >conftest.$ac_ext <<_ACEOF
16743/* confdefs.h. */
16744_ACEOF
16745cat confdefs.h >>conftest.$ac_ext
16746cat >>conftest.$ac_ext <<_ACEOF
16747/* end confdefs.h. */
16748#include <sys/epoll.h>
16749int
16750main ()
16751{
16752void *x=epoll_create
16753 ;
16754 return 0;
16755}
16756_ACEOF
16757rm -f conftest.$ac_objext
16758if { (ac_try="$ac_compile"
16759case "(($ac_try" in
16760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16761 *) ac_try_echo=$ac_try;;
16762esac
16763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16764 (eval "$ac_compile") 2>conftest.er1
16765 ac_status=$?
16766 grep -v '^ *+' conftest.er1 >conftest.err
16767 rm -f conftest.er1
16768 cat conftest.err >&5
16769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16770 (exit $ac_status); } && {
16771 test -z "$ac_c_werror_flag" ||
16772 test ! -s conftest.err
16773 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016774
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016775cat >>confdefs.h <<\_ACEOF
16776#define HAVE_EPOLL 1
16777_ACEOF
16778
16779 { echo "$as_me:$LINENO: result: yes" >&5
16780echo "${ECHO_T}yes" >&6; }
16781else
16782 echo "$as_me: failed program was:" >&5
16783sed 's/^/| /' conftest.$ac_ext >&5
16784
16785 { echo "$as_me:$LINENO: result: no" >&5
16786echo "${ECHO_T}no" >&6; }
16787
16788fi
16789
16790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16791{ echo "$as_me:$LINENO: checking for kqueue" >&5
16792echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16793cat >conftest.$ac_ext <<_ACEOF
16794/* confdefs.h. */
16795_ACEOF
16796cat confdefs.h >>conftest.$ac_ext
16797cat >>conftest.$ac_ext <<_ACEOF
16798/* end confdefs.h. */
16799
16800#include <sys/types.h>
16801#include <sys/event.h>
16802
16803int
16804main ()
16805{
16806int x=kqueue()
16807 ;
16808 return 0;
16809}
16810_ACEOF
16811rm -f conftest.$ac_objext
16812if { (ac_try="$ac_compile"
16813case "(($ac_try" in
16814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16815 *) ac_try_echo=$ac_try;;
16816esac
16817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16818 (eval "$ac_compile") 2>conftest.er1
16819 ac_status=$?
16820 grep -v '^ *+' conftest.er1 >conftest.err
16821 rm -f conftest.er1
16822 cat conftest.err >&5
16823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16824 (exit $ac_status); } && {
16825 test -z "$ac_c_werror_flag" ||
16826 test ! -s conftest.err
16827 } && test -s conftest.$ac_objext; then
16828
16829cat >>confdefs.h <<\_ACEOF
16830#define HAVE_KQUEUE 1
16831_ACEOF
16832
16833 { echo "$as_me:$LINENO: result: yes" >&5
16834echo "${ECHO_T}yes" >&6; }
16835else
16836 echo "$as_me: failed program was:" >&5
16837sed 's/^/| /' conftest.$ac_ext >&5
16838
16839 { echo "$as_me:$LINENO: result: no" >&5
16840echo "${ECHO_T}no" >&6; }
16841
16842fi
16843
16844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016845# On some systems (eg. FreeBSD 5), we would find a definition of the
16846# functions ctermid_r, setgroups in the library, but no prototype
16847# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16848# address to avoid compiler warnings and potential miscompilations
16849# because of the missing prototypes.
16850
Martin v. Löwiseba40652007-08-30 20:10:57 +000016851{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16852echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016853cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016854/* confdefs.h. */
16855_ACEOF
16856cat confdefs.h >>conftest.$ac_ext
16857cat >>conftest.$ac_ext <<_ACEOF
16858/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016859
16860#include "confdefs.h"
16861#include <stdio.h>
16862
Martin v. Löwisd5843682002-11-21 20:41:28 +000016863int
16864main ()
16865{
16866void* p = ctermid_r
16867 ;
16868 return 0;
16869}
16870_ACEOF
16871rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016872if { (ac_try="$ac_compile"
16873case "(($ac_try" in
16874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16875 *) ac_try_echo=$ac_try;;
16876esac
16877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016880 grep -v '^ *+' conftest.er1 >conftest.err
16881 rm -f conftest.er1
16882 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016884 (exit $ac_status); } && {
16885 test -z "$ac_c_werror_flag" ||
16886 test ! -s conftest.err
16887 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016888
16889cat >>confdefs.h <<\_ACEOF
16890#define HAVE_CTERMID_R 1
16891_ACEOF
16892
Martin v. Löwiseba40652007-08-30 20:10:57 +000016893 { echo "$as_me:$LINENO: result: yes" >&5
16894echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016895else
16896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016897sed 's/^/| /' conftest.$ac_ext >&5
16898
Martin v. Löwiseba40652007-08-30 20:10:57 +000016899 { echo "$as_me:$LINENO: result: no" >&5
16900echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016901
16902fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016903
Martin v. Löwiseba40652007-08-30 20:10:57 +000016904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16905
16906{ echo "$as_me:$LINENO: checking for flock" >&5
16907echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016908cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016909/* confdefs.h. */
16910_ACEOF
16911cat confdefs.h >>conftest.$ac_ext
16912cat >>conftest.$ac_ext <<_ACEOF
16913/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016914
16915#include "confdefs.h"
16916#include <sys/file.h>
16917
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016918int
16919main ()
16920{
16921void* p = flock
16922 ;
16923 return 0;
16924}
16925_ACEOF
16926rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016927if { (ac_try="$ac_compile"
16928case "(($ac_try" in
16929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16930 *) ac_try_echo=$ac_try;;
16931esac
16932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16933 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016934 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016935 grep -v '^ *+' conftest.er1 >conftest.err
16936 rm -f conftest.er1
16937 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016939 (exit $ac_status); } && {
16940 test -z "$ac_c_werror_flag" ||
16941 test ! -s conftest.err
16942 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016943
16944cat >>confdefs.h <<\_ACEOF
16945#define HAVE_FLOCK 1
16946_ACEOF
16947
Martin v. Löwiseba40652007-08-30 20:10:57 +000016948 { echo "$as_me:$LINENO: result: yes" >&5
16949echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016950else
16951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016952sed 's/^/| /' conftest.$ac_ext >&5
16953
Martin v. Löwiseba40652007-08-30 20:10:57 +000016954 { echo "$as_me:$LINENO: result: no" >&5
16955echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016956
16957fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016958
Martin v. Löwiseba40652007-08-30 20:10:57 +000016959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16960
16961{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16962echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016964/* confdefs.h. */
16965_ACEOF
16966cat confdefs.h >>conftest.$ac_ext
16967cat >>conftest.$ac_ext <<_ACEOF
16968/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016969
16970#include "confdefs.h"
16971#include <unistd.h>
16972
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016973int
16974main ()
16975{
16976void* p = getpagesize
16977 ;
16978 return 0;
16979}
16980_ACEOF
16981rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016982if { (ac_try="$ac_compile"
16983case "(($ac_try" in
16984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16985 *) ac_try_echo=$ac_try;;
16986esac
16987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16988 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016990 grep -v '^ *+' conftest.er1 >conftest.err
16991 rm -f conftest.er1
16992 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016994 (exit $ac_status); } && {
16995 test -z "$ac_c_werror_flag" ||
16996 test ! -s conftest.err
16997 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016998
16999cat >>confdefs.h <<\_ACEOF
17000#define HAVE_GETPAGESIZE 1
17001_ACEOF
17002
Martin v. Löwiseba40652007-08-30 20:10:57 +000017003 { echo "$as_me:$LINENO: result: yes" >&5
17004echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017005else
17006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017007sed 's/^/| /' conftest.$ac_ext >&5
17008
Martin v. Löwiseba40652007-08-30 20:10:57 +000017009 { echo "$as_me:$LINENO: result: no" >&5
17010echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017011
17012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017013
17014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017015
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017016for ac_prog in true
17017do
17018 # Extract the first word of "$ac_prog", so it can be a program name with args.
17019set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000017020{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17021echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017022if test "${ac_cv_prog_TRUE+set}" = set; then
17023 echo $ECHO_N "(cached) $ECHO_C" >&6
17024else
17025 if test -n "$TRUE"; then
17026 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17027else
17028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17029for as_dir in $PATH
17030do
17031 IFS=$as_save_IFS
17032 test -z "$as_dir" && as_dir=.
17033 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000017034 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 +000017035 ac_cv_prog_TRUE="$ac_prog"
17036 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17037 break 2
17038 fi
17039done
17040done
Martin v. Löwiseba40652007-08-30 20:10:57 +000017041IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017042
17043fi
17044fi
17045TRUE=$ac_cv_prog_TRUE
17046if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017047 { echo "$as_me:$LINENO: result: $TRUE" >&5
17048echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017049else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017050 { echo "$as_me:$LINENO: result: no" >&5
17051echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017052fi
17053
Martin v. Löwiseba40652007-08-30 20:10:57 +000017054
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017055 test -n "$TRUE" && break
17056done
17057test -n "$TRUE" || TRUE="/bin/true"
17058
17059
Martin v. Löwiseba40652007-08-30 20:10:57 +000017060{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17061echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017062if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17063 echo $ECHO_N "(cached) $ECHO_C" >&6
17064else
17065 ac_check_lib_save_LIBS=$LIBS
17066LIBS="-lc $LIBS"
17067cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017068/* confdefs.h. */
17069_ACEOF
17070cat confdefs.h >>conftest.$ac_ext
17071cat >>conftest.$ac_ext <<_ACEOF
17072/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017073
Martin v. Löwiseba40652007-08-30 20:10:57 +000017074/* Override any GCC internal prototype to avoid an error.
17075 Use char because int might match the return type of a GCC
17076 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017077#ifdef __cplusplus
17078extern "C"
17079#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017080char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017081int
17082main ()
17083{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017084return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017085 ;
17086 return 0;
17087}
17088_ACEOF
17089rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017090if { (ac_try="$ac_link"
17091case "(($ac_try" in
17092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17093 *) ac_try_echo=$ac_try;;
17094esac
17095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17096 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017098 grep -v '^ *+' conftest.er1 >conftest.err
17099 rm -f conftest.er1
17100 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017102 (exit $ac_status); } && {
17103 test -z "$ac_c_werror_flag" ||
17104 test ! -s conftest.err
17105 } && test -s conftest$ac_exeext &&
17106 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017107 ac_cv_lib_c_inet_aton=yes
17108else
17109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017110sed 's/^/| /' conftest.$ac_ext >&5
17111
Martin v. Löwiseba40652007-08-30 20:10:57 +000017112 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017114
17115rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017117LIBS=$ac_check_lib_save_LIBS
17118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017119{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17120echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017121if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017122 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017123else
17124
Martin v. Löwiseba40652007-08-30 20:10:57 +000017125{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17126echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017127if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17128 echo $ECHO_N "(cached) $ECHO_C" >&6
17129else
17130 ac_check_lib_save_LIBS=$LIBS
17131LIBS="-lresolv $LIBS"
17132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017133/* confdefs.h. */
17134_ACEOF
17135cat confdefs.h >>conftest.$ac_ext
17136cat >>conftest.$ac_ext <<_ACEOF
17137/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017138
Martin v. Löwiseba40652007-08-30 20:10:57 +000017139/* Override any GCC internal prototype to avoid an error.
17140 Use char because int might match the return type of a GCC
17141 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017142#ifdef __cplusplus
17143extern "C"
17144#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017145char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017146int
17147main ()
17148{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017149return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017150 ;
17151 return 0;
17152}
17153_ACEOF
17154rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017155if { (ac_try="$ac_link"
17156case "(($ac_try" in
17157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17158 *) ac_try_echo=$ac_try;;
17159esac
17160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17161 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017163 grep -v '^ *+' conftest.er1 >conftest.err
17164 rm -f conftest.er1
17165 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017167 (exit $ac_status); } && {
17168 test -z "$ac_c_werror_flag" ||
17169 test ! -s conftest.err
17170 } && test -s conftest$ac_exeext &&
17171 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017172 ac_cv_lib_resolv_inet_aton=yes
17173else
17174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017175sed 's/^/| /' conftest.$ac_ext >&5
17176
Martin v. Löwiseba40652007-08-30 20:10:57 +000017177 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017179
17180rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017181 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017182LIBS=$ac_check_lib_save_LIBS
17183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017184{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17185echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017186if test $ac_cv_lib_resolv_inet_aton = yes; then
17187 cat >>confdefs.h <<_ACEOF
17188#define HAVE_LIBRESOLV 1
17189_ACEOF
17190
17191 LIBS="-lresolv $LIBS"
17192
17193fi
17194
17195
17196fi
17197
17198
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017199# On Tru64, chflags seems to be present, but calling it will
17200# exit Python
17201{ echo "$as_me:$LINENO: checking for chflags" >&5
17202echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17203if test "$cross_compiling" = yes; then
17204 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17205See \`config.log' for more details." >&5
17206echo "$as_me: error: cannot run test program while cross compiling
17207See \`config.log' for more details." >&2;}
17208 { (exit 1); exit 1; }; }
17209else
17210 cat >conftest.$ac_ext <<_ACEOF
17211/* confdefs.h. */
17212_ACEOF
17213cat confdefs.h >>conftest.$ac_ext
17214cat >>conftest.$ac_ext <<_ACEOF
17215/* end confdefs.h. */
17216
17217#include <sys/stat.h>
17218#include <unistd.h>
17219int main(int argc, char*argv[])
17220{
17221 if(chflags(argv[0], 0) != 0)
17222 return 1;
17223 return 0;
17224}
17225
17226_ACEOF
17227rm -f conftest$ac_exeext
17228if { (ac_try="$ac_link"
17229case "(($ac_try" in
17230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17231 *) ac_try_echo=$ac_try;;
17232esac
17233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17234 (eval "$ac_link") 2>&5
17235 ac_status=$?
17236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17237 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17238 { (case "(($ac_try" in
17239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17240 *) ac_try_echo=$ac_try;;
17241esac
17242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17243 (eval "$ac_try") 2>&5
17244 ac_status=$?
17245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17246 (exit $ac_status); }; }; then
17247
17248cat >>confdefs.h <<\_ACEOF
17249#define HAVE_CHFLAGS 1
17250_ACEOF
17251
17252 { echo "$as_me:$LINENO: result: yes" >&5
17253echo "${ECHO_T}yes" >&6; }
17254else
17255 echo "$as_me: program exited with status $ac_status" >&5
17256echo "$as_me: failed program was:" >&5
17257sed 's/^/| /' conftest.$ac_ext >&5
17258
17259( exit $ac_status )
17260{ echo "$as_me:$LINENO: result: no" >&5
17261echo "${ECHO_T}no" >&6; }
17262
17263fi
17264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17265fi
17266
17267
17268
17269{ echo "$as_me:$LINENO: checking for lchflags" >&5
17270echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17271if test "$cross_compiling" = yes; then
17272 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17273See \`config.log' for more details." >&5
17274echo "$as_me: error: cannot run test program while cross compiling
17275See \`config.log' for more details." >&2;}
17276 { (exit 1); exit 1; }; }
17277else
17278 cat >conftest.$ac_ext <<_ACEOF
17279/* confdefs.h. */
17280_ACEOF
17281cat confdefs.h >>conftest.$ac_ext
17282cat >>conftest.$ac_ext <<_ACEOF
17283/* end confdefs.h. */
17284
17285#include <sys/stat.h>
17286#include <unistd.h>
17287int main(int argc, char*argv[])
17288{
17289 if(lchflags(argv[0], 0) != 0)
17290 return 1;
17291 return 0;
17292}
17293
17294_ACEOF
17295rm -f conftest$ac_exeext
17296if { (ac_try="$ac_link"
17297case "(($ac_try" in
17298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17299 *) ac_try_echo=$ac_try;;
17300esac
17301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17302 (eval "$ac_link") 2>&5
17303 ac_status=$?
17304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17305 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17306 { (case "(($ac_try" in
17307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17308 *) ac_try_echo=$ac_try;;
17309esac
17310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17311 (eval "$ac_try") 2>&5
17312 ac_status=$?
17313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17314 (exit $ac_status); }; }; then
17315
17316cat >>confdefs.h <<\_ACEOF
17317#define HAVE_LCHFLAGS 1
17318_ACEOF
17319
17320 { echo "$as_me:$LINENO: result: yes" >&5
17321echo "${ECHO_T}yes" >&6; }
17322else
17323 echo "$as_me: program exited with status $ac_status" >&5
17324echo "$as_me: failed program was:" >&5
17325sed 's/^/| /' conftest.$ac_ext >&5
17326
17327( exit $ac_status )
17328{ echo "$as_me:$LINENO: result: no" >&5
17329echo "${ECHO_T}no" >&6; }
17330
17331fi
17332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17333fi
17334
17335
17336
Ronald Oussorenf8752642006-07-06 10:13:35 +000017337case $ac_sys_system/$ac_sys_release in
17338Darwin/*)
17339 _CUR_CFLAGS="${CFLAGS}"
17340 _CUR_LDFLAGS="${LDFLAGS}"
17341 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17342 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17343 ;;
17344esac
17345
Martin v. Löwiseba40652007-08-30 20:10:57 +000017346{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17347echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017348if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17349 echo $ECHO_N "(cached) $ECHO_C" >&6
17350else
17351 ac_check_lib_save_LIBS=$LIBS
17352LIBS="-lz $LIBS"
17353cat >conftest.$ac_ext <<_ACEOF
17354/* confdefs.h. */
17355_ACEOF
17356cat confdefs.h >>conftest.$ac_ext
17357cat >>conftest.$ac_ext <<_ACEOF
17358/* end confdefs.h. */
17359
Martin v. Löwiseba40652007-08-30 20:10:57 +000017360/* Override any GCC internal prototype to avoid an error.
17361 Use char because int might match the return type of a GCC
17362 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017363#ifdef __cplusplus
17364extern "C"
17365#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017366char inflateCopy ();
17367int
17368main ()
17369{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017370return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017371 ;
17372 return 0;
17373}
17374_ACEOF
17375rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017376if { (ac_try="$ac_link"
17377case "(($ac_try" in
17378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17379 *) ac_try_echo=$ac_try;;
17380esac
17381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17382 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017383 ac_status=$?
17384 grep -v '^ *+' conftest.er1 >conftest.err
17385 rm -f conftest.er1
17386 cat conftest.err >&5
17387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017388 (exit $ac_status); } && {
17389 test -z "$ac_c_werror_flag" ||
17390 test ! -s conftest.err
17391 } && test -s conftest$ac_exeext &&
17392 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017393 ac_cv_lib_z_inflateCopy=yes
17394else
17395 echo "$as_me: failed program was:" >&5
17396sed 's/^/| /' conftest.$ac_ext >&5
17397
Martin v. Löwiseba40652007-08-30 20:10:57 +000017398 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017400
17401rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017402 conftest$ac_exeext conftest.$ac_ext
17403LIBS=$ac_check_lib_save_LIBS
17404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017405{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17406echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017407if test $ac_cv_lib_z_inflateCopy = yes; then
17408
17409cat >>confdefs.h <<\_ACEOF
17410#define HAVE_ZLIB_COPY 1
17411_ACEOF
17412
17413fi
17414
17415
Ronald Oussorenf8752642006-07-06 10:13:35 +000017416case $ac_sys_system/$ac_sys_release in
17417Darwin/*)
17418 CFLAGS="${_CUR_CFLAGS}"
17419 LDFLAGS="${_CUR_LDFLAGS}"
17420 ;;
17421esac
17422
Martin v. Löwiseba40652007-08-30 20:10:57 +000017423{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17424echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017426/* confdefs.h. */
17427_ACEOF
17428cat confdefs.h >>conftest.$ac_ext
17429cat >>conftest.$ac_ext <<_ACEOF
17430/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017431
17432#include "confdefs.h"
17433#include <netdb.h>
17434
Martin v. Löwise9416172003-05-03 10:12:45 +000017435int
17436main ()
17437{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017438void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017439 ;
17440 return 0;
17441}
17442_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017443rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017444if { (ac_try="$ac_link"
17445case "(($ac_try" in
17446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17447 *) ac_try_echo=$ac_try;;
17448esac
17449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17450 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017452 grep -v '^ *+' conftest.er1 >conftest.err
17453 rm -f conftest.er1
17454 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017456 (exit $ac_status); } && {
17457 test -z "$ac_c_werror_flag" ||
17458 test ! -s conftest.err
17459 } && test -s conftest$ac_exeext &&
17460 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017461
17462cat >>confdefs.h <<\_ACEOF
17463#define HAVE_HSTRERROR 1
17464_ACEOF
17465
Martin v. Löwiseba40652007-08-30 20:10:57 +000017466 { echo "$as_me:$LINENO: result: yes" >&5
17467echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017468else
17469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017470sed 's/^/| /' conftest.$ac_ext >&5
17471
Martin v. Löwiseba40652007-08-30 20:10:57 +000017472 { echo "$as_me:$LINENO: result: no" >&5
17473echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017474
17475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017476
17477rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017479
Martin v. Löwiseba40652007-08-30 20:10:57 +000017480{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17481echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017483/* confdefs.h. */
17484_ACEOF
17485cat confdefs.h >>conftest.$ac_ext
17486cat >>conftest.$ac_ext <<_ACEOF
17487/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017488
17489#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017490#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017491#include <sys/socket.h>
17492#include <netinet/in.h>
17493#include <arpa/inet.h>
17494
Martin v. Löwise9416172003-05-03 10:12:45 +000017495int
17496main ()
17497{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017498void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017499 ;
17500 return 0;
17501}
17502_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017503rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017504if { (ac_try="$ac_link"
17505case "(($ac_try" in
17506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17507 *) ac_try_echo=$ac_try;;
17508esac
17509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17510 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017512 grep -v '^ *+' conftest.er1 >conftest.err
17513 rm -f conftest.er1
17514 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017516 (exit $ac_status); } && {
17517 test -z "$ac_c_werror_flag" ||
17518 test ! -s conftest.err
17519 } && test -s conftest$ac_exeext &&
17520 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017521
17522cat >>confdefs.h <<\_ACEOF
17523#define HAVE_INET_ATON 1
17524_ACEOF
17525
Martin v. Löwiseba40652007-08-30 20:10:57 +000017526 { echo "$as_me:$LINENO: result: yes" >&5
17527echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017528else
17529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017530sed 's/^/| /' conftest.$ac_ext >&5
17531
Martin v. Löwiseba40652007-08-30 20:10:57 +000017532 { echo "$as_me:$LINENO: result: no" >&5
17533echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017534
17535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017536
17537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017539
Martin v. Löwiseba40652007-08-30 20:10:57 +000017540{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17541echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017543/* confdefs.h. */
17544_ACEOF
17545cat confdefs.h >>conftest.$ac_ext
17546cat >>conftest.$ac_ext <<_ACEOF
17547/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017548
17549#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017550#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017551#include <sys/socket.h>
17552#include <netinet/in.h>
17553#include <arpa/inet.h>
17554
Martin v. Löwise9416172003-05-03 10:12:45 +000017555int
17556main ()
17557{
17558void* p = inet_pton
17559 ;
17560 return 0;
17561}
17562_ACEOF
17563rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017564if { (ac_try="$ac_compile"
17565case "(($ac_try" in
17566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17567 *) ac_try_echo=$ac_try;;
17568esac
17569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017572 grep -v '^ *+' conftest.er1 >conftest.err
17573 rm -f conftest.er1
17574 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017576 (exit $ac_status); } && {
17577 test -z "$ac_c_werror_flag" ||
17578 test ! -s conftest.err
17579 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017580
17581cat >>confdefs.h <<\_ACEOF
17582#define HAVE_INET_PTON 1
17583_ACEOF
17584
Martin v. Löwiseba40652007-08-30 20:10:57 +000017585 { echo "$as_me:$LINENO: result: yes" >&5
17586echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017587else
17588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017589sed 's/^/| /' conftest.$ac_ext >&5
17590
Martin v. Löwiseba40652007-08-30 20:10:57 +000017591 { echo "$as_me:$LINENO: result: no" >&5
17592echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017593
17594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017595
17596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017597
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017598# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017599{ echo "$as_me:$LINENO: checking for setgroups" >&5
17600echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017601cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017602/* confdefs.h. */
17603_ACEOF
17604cat confdefs.h >>conftest.$ac_ext
17605cat >>conftest.$ac_ext <<_ACEOF
17606/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017607
17608#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017609#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017610#ifdef HAVE_GRP_H
17611#include <grp.h>
17612#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017613
Martin v. Löwisd5843682002-11-21 20:41:28 +000017614int
17615main ()
17616{
17617void* p = setgroups
17618 ;
17619 return 0;
17620}
17621_ACEOF
17622rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017623if { (ac_try="$ac_compile"
17624case "(($ac_try" in
17625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17626 *) ac_try_echo=$ac_try;;
17627esac
17628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17629 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017631 grep -v '^ *+' conftest.er1 >conftest.err
17632 rm -f conftest.er1
17633 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017635 (exit $ac_status); } && {
17636 test -z "$ac_c_werror_flag" ||
17637 test ! -s conftest.err
17638 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017639
17640cat >>confdefs.h <<\_ACEOF
17641#define HAVE_SETGROUPS 1
17642_ACEOF
17643
Martin v. Löwiseba40652007-08-30 20:10:57 +000017644 { echo "$as_me:$LINENO: result: yes" >&5
17645echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017646else
17647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017648sed 's/^/| /' conftest.$ac_ext >&5
17649
Martin v. Löwiseba40652007-08-30 20:10:57 +000017650 { echo "$as_me:$LINENO: result: no" >&5
17651echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017652
17653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017654
17655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017656
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017657# check for openpty and forkpty
17658
Martin v. Löwis11437992002-04-12 09:54:03 +000017659
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017660for ac_func in openpty
17661do
Martin v. Löwis11437992002-04-12 09:54:03 +000017662as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017663{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17664echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17665if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017666 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017667else
Martin v. Löwis11437992002-04-12 09:54:03 +000017668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017669/* confdefs.h. */
17670_ACEOF
17671cat confdefs.h >>conftest.$ac_ext
17672cat >>conftest.$ac_ext <<_ACEOF
17673/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017674/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17675 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17676#define $ac_func innocuous_$ac_func
17677
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017678/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017679 which can conflict with char $ac_func (); below.
17680 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017681 <limits.h> exists even on freestanding compilers. */
17682
17683#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017684# include <limits.h>
17685#else
17686# include <assert.h>
17687#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017688
17689#undef $ac_func
17690
Martin v. Löwiseba40652007-08-30 20:10:57 +000017691/* Override any GCC internal prototype to avoid an error.
17692 Use char because int might match the return type of a GCC
17693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017694#ifdef __cplusplus
17695extern "C"
17696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017697char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017698/* The GNU C library defines this for functions which it implements
17699 to always fail with ENOSYS. Some functions are actually named
17700 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017701#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017702choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017703#endif
17704
Skip Montanaro6dead952003-09-25 14:50:04 +000017705int
17706main ()
17707{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017708return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017709 ;
17710 return 0;
17711}
17712_ACEOF
17713rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017714if { (ac_try="$ac_link"
17715case "(($ac_try" in
17716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17717 *) ac_try_echo=$ac_try;;
17718esac
17719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17720 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017722 grep -v '^ *+' conftest.er1 >conftest.err
17723 rm -f conftest.er1
17724 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017726 (exit $ac_status); } && {
17727 test -z "$ac_c_werror_flag" ||
17728 test ! -s conftest.err
17729 } && test -s conftest$ac_exeext &&
17730 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017731 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017732else
Martin v. Löwis11437992002-04-12 09:54:03 +000017733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017734sed 's/^/| /' conftest.$ac_ext >&5
17735
Martin v. Löwiseba40652007-08-30 20:10:57 +000017736 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017738
17739rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017740 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017742ac_res=`eval echo '${'$as_ac_var'}'`
17743 { echo "$as_me:$LINENO: result: $ac_res" >&5
17744echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017745if test `eval echo '${'$as_ac_var'}'` = yes; then
17746 cat >>confdefs.h <<_ACEOF
17747#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17748_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017749
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017750else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017751 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17752echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017753if test "${ac_cv_lib_util_openpty+set}" = set; then
17754 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017755else
Martin v. Löwis11437992002-04-12 09:54:03 +000017756 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017757LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017759/* confdefs.h. */
17760_ACEOF
17761cat confdefs.h >>conftest.$ac_ext
17762cat >>conftest.$ac_ext <<_ACEOF
17763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017764
Martin v. Löwiseba40652007-08-30 20:10:57 +000017765/* Override any GCC internal prototype to avoid an error.
17766 Use char because int might match the return type of a GCC
17767 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017768#ifdef __cplusplus
17769extern "C"
17770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017771char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017772int
17773main ()
17774{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017775return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017776 ;
17777 return 0;
17778}
17779_ACEOF
17780rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017781if { (ac_try="$ac_link"
17782case "(($ac_try" in
17783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17784 *) ac_try_echo=$ac_try;;
17785esac
17786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17787 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017789 grep -v '^ *+' conftest.er1 >conftest.err
17790 rm -f conftest.er1
17791 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017793 (exit $ac_status); } && {
17794 test -z "$ac_c_werror_flag" ||
17795 test ! -s conftest.err
17796 } && test -s conftest$ac_exeext &&
17797 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017798 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017799else
Martin v. Löwis11437992002-04-12 09:54:03 +000017800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017801sed 's/^/| /' conftest.$ac_ext >&5
17802
Martin v. Löwiseba40652007-08-30 20:10:57 +000017803 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017805
17806rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017807 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017808LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017810{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17811echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017812if test $ac_cv_lib_util_openpty = yes; then
17813 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017814#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017815_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017816 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017817else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017818 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17819echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017820if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17821 echo $ECHO_N "(cached) $ECHO_C" >&6
17822else
17823 ac_check_lib_save_LIBS=$LIBS
17824LIBS="-lbsd $LIBS"
17825cat >conftest.$ac_ext <<_ACEOF
17826/* confdefs.h. */
17827_ACEOF
17828cat confdefs.h >>conftest.$ac_ext
17829cat >>conftest.$ac_ext <<_ACEOF
17830/* end confdefs.h. */
17831
Martin v. Löwiseba40652007-08-30 20:10:57 +000017832/* Override any GCC internal prototype to avoid an error.
17833 Use char because int might match the return type of a GCC
17834 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017835#ifdef __cplusplus
17836extern "C"
17837#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017838char openpty ();
17839int
17840main ()
17841{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017842return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017843 ;
17844 return 0;
17845}
17846_ACEOF
17847rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017848if { (ac_try="$ac_link"
17849case "(($ac_try" in
17850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17851 *) ac_try_echo=$ac_try;;
17852esac
17853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17854 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017855 ac_status=$?
17856 grep -v '^ *+' conftest.er1 >conftest.err
17857 rm -f conftest.er1
17858 cat conftest.err >&5
17859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017860 (exit $ac_status); } && {
17861 test -z "$ac_c_werror_flag" ||
17862 test ! -s conftest.err
17863 } && test -s conftest$ac_exeext &&
17864 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017865 ac_cv_lib_bsd_openpty=yes
17866else
17867 echo "$as_me: failed program was:" >&5
17868sed 's/^/| /' conftest.$ac_ext >&5
17869
Martin v. Löwiseba40652007-08-30 20:10:57 +000017870 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017872
17873rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017874 conftest$ac_exeext conftest.$ac_ext
17875LIBS=$ac_check_lib_save_LIBS
17876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017877{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17878echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017879if test $ac_cv_lib_bsd_openpty = yes; then
17880 cat >>confdefs.h <<\_ACEOF
17881#define HAVE_OPENPTY 1
17882_ACEOF
17883 LIBS="$LIBS -lbsd"
17884fi
17885
17886
17887fi
17888
Fred Drake8cef4cf2000-06-28 16:40:38 +000017889
17890fi
17891done
17892
Martin v. Löwis11437992002-04-12 09:54:03 +000017893
Fred Drake8cef4cf2000-06-28 16:40:38 +000017894for ac_func in forkpty
17895do
Martin v. Löwis11437992002-04-12 09:54:03 +000017896as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017897{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17898echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17899if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017901else
Martin v. Löwis11437992002-04-12 09:54:03 +000017902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017903/* confdefs.h. */
17904_ACEOF
17905cat confdefs.h >>conftest.$ac_ext
17906cat >>conftest.$ac_ext <<_ACEOF
17907/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017908/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17909 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17910#define $ac_func innocuous_$ac_func
17911
Fred Drake8cef4cf2000-06-28 16:40:38 +000017912/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017913 which can conflict with char $ac_func (); below.
17914 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017915 <limits.h> exists even on freestanding compilers. */
17916
17917#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017918# include <limits.h>
17919#else
17920# include <assert.h>
17921#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017922
17923#undef $ac_func
17924
Martin v. Löwiseba40652007-08-30 20:10:57 +000017925/* Override any GCC internal prototype to avoid an error.
17926 Use char because int might match the return type of a GCC
17927 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017928#ifdef __cplusplus
17929extern "C"
17930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017931char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017932/* The GNU C library defines this for functions which it implements
17933 to always fail with ENOSYS. Some functions are actually named
17934 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017935#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017936choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017937#endif
17938
Skip Montanaro6dead952003-09-25 14:50:04 +000017939int
17940main ()
17941{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017942return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017943 ;
17944 return 0;
17945}
17946_ACEOF
17947rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017948if { (ac_try="$ac_link"
17949case "(($ac_try" in
17950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17951 *) ac_try_echo=$ac_try;;
17952esac
17953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17954 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017956 grep -v '^ *+' conftest.er1 >conftest.err
17957 rm -f conftest.er1
17958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017960 (exit $ac_status); } && {
17961 test -z "$ac_c_werror_flag" ||
17962 test ! -s conftest.err
17963 } && test -s conftest$ac_exeext &&
17964 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017965 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017966else
Martin v. Löwis11437992002-04-12 09:54:03 +000017967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017968sed 's/^/| /' conftest.$ac_ext >&5
17969
Martin v. Löwiseba40652007-08-30 20:10:57 +000017970 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017972
17973rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017974 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017976ac_res=`eval echo '${'$as_ac_var'}'`
17977 { echo "$as_me:$LINENO: result: $ac_res" >&5
17978echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017979if test `eval echo '${'$as_ac_var'}'` = yes; then
17980 cat >>confdefs.h <<_ACEOF
17981#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17982_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017983
Fred Drake8cef4cf2000-06-28 16:40:38 +000017984else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017985 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17986echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017987if test "${ac_cv_lib_util_forkpty+set}" = set; then
17988 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017989else
Martin v. Löwis11437992002-04-12 09:54:03 +000017990 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017991LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017993/* confdefs.h. */
17994_ACEOF
17995cat confdefs.h >>conftest.$ac_ext
17996cat >>conftest.$ac_ext <<_ACEOF
17997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017998
Martin v. Löwiseba40652007-08-30 20:10:57 +000017999/* Override any GCC internal prototype to avoid an error.
18000 Use char because int might match the return type of a GCC
18001 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018002#ifdef __cplusplus
18003extern "C"
18004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018005char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018006int
18007main ()
18008{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018009return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018010 ;
18011 return 0;
18012}
18013_ACEOF
18014rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018015if { (ac_try="$ac_link"
18016case "(($ac_try" in
18017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18018 *) ac_try_echo=$ac_try;;
18019esac
18020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18021 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018023 grep -v '^ *+' conftest.er1 >conftest.err
18024 rm -f conftest.er1
18025 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018027 (exit $ac_status); } && {
18028 test -z "$ac_c_werror_flag" ||
18029 test ! -s conftest.err
18030 } && test -s conftest$ac_exeext &&
18031 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018032 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018033else
Martin v. Löwis11437992002-04-12 09:54:03 +000018034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018035sed 's/^/| /' conftest.$ac_ext >&5
18036
Martin v. Löwiseba40652007-08-30 20:10:57 +000018037 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018039
18040rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018041 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018042LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018044{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18045echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018046if test $ac_cv_lib_util_forkpty = yes; then
18047 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018048#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018049_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018050 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018051else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018052 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18053echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018054if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18055 echo $ECHO_N "(cached) $ECHO_C" >&6
18056else
18057 ac_check_lib_save_LIBS=$LIBS
18058LIBS="-lbsd $LIBS"
18059cat >conftest.$ac_ext <<_ACEOF
18060/* confdefs.h. */
18061_ACEOF
18062cat confdefs.h >>conftest.$ac_ext
18063cat >>conftest.$ac_ext <<_ACEOF
18064/* end confdefs.h. */
18065
Martin v. Löwiseba40652007-08-30 20:10:57 +000018066/* Override any GCC internal prototype to avoid an error.
18067 Use char because int might match the return type of a GCC
18068 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018069#ifdef __cplusplus
18070extern "C"
18071#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018072char forkpty ();
18073int
18074main ()
18075{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018076return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018077 ;
18078 return 0;
18079}
18080_ACEOF
18081rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018082if { (ac_try="$ac_link"
18083case "(($ac_try" in
18084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18085 *) ac_try_echo=$ac_try;;
18086esac
18087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18088 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018089 ac_status=$?
18090 grep -v '^ *+' conftest.er1 >conftest.err
18091 rm -f conftest.er1
18092 cat conftest.err >&5
18093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018094 (exit $ac_status); } && {
18095 test -z "$ac_c_werror_flag" ||
18096 test ! -s conftest.err
18097 } && test -s conftest$ac_exeext &&
18098 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018099 ac_cv_lib_bsd_forkpty=yes
18100else
18101 echo "$as_me: failed program was:" >&5
18102sed 's/^/| /' conftest.$ac_ext >&5
18103
Martin v. Löwiseba40652007-08-30 20:10:57 +000018104 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018106
18107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018108 conftest$ac_exeext conftest.$ac_ext
18109LIBS=$ac_check_lib_save_LIBS
18110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018111{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18112echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018113if test $ac_cv_lib_bsd_forkpty = yes; then
18114 cat >>confdefs.h <<\_ACEOF
18115#define HAVE_FORKPTY 1
18116_ACEOF
18117 LIBS="$LIBS -lbsd"
18118fi
18119
18120
18121fi
18122
Fred Drake8cef4cf2000-06-28 16:40:38 +000018123
18124fi
18125done
18126
Jack Jansendd19cf82001-12-06 22:36:17 +000018127
Brett Cannonaa5778d2008-03-18 04:09:00 +000018128# Stuff for expat.
18129
18130for ac_func in memmove
18131do
18132as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18133{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18134echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18135if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18136 echo $ECHO_N "(cached) $ECHO_C" >&6
18137else
18138 cat >conftest.$ac_ext <<_ACEOF
18139/* confdefs.h. */
18140_ACEOF
18141cat confdefs.h >>conftest.$ac_ext
18142cat >>conftest.$ac_ext <<_ACEOF
18143/* end confdefs.h. */
18144/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18145 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18146#define $ac_func innocuous_$ac_func
18147
18148/* System header to define __stub macros and hopefully few prototypes,
18149 which can conflict with char $ac_func (); below.
18150 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18151 <limits.h> exists even on freestanding compilers. */
18152
18153#ifdef __STDC__
18154# include <limits.h>
18155#else
18156# include <assert.h>
18157#endif
18158
18159#undef $ac_func
18160
18161/* Override any GCC internal prototype to avoid an error.
18162 Use char because int might match the return type of a GCC
18163 builtin and then its argument prototype would still apply. */
18164#ifdef __cplusplus
18165extern "C"
18166#endif
18167char $ac_func ();
18168/* The GNU C library defines this for functions which it implements
18169 to always fail with ENOSYS. Some functions are actually named
18170 something starting with __ and the normal name is an alias. */
18171#if defined __stub_$ac_func || defined __stub___$ac_func
18172choke me
18173#endif
18174
18175int
18176main ()
18177{
18178return $ac_func ();
18179 ;
18180 return 0;
18181}
18182_ACEOF
18183rm -f conftest.$ac_objext conftest$ac_exeext
18184if { (ac_try="$ac_link"
18185case "(($ac_try" in
18186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18187 *) ac_try_echo=$ac_try;;
18188esac
18189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18190 (eval "$ac_link") 2>conftest.er1
18191 ac_status=$?
18192 grep -v '^ *+' conftest.er1 >conftest.err
18193 rm -f conftest.er1
18194 cat conftest.err >&5
18195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18196 (exit $ac_status); } && {
18197 test -z "$ac_c_werror_flag" ||
18198 test ! -s conftest.err
18199 } && test -s conftest$ac_exeext &&
18200 $as_test_x conftest$ac_exeext; then
18201 eval "$as_ac_var=yes"
18202else
18203 echo "$as_me: failed program was:" >&5
18204sed 's/^/| /' conftest.$ac_ext >&5
18205
18206 eval "$as_ac_var=no"
18207fi
18208
18209rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18210 conftest$ac_exeext conftest.$ac_ext
18211fi
18212ac_res=`eval echo '${'$as_ac_var'}'`
18213 { echo "$as_me:$LINENO: result: $ac_res" >&5
18214echo "${ECHO_T}$ac_res" >&6; }
18215if test `eval echo '${'$as_ac_var'}'` = yes; then
18216 cat >>confdefs.h <<_ACEOF
18217#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18218_ACEOF
18219
18220fi
18221done
18222
18223
Michael W. Hudson54241132001-12-07 15:38:26 +000018224# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018225
18226
18227
18228
18229
18230
Fred Drake8cef4cf2000-06-28 16:40:38 +000018231for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18232do
Martin v. Löwis11437992002-04-12 09:54:03 +000018233as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018234{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18235echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18236if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018237 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018238else
Martin v. Löwis11437992002-04-12 09:54:03 +000018239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018240/* confdefs.h. */
18241_ACEOF
18242cat confdefs.h >>conftest.$ac_ext
18243cat >>conftest.$ac_ext <<_ACEOF
18244/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018245/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18246 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18247#define $ac_func innocuous_$ac_func
18248
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018249/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018250 which can conflict with char $ac_func (); below.
18251 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018252 <limits.h> exists even on freestanding compilers. */
18253
18254#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018255# include <limits.h>
18256#else
18257# include <assert.h>
18258#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018259
18260#undef $ac_func
18261
Martin v. Löwiseba40652007-08-30 20:10:57 +000018262/* Override any GCC internal prototype to avoid an error.
18263 Use char because int might match the return type of a GCC
18264 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018265#ifdef __cplusplus
18266extern "C"
18267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018268char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018269/* The GNU C library defines this for functions which it implements
18270 to always fail with ENOSYS. Some functions are actually named
18271 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018272#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018273choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018274#endif
18275
Skip Montanaro6dead952003-09-25 14:50:04 +000018276int
18277main ()
18278{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018279return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018280 ;
18281 return 0;
18282}
18283_ACEOF
18284rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018285if { (ac_try="$ac_link"
18286case "(($ac_try" in
18287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18288 *) ac_try_echo=$ac_try;;
18289esac
18290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18291 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018293 grep -v '^ *+' conftest.er1 >conftest.err
18294 rm -f conftest.er1
18295 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018297 (exit $ac_status); } && {
18298 test -z "$ac_c_werror_flag" ||
18299 test ! -s conftest.err
18300 } && test -s conftest$ac_exeext &&
18301 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018302 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018303else
Martin v. Löwis11437992002-04-12 09:54:03 +000018304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018305sed 's/^/| /' conftest.$ac_ext >&5
18306
Martin v. Löwiseba40652007-08-30 20:10:57 +000018307 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018309
18310rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018311 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018313ac_res=`eval echo '${'$as_ac_var'}'`
18314 { echo "$as_me:$LINENO: result: $ac_res" >&5
18315echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018316if test `eval echo '${'$as_ac_var'}'` = yes; then
18317 cat >>confdefs.h <<_ACEOF
18318#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18319_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018320
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018321fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018322done
18323
Michael W. Hudson54241132001-12-07 15:38:26 +000018324
Martin v. Löwis11437992002-04-12 09:54:03 +000018325
18326
18327
Brett Cannonaa5778d2008-03-18 04:09:00 +000018328for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018329do
Martin v. Löwis11437992002-04-12 09:54:03 +000018330as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018331{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18332echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18333if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018334 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018335else
Martin v. Löwis11437992002-04-12 09:54:03 +000018336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018337/* confdefs.h. */
18338_ACEOF
18339cat confdefs.h >>conftest.$ac_ext
18340cat >>conftest.$ac_ext <<_ACEOF
18341/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018342/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18343 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18344#define $ac_func innocuous_$ac_func
18345
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018346/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018347 which can conflict with char $ac_func (); below.
18348 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018349 <limits.h> exists even on freestanding compilers. */
18350
18351#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018352# include <limits.h>
18353#else
18354# include <assert.h>
18355#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018356
18357#undef $ac_func
18358
Martin v. Löwiseba40652007-08-30 20:10:57 +000018359/* Override any GCC internal prototype to avoid an error.
18360 Use char because int might match the return type of a GCC
18361 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018362#ifdef __cplusplus
18363extern "C"
18364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018365char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018366/* The GNU C library defines this for functions which it implements
18367 to always fail with ENOSYS. Some functions are actually named
18368 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018369#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018370choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018371#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018372
Skip Montanaro6dead952003-09-25 14:50:04 +000018373int
18374main ()
18375{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018376return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018377 ;
18378 return 0;
18379}
18380_ACEOF
18381rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018382if { (ac_try="$ac_link"
18383case "(($ac_try" in
18384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18385 *) ac_try_echo=$ac_try;;
18386esac
18387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18388 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018390 grep -v '^ *+' conftest.er1 >conftest.err
18391 rm -f conftest.er1
18392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018394 (exit $ac_status); } && {
18395 test -z "$ac_c_werror_flag" ||
18396 test ! -s conftest.err
18397 } && test -s conftest$ac_exeext &&
18398 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018399 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018400else
Martin v. Löwis11437992002-04-12 09:54:03 +000018401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018402sed 's/^/| /' conftest.$ac_ext >&5
18403
Martin v. Löwiseba40652007-08-30 20:10:57 +000018404 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018406
18407rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018408 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018410ac_res=`eval echo '${'$as_ac_var'}'`
18411 { echo "$as_me:$LINENO: result: $ac_res" >&5
18412echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018413if test `eval echo '${'$as_ac_var'}'` = yes; then
18414 cat >>confdefs.h <<_ACEOF
18415#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18416_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018417
Martin v. Löwis1142de32002-03-29 16:28:31 +000018418else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018419 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018420 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018421 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18422 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018423esac
18424
Martin v. Löwis1142de32002-03-29 16:28:31 +000018425fi
18426done
18427
18428
Martin v. Löwis11437992002-04-12 09:54:03 +000018429
Martin v. Löwis1142de32002-03-29 16:28:31 +000018430for ac_func in getpgrp
18431do
Martin v. Löwis11437992002-04-12 09:54:03 +000018432as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018433{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18434echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18435if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018436 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018437else
Martin v. Löwis11437992002-04-12 09:54:03 +000018438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018439/* confdefs.h. */
18440_ACEOF
18441cat confdefs.h >>conftest.$ac_ext
18442cat >>conftest.$ac_ext <<_ACEOF
18443/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018444/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18445 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18446#define $ac_func innocuous_$ac_func
18447
Martin v. Löwis1142de32002-03-29 16:28:31 +000018448/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018449 which can conflict with char $ac_func (); below.
18450 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018451 <limits.h> exists even on freestanding compilers. */
18452
18453#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018454# include <limits.h>
18455#else
18456# include <assert.h>
18457#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018458
18459#undef $ac_func
18460
Martin v. Löwiseba40652007-08-30 20:10:57 +000018461/* Override any GCC internal prototype to avoid an error.
18462 Use char because int might match the return type of a GCC
18463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018464#ifdef __cplusplus
18465extern "C"
18466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018467char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018468/* The GNU C library defines this for functions which it implements
18469 to always fail with ENOSYS. Some functions are actually named
18470 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018471#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018472choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018473#endif
18474
Skip Montanaro6dead952003-09-25 14:50:04 +000018475int
18476main ()
18477{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018478return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018479 ;
18480 return 0;
18481}
18482_ACEOF
18483rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018484if { (ac_try="$ac_link"
18485case "(($ac_try" in
18486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18487 *) ac_try_echo=$ac_try;;
18488esac
18489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18490 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018492 grep -v '^ *+' conftest.er1 >conftest.err
18493 rm -f conftest.er1
18494 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018496 (exit $ac_status); } && {
18497 test -z "$ac_c_werror_flag" ||
18498 test ! -s conftest.err
18499 } && test -s conftest$ac_exeext &&
18500 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018501 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018502else
Martin v. Löwis11437992002-04-12 09:54:03 +000018503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018504sed 's/^/| /' conftest.$ac_ext >&5
18505
Martin v. Löwiseba40652007-08-30 20:10:57 +000018506 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018507fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018508
18509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018510 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018512ac_res=`eval echo '${'$as_ac_var'}'`
18513 { echo "$as_me:$LINENO: result: $ac_res" >&5
18514echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018515if test `eval echo '${'$as_ac_var'}'` = yes; then
18516 cat >>confdefs.h <<_ACEOF
18517#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18518_ACEOF
18519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018520/* confdefs.h. */
18521_ACEOF
18522cat confdefs.h >>conftest.$ac_ext
18523cat >>conftest.$ac_ext <<_ACEOF
18524/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018525#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018526int
18527main ()
18528{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018529getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018530 ;
18531 return 0;
18532}
18533_ACEOF
18534rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018535if { (ac_try="$ac_compile"
18536case "(($ac_try" in
18537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18538 *) ac_try_echo=$ac_try;;
18539esac
18540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018543 grep -v '^ *+' conftest.er1 >conftest.err
18544 rm -f conftest.er1
18545 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018547 (exit $ac_status); } && {
18548 test -z "$ac_c_werror_flag" ||
18549 test ! -s conftest.err
18550 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018551
18552cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018553#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018554_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018555
Martin v. Löwis11437992002-04-12 09:54:03 +000018556
Guido van Rossumf78abae1997-01-21 22:02:36 +000018557else
Martin v. Löwis11437992002-04-12 09:54:03 +000018558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018559sed 's/^/| /' conftest.$ac_ext >&5
18560
Martin v. Löwiseba40652007-08-30 20:10:57 +000018561
Guido van Rossum627b2d71993-12-24 10:39:16 +000018562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018563
18564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018565
Guido van Rossum627b2d71993-12-24 10:39:16 +000018566fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018567done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018568
Jack Jansen150753c2003-03-29 22:07:47 +000018569
18570for ac_func in setpgrp
18571do
18572as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018573{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18574echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18575if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018576 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018577else
Martin v. Löwis11437992002-04-12 09:54:03 +000018578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018579/* confdefs.h. */
18580_ACEOF
18581cat confdefs.h >>conftest.$ac_ext
18582cat >>conftest.$ac_ext <<_ACEOF
18583/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018584/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18585 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18586#define $ac_func innocuous_$ac_func
18587
Jack Jansen150753c2003-03-29 22:07:47 +000018588/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018589 which can conflict with char $ac_func (); below.
18590 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018591 <limits.h> exists even on freestanding compilers. */
18592
18593#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018594# include <limits.h>
18595#else
18596# include <assert.h>
18597#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018598
18599#undef $ac_func
18600
Martin v. Löwiseba40652007-08-30 20:10:57 +000018601/* Override any GCC internal prototype to avoid an error.
18602 Use char because int might match the return type of a GCC
18603 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018604#ifdef __cplusplus
18605extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018606#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018607char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018608/* The GNU C library defines this for functions which it implements
18609 to always fail with ENOSYS. Some functions are actually named
18610 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018611#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018612choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018613#endif
18614
Skip Montanaro6dead952003-09-25 14:50:04 +000018615int
18616main ()
18617{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018618return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018619 ;
18620 return 0;
18621}
18622_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018623rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018624if { (ac_try="$ac_link"
18625case "(($ac_try" in
18626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18627 *) ac_try_echo=$ac_try;;
18628esac
18629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18630 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018632 grep -v '^ *+' conftest.er1 >conftest.err
18633 rm -f conftest.er1
18634 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018636 (exit $ac_status); } && {
18637 test -z "$ac_c_werror_flag" ||
18638 test ! -s conftest.err
18639 } && test -s conftest$ac_exeext &&
18640 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018641 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018642else
Jack Jansen150753c2003-03-29 22:07:47 +000018643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018644sed 's/^/| /' conftest.$ac_ext >&5
18645
Martin v. Löwiseba40652007-08-30 20:10:57 +000018646 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018648
18649rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018650 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018652ac_res=`eval echo '${'$as_ac_var'}'`
18653 { echo "$as_me:$LINENO: result: $ac_res" >&5
18654echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018655if test `eval echo '${'$as_ac_var'}'` = yes; then
18656 cat >>confdefs.h <<_ACEOF
18657#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18658_ACEOF
18659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018660/* confdefs.h. */
18661_ACEOF
18662cat confdefs.h >>conftest.$ac_ext
18663cat >>conftest.$ac_ext <<_ACEOF
18664/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018665#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018666int
18667main ()
18668{
18669setpgrp(0,0);
18670 ;
18671 return 0;
18672}
18673_ACEOF
18674rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018675if { (ac_try="$ac_compile"
18676case "(($ac_try" in
18677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18678 *) ac_try_echo=$ac_try;;
18679esac
18680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18681 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018683 grep -v '^ *+' conftest.er1 >conftest.err
18684 rm -f conftest.er1
18685 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018687 (exit $ac_status); } && {
18688 test -z "$ac_c_werror_flag" ||
18689 test ! -s conftest.err
18690 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018691
18692cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018693#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018694_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018695
Jack Jansen150753c2003-03-29 22:07:47 +000018696
18697else
18698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018699sed 's/^/| /' conftest.$ac_ext >&5
18700
Martin v. Löwiseba40652007-08-30 20:10:57 +000018701
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018703
18704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018705
18706fi
18707done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018708
Martin v. Löwis11437992002-04-12 09:54:03 +000018709
Thomas Wouters3a584202000-08-05 23:28:51 +000018710for ac_func in gettimeofday
18711do
Martin v. Löwis11437992002-04-12 09:54:03 +000018712as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018713{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18714echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18715if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018716 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018717else
Martin v. Löwis11437992002-04-12 09:54:03 +000018718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018719/* confdefs.h. */
18720_ACEOF
18721cat confdefs.h >>conftest.$ac_ext
18722cat >>conftest.$ac_ext <<_ACEOF
18723/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018724/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18725 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18726#define $ac_func innocuous_$ac_func
18727
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018728/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018729 which can conflict with char $ac_func (); below.
18730 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018731 <limits.h> exists even on freestanding compilers. */
18732
18733#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018734# include <limits.h>
18735#else
18736# include <assert.h>
18737#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018738
18739#undef $ac_func
18740
Martin v. Löwiseba40652007-08-30 20:10:57 +000018741/* Override any GCC internal prototype to avoid an error.
18742 Use char because int might match the return type of a GCC
18743 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018744#ifdef __cplusplus
18745extern "C"
18746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018747char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018748/* The GNU C library defines this for functions which it implements
18749 to always fail with ENOSYS. Some functions are actually named
18750 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018751#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018752choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018753#endif
18754
Skip Montanaro6dead952003-09-25 14:50:04 +000018755int
18756main ()
18757{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018758return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018759 ;
18760 return 0;
18761}
18762_ACEOF
18763rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018764if { (ac_try="$ac_link"
18765case "(($ac_try" in
18766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18767 *) ac_try_echo=$ac_try;;
18768esac
18769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18770 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018772 grep -v '^ *+' conftest.er1 >conftest.err
18773 rm -f conftest.er1
18774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018776 (exit $ac_status); } && {
18777 test -z "$ac_c_werror_flag" ||
18778 test ! -s conftest.err
18779 } && test -s conftest$ac_exeext &&
18780 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018781 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018782else
Martin v. Löwis11437992002-04-12 09:54:03 +000018783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018784sed 's/^/| /' conftest.$ac_ext >&5
18785
Martin v. Löwiseba40652007-08-30 20:10:57 +000018786 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018788
18789rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018790 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018792ac_res=`eval echo '${'$as_ac_var'}'`
18793 { echo "$as_me:$LINENO: result: $ac_res" >&5
18794echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018795if test `eval echo '${'$as_ac_var'}'` = yes; then
18796 cat >>confdefs.h <<_ACEOF
18797#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18798_ACEOF
18799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018800/* confdefs.h. */
18801_ACEOF
18802cat confdefs.h >>conftest.$ac_ext
18803cat >>conftest.$ac_ext <<_ACEOF
18804/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018805#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018806int
18807main ()
18808{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018809gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018810 ;
18811 return 0;
18812}
18813_ACEOF
18814rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018815if { (ac_try="$ac_compile"
18816case "(($ac_try" in
18817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18818 *) ac_try_echo=$ac_try;;
18819esac
18820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018823 grep -v '^ *+' conftest.er1 >conftest.err
18824 rm -f conftest.er1
18825 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018827 (exit $ac_status); } && {
18828 test -z "$ac_c_werror_flag" ||
18829 test ! -s conftest.err
18830 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018831 :
18832else
Martin v. Löwis11437992002-04-12 09:54:03 +000018833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018834sed 's/^/| /' conftest.$ac_ext >&5
18835
Martin v. Löwis11437992002-04-12 09:54:03 +000018836
18837cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018838#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018839_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018840
Martin v. Löwis11437992002-04-12 09:54:03 +000018841
Guido van Rossum627b2d71993-12-24 10:39:16 +000018842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018843
18844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018845
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018846fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018847done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018848
Michael W. Hudson54241132001-12-07 15:38:26 +000018849
Martin v. Löwiseba40652007-08-30 20:10:57 +000018850{ echo "$as_me:$LINENO: checking for major" >&5
18851echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018853/* confdefs.h. */
18854_ACEOF
18855cat confdefs.h >>conftest.$ac_ext
18856cat >>conftest.$ac_ext <<_ACEOF
18857/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018858
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018859#if defined(MAJOR_IN_MKDEV)
18860#include <sys/mkdev.h>
18861#elif defined(MAJOR_IN_SYSMACROS)
18862#include <sys/sysmacros.h>
18863#else
18864#include <sys/types.h>
18865#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018866
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018867int
18868main ()
18869{
18870
18871 makedev(major(0),minor(0));
18872
18873 ;
18874 return 0;
18875}
18876_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018877rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018878if { (ac_try="$ac_link"
18879case "(($ac_try" in
18880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18881 *) ac_try_echo=$ac_try;;
18882esac
18883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18884 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018886 grep -v '^ *+' conftest.er1 >conftest.err
18887 rm -f conftest.er1
18888 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018890 (exit $ac_status); } && {
18891 test -z "$ac_c_werror_flag" ||
18892 test ! -s conftest.err
18893 } && test -s conftest$ac_exeext &&
18894 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018895
18896
18897cat >>confdefs.h <<\_ACEOF
18898#define HAVE_DEVICE_MACROS 1
18899_ACEOF
18900
Martin v. Löwiseba40652007-08-30 20:10:57 +000018901 { echo "$as_me:$LINENO: result: yes" >&5
18902echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018903
18904else
18905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018906sed 's/^/| /' conftest.$ac_ext >&5
18907
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018908
Martin v. Löwiseba40652007-08-30 20:10:57 +000018909 { echo "$as_me:$LINENO: result: no" >&5
18910echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018911
18912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018913
18914rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018915 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018916
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018917# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018918# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018919{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18920echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018922/* confdefs.h. */
18923_ACEOF
18924cat confdefs.h >>conftest.$ac_ext
18925cat >>conftest.$ac_ext <<_ACEOF
18926/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018927
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018928#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018929#include <sys/socket.h>
18930#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018931#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018932
Martin v. Löwis11437992002-04-12 09:54:03 +000018933int
18934main ()
18935{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018936
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018937getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018938
Martin v. Löwis11437992002-04-12 09:54:03 +000018939 ;
18940 return 0;
18941}
18942_ACEOF
18943rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018944if { (ac_try="$ac_link"
18945case "(($ac_try" in
18946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18947 *) ac_try_echo=$ac_try;;
18948esac
18949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18950 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018952 grep -v '^ *+' conftest.er1 >conftest.err
18953 rm -f conftest.er1
18954 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018956 (exit $ac_status); } && {
18957 test -z "$ac_c_werror_flag" ||
18958 test ! -s conftest.err
18959 } && test -s conftest$ac_exeext &&
18960 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018961
Martin v. Löwiseba40652007-08-30 20:10:57 +000018962{ echo "$as_me:$LINENO: result: yes" >&5
18963echo "${ECHO_T}yes" >&6; }
18964{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18965echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018966if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018967 { echo "$as_me:$LINENO: result: buggy" >&5
18968echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018969buggygetaddrinfo=yes
18970else
Martin v. Löwis11437992002-04-12 09:54:03 +000018971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018972/* confdefs.h. */
18973_ACEOF
18974cat confdefs.h >>conftest.$ac_ext
18975cat >>conftest.$ac_ext <<_ACEOF
18976/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018977
18978#include <sys/types.h>
18979#include <netdb.h>
18980#include <string.h>
18981#include <sys/socket.h>
18982#include <netinet/in.h>
18983
18984main()
18985{
18986 int passive, gaierr, inet4 = 0, inet6 = 0;
18987 struct addrinfo hints, *ai, *aitop;
18988 char straddr[INET6_ADDRSTRLEN], strport[16];
18989
18990 for (passive = 0; passive <= 1; passive++) {
18991 memset(&hints, 0, sizeof(hints));
18992 hints.ai_family = AF_UNSPEC;
18993 hints.ai_flags = passive ? AI_PASSIVE : 0;
18994 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018995 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018996 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18997 (void)gai_strerror(gaierr);
18998 goto bad;
18999 }
19000 for (ai = aitop; ai; ai = ai->ai_next) {
19001 if (ai->ai_addr == NULL ||
19002 ai->ai_addrlen == 0 ||
19003 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19004 straddr, sizeof(straddr), strport, sizeof(strport),
19005 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19006 goto bad;
19007 }
19008 switch (ai->ai_family) {
19009 case AF_INET:
19010 if (strcmp(strport, "54321") != 0) {
19011 goto bad;
19012 }
19013 if (passive) {
19014 if (strcmp(straddr, "0.0.0.0") != 0) {
19015 goto bad;
19016 }
19017 } else {
19018 if (strcmp(straddr, "127.0.0.1") != 0) {
19019 goto bad;
19020 }
19021 }
19022 inet4++;
19023 break;
19024 case AF_INET6:
19025 if (strcmp(strport, "54321") != 0) {
19026 goto bad;
19027 }
19028 if (passive) {
19029 if (strcmp(straddr, "::") != 0) {
19030 goto bad;
19031 }
19032 } else {
19033 if (strcmp(straddr, "::1") != 0) {
19034 goto bad;
19035 }
19036 }
19037 inet6++;
19038 break;
19039 case AF_UNSPEC:
19040 goto bad;
19041 break;
19042 default:
19043 /* another family support? */
19044 break;
19045 }
19046 }
19047 }
19048
19049 if (!(inet4 == 0 || inet4 == 2))
19050 goto bad;
19051 if (!(inet6 == 0 || inet6 == 2))
19052 goto bad;
19053
19054 if (aitop)
19055 freeaddrinfo(aitop);
19056 exit(0);
19057
19058 bad:
19059 if (aitop)
19060 freeaddrinfo(aitop);
19061 exit(1);
19062}
19063
Martin v. Löwis11437992002-04-12 09:54:03 +000019064_ACEOF
19065rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019066if { (ac_try="$ac_link"
19067case "(($ac_try" in
19068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19069 *) ac_try_echo=$ac_try;;
19070esac
19071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19072 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019073 ac_status=$?
19074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19075 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000019076 { (case "(($ac_try" in
19077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19078 *) ac_try_echo=$ac_try;;
19079esac
19080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19081 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019082 ac_status=$?
19083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19084 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019085 { echo "$as_me:$LINENO: result: good" >&5
19086echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019087buggygetaddrinfo=no
19088else
Martin v. Löwis11437992002-04-12 09:54:03 +000019089 echo "$as_me: program exited with status $ac_status" >&5
19090echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019091sed 's/^/| /' conftest.$ac_ext >&5
19092
Martin v. Löwis11437992002-04-12 09:54:03 +000019093( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000019094{ echo "$as_me:$LINENO: result: buggy" >&5
19095echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019096buggygetaddrinfo=yes
19097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019098rm -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 +000019099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019100
19101
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019102else
Martin v. Löwis11437992002-04-12 09:54:03 +000019103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019104sed 's/^/| /' conftest.$ac_ext >&5
19105
Martin v. Löwis11437992002-04-12 09:54:03 +000019106
Martin v. Löwiseba40652007-08-30 20:10:57 +000019107{ echo "$as_me:$LINENO: result: no" >&5
19108echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019109buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019110
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019112
19113rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019114 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019115
19116if test "$buggygetaddrinfo" = "yes"; then
19117 if test "$ipv6" = "yes"; then
19118 echo 'Fatal: You must get working getaddrinfo() function.'
19119 echo ' or you can specify "--disable-ipv6"'.
19120 exit 1
19121 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019122else
Martin v. Löwis11437992002-04-12 09:54:03 +000019123
19124cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019125#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019126_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019127
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019129
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019130for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019131do
Martin v. Löwis11437992002-04-12 09:54:03 +000019132as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000019133{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19134echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19135if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019136 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019137else
Martin v. Löwis11437992002-04-12 09:54:03 +000019138 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019139/* confdefs.h. */
19140_ACEOF
19141cat confdefs.h >>conftest.$ac_ext
19142cat >>conftest.$ac_ext <<_ACEOF
19143/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019144/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19145 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19146#define $ac_func innocuous_$ac_func
19147
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019148/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019149 which can conflict with char $ac_func (); below.
19150 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019151 <limits.h> exists even on freestanding compilers. */
19152
19153#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019154# include <limits.h>
19155#else
19156# include <assert.h>
19157#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019158
19159#undef $ac_func
19160
Martin v. Löwiseba40652007-08-30 20:10:57 +000019161/* Override any GCC internal prototype to avoid an error.
19162 Use char because int might match the return type of a GCC
19163 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019164#ifdef __cplusplus
19165extern "C"
19166#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019167char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019168/* The GNU C library defines this for functions which it implements
19169 to always fail with ENOSYS. Some functions are actually named
19170 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019171#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019172choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019173#endif
19174
Skip Montanaro6dead952003-09-25 14:50:04 +000019175int
19176main ()
19177{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019178return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019179 ;
19180 return 0;
19181}
19182_ACEOF
19183rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019184if { (ac_try="$ac_link"
19185case "(($ac_try" in
19186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19187 *) ac_try_echo=$ac_try;;
19188esac
19189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19190 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019192 grep -v '^ *+' conftest.er1 >conftest.err
19193 rm -f conftest.er1
19194 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019196 (exit $ac_status); } && {
19197 test -z "$ac_c_werror_flag" ||
19198 test ! -s conftest.err
19199 } && test -s conftest$ac_exeext &&
19200 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019201 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019202else
Martin v. Löwis11437992002-04-12 09:54:03 +000019203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019204sed 's/^/| /' conftest.$ac_ext >&5
19205
Martin v. Löwiseba40652007-08-30 20:10:57 +000019206 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019208
19209rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019210 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019212ac_res=`eval echo '${'$as_ac_var'}'`
19213 { echo "$as_me:$LINENO: result: $ac_res" >&5
19214echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019215if test `eval echo '${'$as_ac_var'}'` = yes; then
19216 cat >>confdefs.h <<_ACEOF
19217#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19218_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019219
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019220fi
19221done
19222
Michael W. Hudson54241132001-12-07 15:38:26 +000019223
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019224# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019225{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19226echo $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 +000019227if test "${ac_cv_header_time+set}" = set; then
19228 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019229else
Martin v. Löwis11437992002-04-12 09:54:03 +000019230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019231/* confdefs.h. */
19232_ACEOF
19233cat confdefs.h >>conftest.$ac_ext
19234cat >>conftest.$ac_ext <<_ACEOF
19235/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019236#include <sys/types.h>
19237#include <sys/time.h>
19238#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019239
Martin v. Löwis11437992002-04-12 09:54:03 +000019240int
19241main ()
19242{
19243if ((struct tm *) 0)
19244return 0;
19245 ;
19246 return 0;
19247}
19248_ACEOF
19249rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019250if { (ac_try="$ac_compile"
19251case "(($ac_try" in
19252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19253 *) ac_try_echo=$ac_try;;
19254esac
19255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019258 grep -v '^ *+' conftest.er1 >conftest.err
19259 rm -f conftest.er1
19260 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019262 (exit $ac_status); } && {
19263 test -z "$ac_c_werror_flag" ||
19264 test ! -s conftest.err
19265 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019266 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019267else
Martin v. Löwis11437992002-04-12 09:54:03 +000019268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019269sed 's/^/| /' conftest.$ac_ext >&5
19270
Martin v. Löwiseba40652007-08-30 20:10:57 +000019271 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019273
19274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019276{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19277echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019278if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019279
19280cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019281#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019282_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019283
19284fi
19285
Martin v. Löwiseba40652007-08-30 20:10:57 +000019286{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19287echo $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 +000019288if test "${ac_cv_struct_tm+set}" = set; then
19289 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019290else
Martin v. Löwis11437992002-04-12 09:54:03 +000019291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019292/* confdefs.h. */
19293_ACEOF
19294cat confdefs.h >>conftest.$ac_ext
19295cat >>conftest.$ac_ext <<_ACEOF
19296/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019297#include <sys/types.h>
19298#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019299
Martin v. Löwis11437992002-04-12 09:54:03 +000019300int
19301main ()
19302{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019303struct tm tm;
19304 int *p = &tm.tm_sec;
19305 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019306 ;
19307 return 0;
19308}
19309_ACEOF
19310rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019311if { (ac_try="$ac_compile"
19312case "(($ac_try" in
19313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19314 *) ac_try_echo=$ac_try;;
19315esac
19316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019319 grep -v '^ *+' conftest.er1 >conftest.err
19320 rm -f conftest.er1
19321 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019323 (exit $ac_status); } && {
19324 test -z "$ac_c_werror_flag" ||
19325 test ! -s conftest.err
19326 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019327 ac_cv_struct_tm=time.h
19328else
Martin v. Löwis11437992002-04-12 09:54:03 +000019329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019330sed 's/^/| /' conftest.$ac_ext >&5
19331
Martin v. Löwiseba40652007-08-30 20:10:57 +000019332 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019334
19335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019337{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19338echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019339if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019340
19341cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019342#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019343_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019344
19345fi
19346
Martin v. Löwiseba40652007-08-30 20:10:57 +000019347{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19348echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019349if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19350 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019351else
Martin v. Löwis11437992002-04-12 09:54:03 +000019352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019353/* confdefs.h. */
19354_ACEOF
19355cat confdefs.h >>conftest.$ac_ext
19356cat >>conftest.$ac_ext <<_ACEOF
19357/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019358#include <sys/types.h>
19359#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019360
19361
Martin v. Löwis11437992002-04-12 09:54:03 +000019362int
19363main ()
19364{
19365static struct tm ac_aggr;
19366if (ac_aggr.tm_zone)
19367return 0;
19368 ;
19369 return 0;
19370}
19371_ACEOF
19372rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019373if { (ac_try="$ac_compile"
19374case "(($ac_try" in
19375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19376 *) ac_try_echo=$ac_try;;
19377esac
19378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19379 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019381 grep -v '^ *+' conftest.er1 >conftest.err
19382 rm -f conftest.er1
19383 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019385 (exit $ac_status); } && {
19386 test -z "$ac_c_werror_flag" ||
19387 test ! -s conftest.err
19388 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019389 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019390else
Martin v. Löwis11437992002-04-12 09:54:03 +000019391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019392sed 's/^/| /' conftest.$ac_ext >&5
19393
Martin v. Löwiseba40652007-08-30 20:10:57 +000019394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019395/* confdefs.h. */
19396_ACEOF
19397cat confdefs.h >>conftest.$ac_ext
19398cat >>conftest.$ac_ext <<_ACEOF
19399/* end confdefs.h. */
19400#include <sys/types.h>
19401#include <$ac_cv_struct_tm>
19402
19403
19404int
19405main ()
19406{
19407static struct tm ac_aggr;
19408if (sizeof ac_aggr.tm_zone)
19409return 0;
19410 ;
19411 return 0;
19412}
19413_ACEOF
19414rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019415if { (ac_try="$ac_compile"
19416case "(($ac_try" in
19417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19418 *) ac_try_echo=$ac_try;;
19419esac
19420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19421 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019423 grep -v '^ *+' conftest.er1 >conftest.err
19424 rm -f conftest.er1
19425 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019427 (exit $ac_status); } && {
19428 test -z "$ac_c_werror_flag" ||
19429 test ! -s conftest.err
19430 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019431 ac_cv_member_struct_tm_tm_zone=yes
19432else
19433 echo "$as_me: failed program was:" >&5
19434sed 's/^/| /' conftest.$ac_ext >&5
19435
Martin v. Löwiseba40652007-08-30 20:10:57 +000019436 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019438
19439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019441
19442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019444{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19445echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019446if test $ac_cv_member_struct_tm_tm_zone = yes; then
19447
19448cat >>confdefs.h <<_ACEOF
19449#define HAVE_STRUCT_TM_TM_ZONE 1
19450_ACEOF
19451
19452
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019453fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019454
Martin v. Löwis11437992002-04-12 09:54:03 +000019455if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19456
19457cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019458#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019459_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019460
19461else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019462 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19463echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19464if test "${ac_cv_have_decl_tzname+set}" = set; then
19465 echo $ECHO_N "(cached) $ECHO_C" >&6
19466else
19467 cat >conftest.$ac_ext <<_ACEOF
19468/* confdefs.h. */
19469_ACEOF
19470cat confdefs.h >>conftest.$ac_ext
19471cat >>conftest.$ac_ext <<_ACEOF
19472/* end confdefs.h. */
19473#include <time.h>
19474
19475int
19476main ()
19477{
19478#ifndef tzname
19479 (void) tzname;
19480#endif
19481
19482 ;
19483 return 0;
19484}
19485_ACEOF
19486rm -f conftest.$ac_objext
19487if { (ac_try="$ac_compile"
19488case "(($ac_try" in
19489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19490 *) ac_try_echo=$ac_try;;
19491esac
19492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19493 (eval "$ac_compile") 2>conftest.er1
19494 ac_status=$?
19495 grep -v '^ *+' conftest.er1 >conftest.err
19496 rm -f conftest.er1
19497 cat conftest.err >&5
19498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19499 (exit $ac_status); } && {
19500 test -z "$ac_c_werror_flag" ||
19501 test ! -s conftest.err
19502 } && test -s conftest.$ac_objext; then
19503 ac_cv_have_decl_tzname=yes
19504else
19505 echo "$as_me: failed program was:" >&5
19506sed 's/^/| /' conftest.$ac_ext >&5
19507
19508 ac_cv_have_decl_tzname=no
19509fi
19510
19511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19512fi
19513{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19514echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19515if test $ac_cv_have_decl_tzname = yes; then
19516
19517cat >>confdefs.h <<_ACEOF
19518#define HAVE_DECL_TZNAME 1
19519_ACEOF
19520
19521
19522else
19523 cat >>confdefs.h <<_ACEOF
19524#define HAVE_DECL_TZNAME 0
19525_ACEOF
19526
19527
19528fi
19529
19530
19531 { echo "$as_me:$LINENO: checking for tzname" >&5
19532echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019533if test "${ac_cv_var_tzname+set}" = set; then
19534 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019535else
Martin v. Löwis11437992002-04-12 09:54:03 +000019536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019537/* confdefs.h. */
19538_ACEOF
19539cat confdefs.h >>conftest.$ac_ext
19540cat >>conftest.$ac_ext <<_ACEOF
19541/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019542#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019543#if !HAVE_DECL_TZNAME
19544extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019546
Martin v. Löwis11437992002-04-12 09:54:03 +000019547int
19548main ()
19549{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019550return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019551 ;
19552 return 0;
19553}
19554_ACEOF
19555rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019556if { (ac_try="$ac_link"
19557case "(($ac_try" in
19558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19559 *) ac_try_echo=$ac_try;;
19560esac
19561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19562 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019564 grep -v '^ *+' conftest.er1 >conftest.err
19565 rm -f conftest.er1
19566 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019568 (exit $ac_status); } && {
19569 test -z "$ac_c_werror_flag" ||
19570 test ! -s conftest.err
19571 } && test -s conftest$ac_exeext &&
19572 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019573 ac_cv_var_tzname=yes
19574else
Martin v. Löwis11437992002-04-12 09:54:03 +000019575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019576sed 's/^/| /' conftest.$ac_ext >&5
19577
Martin v. Löwiseba40652007-08-30 20:10:57 +000019578 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019580
19581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019582 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019584{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19585echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019586 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019587
19588cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019589#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019590_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019591
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019592 fi
19593fi
19594
Martin v. Löwiseba40652007-08-30 20:10:57 +000019595{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19596echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019597if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19598 echo $ECHO_N "(cached) $ECHO_C" >&6
19599else
19600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019601/* confdefs.h. */
19602_ACEOF
19603cat confdefs.h >>conftest.$ac_ext
19604cat >>conftest.$ac_ext <<_ACEOF
19605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019606$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019607int
19608main ()
19609{
19610static struct stat ac_aggr;
19611if (ac_aggr.st_rdev)
19612return 0;
19613 ;
19614 return 0;
19615}
19616_ACEOF
19617rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019618if { (ac_try="$ac_compile"
19619case "(($ac_try" in
19620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19621 *) ac_try_echo=$ac_try;;
19622esac
19623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19624 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019626 grep -v '^ *+' conftest.er1 >conftest.err
19627 rm -f conftest.er1
19628 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019630 (exit $ac_status); } && {
19631 test -z "$ac_c_werror_flag" ||
19632 test ! -s conftest.err
19633 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 ac_cv_member_struct_stat_st_rdev=yes
19635else
19636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019637sed 's/^/| /' conftest.$ac_ext >&5
19638
Martin v. Löwiseba40652007-08-30 20:10:57 +000019639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019640/* confdefs.h. */
19641_ACEOF
19642cat confdefs.h >>conftest.$ac_ext
19643cat >>conftest.$ac_ext <<_ACEOF
19644/* end confdefs.h. */
19645$ac_includes_default
19646int
19647main ()
19648{
19649static struct stat ac_aggr;
19650if (sizeof ac_aggr.st_rdev)
19651return 0;
19652 ;
19653 return 0;
19654}
19655_ACEOF
19656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019657if { (ac_try="$ac_compile"
19658case "(($ac_try" in
19659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19660 *) ac_try_echo=$ac_try;;
19661esac
19662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19663 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019665 grep -v '^ *+' conftest.er1 >conftest.err
19666 rm -f conftest.er1
19667 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019669 (exit $ac_status); } && {
19670 test -z "$ac_c_werror_flag" ||
19671 test ! -s conftest.err
19672 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019673 ac_cv_member_struct_stat_st_rdev=yes
19674else
19675 echo "$as_me: failed program was:" >&5
19676sed 's/^/| /' conftest.$ac_ext >&5
19677
Martin v. Löwiseba40652007-08-30 20:10:57 +000019678 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019680
19681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019683
19684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019686{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19687echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019688if test $ac_cv_member_struct_stat_st_rdev = yes; then
19689
19690cat >>confdefs.h <<_ACEOF
19691#define HAVE_STRUCT_STAT_ST_RDEV 1
19692_ACEOF
19693
19694
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019695fi
19696
Martin v. Löwiseba40652007-08-30 20:10:57 +000019697{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19698echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019699if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19700 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019701else
Martin v. Löwis11437992002-04-12 09:54:03 +000019702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019703/* confdefs.h. */
19704_ACEOF
19705cat confdefs.h >>conftest.$ac_ext
19706cat >>conftest.$ac_ext <<_ACEOF
19707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019708$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019709int
19710main ()
19711{
19712static struct stat ac_aggr;
19713if (ac_aggr.st_blksize)
19714return 0;
19715 ;
19716 return 0;
19717}
19718_ACEOF
19719rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019720if { (ac_try="$ac_compile"
19721case "(($ac_try" in
19722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19723 *) ac_try_echo=$ac_try;;
19724esac
19725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019728 grep -v '^ *+' conftest.er1 >conftest.err
19729 rm -f conftest.er1
19730 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019732 (exit $ac_status); } && {
19733 test -z "$ac_c_werror_flag" ||
19734 test ! -s conftest.err
19735 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019736 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019737else
Martin v. Löwis11437992002-04-12 09:54:03 +000019738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019739sed 's/^/| /' conftest.$ac_ext >&5
19740
Martin v. Löwiseba40652007-08-30 20:10:57 +000019741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019742/* confdefs.h. */
19743_ACEOF
19744cat confdefs.h >>conftest.$ac_ext
19745cat >>conftest.$ac_ext <<_ACEOF
19746/* end confdefs.h. */
19747$ac_includes_default
19748int
19749main ()
19750{
19751static struct stat ac_aggr;
19752if (sizeof ac_aggr.st_blksize)
19753return 0;
19754 ;
19755 return 0;
19756}
19757_ACEOF
19758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019759if { (ac_try="$ac_compile"
19760case "(($ac_try" in
19761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19762 *) ac_try_echo=$ac_try;;
19763esac
19764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19765 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019767 grep -v '^ *+' conftest.er1 >conftest.err
19768 rm -f conftest.er1
19769 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019771 (exit $ac_status); } && {
19772 test -z "$ac_c_werror_flag" ||
19773 test ! -s conftest.err
19774 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019775 ac_cv_member_struct_stat_st_blksize=yes
19776else
19777 echo "$as_me: failed program was:" >&5
19778sed 's/^/| /' conftest.$ac_ext >&5
19779
Martin v. Löwiseba40652007-08-30 20:10:57 +000019780 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019782
19783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019785
19786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019788{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19789echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019790if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019791
Martin v. Löwis11437992002-04-12 09:54:03 +000019792cat >>confdefs.h <<_ACEOF
19793#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19794_ACEOF
19795
19796
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019797fi
19798
Martin v. Löwiseba40652007-08-30 20:10:57 +000019799{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19800echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019801if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19802 echo $ECHO_N "(cached) $ECHO_C" >&6
19803else
19804 cat >conftest.$ac_ext <<_ACEOF
19805/* confdefs.h. */
19806_ACEOF
19807cat confdefs.h >>conftest.$ac_ext
19808cat >>conftest.$ac_ext <<_ACEOF
19809/* end confdefs.h. */
19810$ac_includes_default
19811int
19812main ()
19813{
19814static struct stat ac_aggr;
19815if (ac_aggr.st_flags)
19816return 0;
19817 ;
19818 return 0;
19819}
19820_ACEOF
19821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019822if { (ac_try="$ac_compile"
19823case "(($ac_try" in
19824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19825 *) ac_try_echo=$ac_try;;
19826esac
19827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19828 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019829 ac_status=$?
19830 grep -v '^ *+' conftest.er1 >conftest.err
19831 rm -f conftest.er1
19832 cat conftest.err >&5
19833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019834 (exit $ac_status); } && {
19835 test -z "$ac_c_werror_flag" ||
19836 test ! -s conftest.err
19837 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019838 ac_cv_member_struct_stat_st_flags=yes
19839else
19840 echo "$as_me: failed program was:" >&5
19841sed 's/^/| /' conftest.$ac_ext >&5
19842
Martin v. Löwiseba40652007-08-30 20:10:57 +000019843 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019844/* confdefs.h. */
19845_ACEOF
19846cat confdefs.h >>conftest.$ac_ext
19847cat >>conftest.$ac_ext <<_ACEOF
19848/* end confdefs.h. */
19849$ac_includes_default
19850int
19851main ()
19852{
19853static struct stat ac_aggr;
19854if (sizeof ac_aggr.st_flags)
19855return 0;
19856 ;
19857 return 0;
19858}
19859_ACEOF
19860rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019861if { (ac_try="$ac_compile"
19862case "(($ac_try" in
19863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19864 *) ac_try_echo=$ac_try;;
19865esac
19866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19867 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019868 ac_status=$?
19869 grep -v '^ *+' conftest.er1 >conftest.err
19870 rm -f conftest.er1
19871 cat conftest.err >&5
19872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019873 (exit $ac_status); } && {
19874 test -z "$ac_c_werror_flag" ||
19875 test ! -s conftest.err
19876 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019877 ac_cv_member_struct_stat_st_flags=yes
19878else
19879 echo "$as_me: failed program was:" >&5
19880sed 's/^/| /' conftest.$ac_ext >&5
19881
Martin v. Löwiseba40652007-08-30 20:10:57 +000019882 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019883fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019884
19885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019887
19888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019890{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19891echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019892if test $ac_cv_member_struct_stat_st_flags = yes; then
19893
19894cat >>confdefs.h <<_ACEOF
19895#define HAVE_STRUCT_STAT_ST_FLAGS 1
19896_ACEOF
19897
19898
19899fi
19900
Martin v. Löwiseba40652007-08-30 20:10:57 +000019901{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19902echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019903if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19904 echo $ECHO_N "(cached) $ECHO_C" >&6
19905else
19906 cat >conftest.$ac_ext <<_ACEOF
19907/* confdefs.h. */
19908_ACEOF
19909cat confdefs.h >>conftest.$ac_ext
19910cat >>conftest.$ac_ext <<_ACEOF
19911/* end confdefs.h. */
19912$ac_includes_default
19913int
19914main ()
19915{
19916static struct stat ac_aggr;
19917if (ac_aggr.st_gen)
19918return 0;
19919 ;
19920 return 0;
19921}
19922_ACEOF
19923rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019924if { (ac_try="$ac_compile"
19925case "(($ac_try" in
19926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19927 *) ac_try_echo=$ac_try;;
19928esac
19929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019931 ac_status=$?
19932 grep -v '^ *+' conftest.er1 >conftest.err
19933 rm -f conftest.er1
19934 cat conftest.err >&5
19935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019936 (exit $ac_status); } && {
19937 test -z "$ac_c_werror_flag" ||
19938 test ! -s conftest.err
19939 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019940 ac_cv_member_struct_stat_st_gen=yes
19941else
19942 echo "$as_me: failed program was:" >&5
19943sed 's/^/| /' conftest.$ac_ext >&5
19944
Martin v. Löwiseba40652007-08-30 20:10:57 +000019945 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019946/* confdefs.h. */
19947_ACEOF
19948cat confdefs.h >>conftest.$ac_ext
19949cat >>conftest.$ac_ext <<_ACEOF
19950/* end confdefs.h. */
19951$ac_includes_default
19952int
19953main ()
19954{
19955static struct stat ac_aggr;
19956if (sizeof ac_aggr.st_gen)
19957return 0;
19958 ;
19959 return 0;
19960}
19961_ACEOF
19962rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019963if { (ac_try="$ac_compile"
19964case "(($ac_try" in
19965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19966 *) ac_try_echo=$ac_try;;
19967esac
19968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019970 ac_status=$?
19971 grep -v '^ *+' conftest.er1 >conftest.err
19972 rm -f conftest.er1
19973 cat conftest.err >&5
19974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019975 (exit $ac_status); } && {
19976 test -z "$ac_c_werror_flag" ||
19977 test ! -s conftest.err
19978 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019979 ac_cv_member_struct_stat_st_gen=yes
19980else
19981 echo "$as_me: failed program was:" >&5
19982sed 's/^/| /' conftest.$ac_ext >&5
19983
Martin v. Löwiseba40652007-08-30 20:10:57 +000019984 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019986
19987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019989
19990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019992{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19993echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019994if test $ac_cv_member_struct_stat_st_gen = yes; then
19995
19996cat >>confdefs.h <<_ACEOF
19997#define HAVE_STRUCT_STAT_ST_GEN 1
19998_ACEOF
19999
20000
20001fi
20002
Martin v. Löwiseba40652007-08-30 20:10:57 +000020003{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20004echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020005if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
20006 echo $ECHO_N "(cached) $ECHO_C" >&6
20007else
20008 cat >conftest.$ac_ext <<_ACEOF
20009/* confdefs.h. */
20010_ACEOF
20011cat confdefs.h >>conftest.$ac_ext
20012cat >>conftest.$ac_ext <<_ACEOF
20013/* end confdefs.h. */
20014$ac_includes_default
20015int
20016main ()
20017{
20018static struct stat ac_aggr;
20019if (ac_aggr.st_birthtime)
20020return 0;
20021 ;
20022 return 0;
20023}
20024_ACEOF
20025rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020026if { (ac_try="$ac_compile"
20027case "(($ac_try" in
20028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20029 *) ac_try_echo=$ac_try;;
20030esac
20031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020033 ac_status=$?
20034 grep -v '^ *+' conftest.er1 >conftest.err
20035 rm -f conftest.er1
20036 cat conftest.err >&5
20037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038 (exit $ac_status); } && {
20039 test -z "$ac_c_werror_flag" ||
20040 test ! -s conftest.err
20041 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020042 ac_cv_member_struct_stat_st_birthtime=yes
20043else
20044 echo "$as_me: failed program was:" >&5
20045sed 's/^/| /' conftest.$ac_ext >&5
20046
Martin v. Löwiseba40652007-08-30 20:10:57 +000020047 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020048/* confdefs.h. */
20049_ACEOF
20050cat confdefs.h >>conftest.$ac_ext
20051cat >>conftest.$ac_ext <<_ACEOF
20052/* end confdefs.h. */
20053$ac_includes_default
20054int
20055main ()
20056{
20057static struct stat ac_aggr;
20058if (sizeof ac_aggr.st_birthtime)
20059return 0;
20060 ;
20061 return 0;
20062}
20063_ACEOF
20064rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020065if { (ac_try="$ac_compile"
20066case "(($ac_try" in
20067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20068 *) ac_try_echo=$ac_try;;
20069esac
20070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20071 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020072 ac_status=$?
20073 grep -v '^ *+' conftest.er1 >conftest.err
20074 rm -f conftest.er1
20075 cat conftest.err >&5
20076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020077 (exit $ac_status); } && {
20078 test -z "$ac_c_werror_flag" ||
20079 test ! -s conftest.err
20080 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020081 ac_cv_member_struct_stat_st_birthtime=yes
20082else
20083 echo "$as_me: failed program was:" >&5
20084sed 's/^/| /' conftest.$ac_ext >&5
20085
Martin v. Löwiseba40652007-08-30 20:10:57 +000020086 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020088
20089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020091
20092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020094{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20095echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020096if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20097
20098cat >>confdefs.h <<_ACEOF
20099#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20100_ACEOF
20101
20102
20103fi
20104
Martin v. Löwiseba40652007-08-30 20:10:57 +000020105{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20106echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020107if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20108 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020109else
Martin v. Löwis11437992002-04-12 09:54:03 +000020110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020111/* confdefs.h. */
20112_ACEOF
20113cat confdefs.h >>conftest.$ac_ext
20114cat >>conftest.$ac_ext <<_ACEOF
20115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020116$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020117int
20118main ()
20119{
20120static struct stat ac_aggr;
20121if (ac_aggr.st_blocks)
20122return 0;
20123 ;
20124 return 0;
20125}
20126_ACEOF
20127rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020128if { (ac_try="$ac_compile"
20129case "(($ac_try" in
20130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20131 *) ac_try_echo=$ac_try;;
20132esac
20133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020136 grep -v '^ *+' conftest.er1 >conftest.err
20137 rm -f conftest.er1
20138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020140 (exit $ac_status); } && {
20141 test -z "$ac_c_werror_flag" ||
20142 test ! -s conftest.err
20143 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020144 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020145else
Martin v. Löwis11437992002-04-12 09:54:03 +000020146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020147sed 's/^/| /' conftest.$ac_ext >&5
20148
Martin v. Löwiseba40652007-08-30 20:10:57 +000020149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020150/* confdefs.h. */
20151_ACEOF
20152cat confdefs.h >>conftest.$ac_ext
20153cat >>conftest.$ac_ext <<_ACEOF
20154/* end confdefs.h. */
20155$ac_includes_default
20156int
20157main ()
20158{
20159static struct stat ac_aggr;
20160if (sizeof ac_aggr.st_blocks)
20161return 0;
20162 ;
20163 return 0;
20164}
20165_ACEOF
20166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020167if { (ac_try="$ac_compile"
20168case "(($ac_try" in
20169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20170 *) ac_try_echo=$ac_try;;
20171esac
20172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20173 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020175 grep -v '^ *+' conftest.er1 >conftest.err
20176 rm -f conftest.er1
20177 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020179 (exit $ac_status); } && {
20180 test -z "$ac_c_werror_flag" ||
20181 test ! -s conftest.err
20182 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020183 ac_cv_member_struct_stat_st_blocks=yes
20184else
20185 echo "$as_me: failed program was:" >&5
20186sed 's/^/| /' conftest.$ac_ext >&5
20187
Martin v. Löwiseba40652007-08-30 20:10:57 +000020188 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020190
20191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020193
20194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020196{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20197echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020198if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020199
Martin v. Löwis11437992002-04-12 09:54:03 +000020200cat >>confdefs.h <<_ACEOF
20201#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20202_ACEOF
20203
20204
20205cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020206#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020207_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020208
20209else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020210 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020211 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020212 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20213 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020214esac
20215
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020216fi
20217
Michael W. Hudson54241132001-12-07 15:38:26 +000020218
Martin v. Löwis11437992002-04-12 09:54:03 +000020219
Martin v. Löwiseba40652007-08-30 20:10:57 +000020220{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20221echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020222if test "${ac_cv_header_time_altzone+set}" = set; then
20223 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020224else
Martin v. Löwis11437992002-04-12 09:54:03 +000020225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020226/* confdefs.h. */
20227_ACEOF
20228cat confdefs.h >>conftest.$ac_ext
20229cat >>conftest.$ac_ext <<_ACEOF
20230/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020231#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020232int
20233main ()
20234{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020235return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020236 ;
20237 return 0;
20238}
20239_ACEOF
20240rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020241if { (ac_try="$ac_compile"
20242case "(($ac_try" in
20243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20244 *) ac_try_echo=$ac_try;;
20245esac
20246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20247 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020249 grep -v '^ *+' conftest.er1 >conftest.err
20250 rm -f conftest.er1
20251 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020253 (exit $ac_status); } && {
20254 test -z "$ac_c_werror_flag" ||
20255 test ! -s conftest.err
20256 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020257 ac_cv_header_time_altzone=yes
20258else
Martin v. Löwis11437992002-04-12 09:54:03 +000020259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020260sed 's/^/| /' conftest.$ac_ext >&5
20261
Martin v. Löwiseba40652007-08-30 20:10:57 +000020262 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020263fi
20264
Martin v. Löwiseba40652007-08-30 20:10:57 +000020265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20266fi
20267
20268{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20269echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020270if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020271
20272cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020273#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020274_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020275
20276fi
20277
Guido van Rossumda88dad1995-01-26 00:46:29 +000020278was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020279{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20280echo $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 +000020281cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020282/* confdefs.h. */
20283_ACEOF
20284cat confdefs.h >>conftest.$ac_ext
20285cat >>conftest.$ac_ext <<_ACEOF
20286/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020287
20288#include <sys/types.h>
20289#include <sys/select.h>
20290#include <sys/time.h>
20291
Martin v. Löwis11437992002-04-12 09:54:03 +000020292int
20293main ()
20294{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020295;
Martin v. Löwis11437992002-04-12 09:54:03 +000020296 ;
20297 return 0;
20298}
20299_ACEOF
20300rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020301if { (ac_try="$ac_compile"
20302case "(($ac_try" in
20303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20304 *) ac_try_echo=$ac_try;;
20305esac
20306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20307 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020309 grep -v '^ *+' conftest.er1 >conftest.err
20310 rm -f conftest.er1
20311 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020313 (exit $ac_status); } && {
20314 test -z "$ac_c_werror_flag" ||
20315 test ! -s conftest.err
20316 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020317
20318
20319cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020320#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020321_ACEOF
20322
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020323 was_it_defined=yes
20324
Guido van Rossumf78abae1997-01-21 22:02:36 +000020325else
Martin v. Löwis11437992002-04-12 09:54:03 +000020326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020327sed 's/^/| /' conftest.$ac_ext >&5
20328
Brett Cannon19fab762007-06-02 03:02:29 +000020329
Martin v. Löwiseba40652007-08-30 20:10:57 +000020330fi
20331
20332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20333{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20334echo "${ECHO_T}$was_it_defined" >&6; }
20335
20336{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20337echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020338if test "${ac_cv_struct_addrinfo+set}" = set; then
20339 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020340else
Martin v. Löwis11437992002-04-12 09:54:03 +000020341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020342/* confdefs.h. */
20343_ACEOF
20344cat confdefs.h >>conftest.$ac_ext
20345cat >>conftest.$ac_ext <<_ACEOF
20346/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020347
20348# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020349int
20350main ()
20351{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020352struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020353 ;
20354 return 0;
20355}
20356_ACEOF
20357rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020358if { (ac_try="$ac_compile"
20359case "(($ac_try" in
20360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20361 *) ac_try_echo=$ac_try;;
20362esac
20363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020366 grep -v '^ *+' conftest.er1 >conftest.err
20367 rm -f conftest.er1
20368 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020370 (exit $ac_status); } && {
20371 test -z "$ac_c_werror_flag" ||
20372 test ! -s conftest.err
20373 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020374 ac_cv_struct_addrinfo=yes
20375else
Martin v. Löwis11437992002-04-12 09:54:03 +000020376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020377sed 's/^/| /' conftest.$ac_ext >&5
20378
Martin v. Löwiseba40652007-08-30 20:10:57 +000020379 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020380fi
20381
Martin v. Löwiseba40652007-08-30 20:10:57 +000020382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20383fi
20384
20385{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20386echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020387if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020388
20389cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020390#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020391_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020392
20393fi
20394
Martin v. Löwiseba40652007-08-30 20:10:57 +000020395{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20396echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020397if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020399else
Martin v. Löwis11437992002-04-12 09:54:03 +000020400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020401/* confdefs.h. */
20402_ACEOF
20403cat confdefs.h >>conftest.$ac_ext
20404cat >>conftest.$ac_ext <<_ACEOF
20405/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020406
20407# include <sys/types.h>
20408# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020409int
20410main ()
20411{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020412struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020413 ;
20414 return 0;
20415}
20416_ACEOF
20417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418if { (ac_try="$ac_compile"
20419case "(($ac_try" in
20420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20421 *) ac_try_echo=$ac_try;;
20422esac
20423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020426 grep -v '^ *+' conftest.er1 >conftest.err
20427 rm -f conftest.er1
20428 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020430 (exit $ac_status); } && {
20431 test -z "$ac_c_werror_flag" ||
20432 test ! -s conftest.err
20433 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020434 ac_cv_struct_sockaddr_storage=yes
20435else
Martin v. Löwis11437992002-04-12 09:54:03 +000020436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020437sed 's/^/| /' conftest.$ac_ext >&5
20438
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020440fi
20441
Martin v. Löwiseba40652007-08-30 20:10:57 +000020442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20443fi
20444
20445{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20446echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020447if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020448
20449cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020450#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020451_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020452
20453fi
20454
Guido van Rossum627b2d71993-12-24 10:39:16 +000020455# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020456
Michael W. Hudson54241132001-12-07 15:38:26 +000020457
Martin v. Löwiseba40652007-08-30 20:10:57 +000020458{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20459echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020460if test "${ac_cv_c_char_unsigned+set}" = set; then
20461 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020462else
Martin v. Löwis11437992002-04-12 09:54:03 +000020463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020464/* confdefs.h. */
20465_ACEOF
20466cat confdefs.h >>conftest.$ac_ext
20467cat >>conftest.$ac_ext <<_ACEOF
20468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020469$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020470int
20471main ()
20472{
20473static int test_array [1 - 2 * !(((char) -1) < 0)];
20474test_array [0] = 0
20475
20476 ;
20477 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020478}
Martin v. Löwis11437992002-04-12 09:54:03 +000020479_ACEOF
20480rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020481if { (ac_try="$ac_compile"
20482case "(($ac_try" in
20483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20484 *) ac_try_echo=$ac_try;;
20485esac
20486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020489 grep -v '^ *+' conftest.er1 >conftest.err
20490 rm -f conftest.er1
20491 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020493 (exit $ac_status); } && {
20494 test -z "$ac_c_werror_flag" ||
20495 test ! -s conftest.err
20496 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020497 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020498else
20499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020500sed 's/^/| /' conftest.$ac_ext >&5
20501
Martin v. Löwiseba40652007-08-30 20:10:57 +000020502 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020504
20505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020507{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20508echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020509if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020510 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020511#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020512_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020513
20514fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020515
Martin v. Löwiseba40652007-08-30 20:10:57 +000020516{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20517echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020518if test "${ac_cv_c_const+set}" = set; then
20519 echo $ECHO_N "(cached) $ECHO_C" >&6
20520else
20521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020522/* confdefs.h. */
20523_ACEOF
20524cat confdefs.h >>conftest.$ac_ext
20525cat >>conftest.$ac_ext <<_ACEOF
20526/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020527
Martin v. Löwis11437992002-04-12 09:54:03 +000020528int
20529main ()
20530{
20531/* FIXME: Include the comments suggested by Paul. */
20532#ifndef __cplusplus
20533 /* Ultrix mips cc rejects this. */
20534 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020536 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020537 char const *const *pcpcc;
20538 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020539 /* NEC SVR4.0.2 mips cc rejects this. */
20540 struct point {int x, y;};
20541 static struct point const zero = {0,0};
20542 /* AIX XL C 1.02.0.0 rejects this.
20543 It does not let you subtract one const X* pointer from another in
20544 an arm of an if-expression whose if-part is not a constant
20545 expression */
20546 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020547 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020548 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020549 ++pcpcc;
20550 ppc = (char**) pcpcc;
20551 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020552 { /* SCO 3.2v4 cc rejects this. */
20553 char *t;
20554 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020555
Martin v. Löwis11437992002-04-12 09:54:03 +000020556 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020557 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020558 }
20559 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20560 int x[] = {25, 17};
20561 const int *foo = &x[0];
20562 ++foo;
20563 }
20564 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20565 typedef const int *iptr;
20566 iptr p = 0;
20567 ++p;
20568 }
20569 { /* AIX XL C 1.02.0.0 rejects this saying
20570 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20571 struct s { int j; const int *ap[3]; };
20572 struct s *b; b->j = 5;
20573 }
20574 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20575 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020576 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020577 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020578 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020579#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020580
Martin v. Löwis11437992002-04-12 09:54:03 +000020581 ;
20582 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020583}
Martin v. Löwis11437992002-04-12 09:54:03 +000020584_ACEOF
20585rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020586if { (ac_try="$ac_compile"
20587case "(($ac_try" in
20588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20589 *) ac_try_echo=$ac_try;;
20590esac
20591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020594 grep -v '^ *+' conftest.er1 >conftest.err
20595 rm -f conftest.er1
20596 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020598 (exit $ac_status); } && {
20599 test -z "$ac_c_werror_flag" ||
20600 test ! -s conftest.err
20601 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020602 ac_cv_c_const=yes
20603else
Martin v. Löwis11437992002-04-12 09:54:03 +000020604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020605sed 's/^/| /' conftest.$ac_ext >&5
20606
Martin v. Löwiseba40652007-08-30 20:10:57 +000020607 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020609
20610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020612{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20613echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020614if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020615
20616cat >>confdefs.h <<\_ACEOF
20617#define const
20618_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020619
20620fi
20621
Michael W. Hudson54241132001-12-07 15:38:26 +000020622
Guido van Rossumda88dad1995-01-26 00:46:29 +000020623works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020624{ echo "$as_me:$LINENO: checking for working volatile" >&5
20625echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020627/* confdefs.h. */
20628_ACEOF
20629cat confdefs.h >>conftest.$ac_ext
20630cat >>conftest.$ac_ext <<_ACEOF
20631/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020632
Martin v. Löwis11437992002-04-12 09:54:03 +000020633int
20634main ()
20635{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020636volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020637 ;
20638 return 0;
20639}
20640_ACEOF
20641rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020642if { (ac_try="$ac_compile"
20643case "(($ac_try" in
20644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20645 *) ac_try_echo=$ac_try;;
20646esac
20647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020650 grep -v '^ *+' conftest.er1 >conftest.err
20651 rm -f conftest.er1
20652 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020654 (exit $ac_status); } && {
20655 test -z "$ac_c_werror_flag" ||
20656 test ! -s conftest.err
20657 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020658 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020659else
Martin v. Löwis11437992002-04-12 09:54:03 +000020660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020661sed 's/^/| /' conftest.$ac_ext >&5
20662
Martin v. Löwis11437992002-04-12 09:54:03 +000020663
20664cat >>confdefs.h <<\_ACEOF
20665#define volatile
20666_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020667
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020668
Guido van Rossum627b2d71993-12-24 10:39:16 +000020669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020670
20671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20672{ echo "$as_me:$LINENO: result: $works" >&5
20673echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020674
Guido van Rossumda88dad1995-01-26 00:46:29 +000020675works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020676{ echo "$as_me:$LINENO: checking for working signed char" >&5
20677echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020678cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020679/* confdefs.h. */
20680_ACEOF
20681cat confdefs.h >>conftest.$ac_ext
20682cat >>conftest.$ac_ext <<_ACEOF
20683/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020684
Martin v. Löwis11437992002-04-12 09:54:03 +000020685int
20686main ()
20687{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020688signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020689 ;
20690 return 0;
20691}
20692_ACEOF
20693rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694if { (ac_try="$ac_compile"
20695case "(($ac_try" in
20696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20697 *) ac_try_echo=$ac_try;;
20698esac
20699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020702 grep -v '^ *+' conftest.er1 >conftest.err
20703 rm -f conftest.er1
20704 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020706 (exit $ac_status); } && {
20707 test -z "$ac_c_werror_flag" ||
20708 test ! -s conftest.err
20709 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020710 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020711else
Martin v. Löwis11437992002-04-12 09:54:03 +000020712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020713sed 's/^/| /' conftest.$ac_ext >&5
20714
Martin v. Löwis11437992002-04-12 09:54:03 +000020715
20716cat >>confdefs.h <<\_ACEOF
20717#define signed
20718_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020719
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020720
Guido van Rossum7f43da71994-08-01 12:15:30 +000020721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020722
20723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20724{ echo "$as_me:$LINENO: result: $works" >&5
20725echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020726
Guido van Rossumda88dad1995-01-26 00:46:29 +000020727have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020728{ echo "$as_me:$LINENO: checking for prototypes" >&5
20729echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020730cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020731/* confdefs.h. */
20732_ACEOF
20733cat confdefs.h >>conftest.$ac_ext
20734cat >>conftest.$ac_ext <<_ACEOF
20735/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020736int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020737int
20738main ()
20739{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020740return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020741 ;
20742 return 0;
20743}
20744_ACEOF
20745rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020746if { (ac_try="$ac_compile"
20747case "(($ac_try" in
20748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20749 *) ac_try_echo=$ac_try;;
20750esac
20751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20752 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020754 grep -v '^ *+' conftest.er1 >conftest.err
20755 rm -f conftest.er1
20756 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020758 (exit $ac_status); } && {
20759 test -z "$ac_c_werror_flag" ||
20760 test ! -s conftest.err
20761 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020762
20763
20764cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020765#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020766_ACEOF
20767
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020768 have_prototypes=yes
20769
Guido van Rossumf78abae1997-01-21 22:02:36 +000020770else
Martin v. Löwis11437992002-04-12 09:54:03 +000020771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020772sed 's/^/| /' conftest.$ac_ext >&5
20773
Martin v. Löwiseba40652007-08-30 20:10:57 +000020774
Guido van Rossum7f43da71994-08-01 12:15:30 +000020775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020776
20777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20778{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20779echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020780
Guido van Rossumda88dad1995-01-26 00:46:29 +000020781works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020782{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20783echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020784cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020785/* confdefs.h. */
20786_ACEOF
20787cat confdefs.h >>conftest.$ac_ext
20788cat >>conftest.$ac_ext <<_ACEOF
20789/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020790
20791#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020792int foo(int x, ...) {
20793 va_list va;
20794 va_start(va, x);
20795 va_arg(va, int);
20796 va_arg(va, char *);
20797 va_arg(va, double);
20798 return 0;
20799}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020800
Martin v. Löwis11437992002-04-12 09:54:03 +000020801int
20802main ()
20803{
Guido van Rossum90eea071996-08-30 20:58:57 +000020804return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020805 ;
20806 return 0;
20807}
20808_ACEOF
20809rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020810if { (ac_try="$ac_compile"
20811case "(($ac_try" in
20812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20813 *) ac_try_echo=$ac_try;;
20814esac
20815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020818 grep -v '^ *+' conftest.er1 >conftest.err
20819 rm -f conftest.er1
20820 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020822 (exit $ac_status); } && {
20823 test -z "$ac_c_werror_flag" ||
20824 test ! -s conftest.err
20825 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020826
20827
20828cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020829#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020830_ACEOF
20831
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020832 works=yes
20833
Guido van Rossumf78abae1997-01-21 22:02:36 +000020834else
Martin v. Löwis11437992002-04-12 09:54:03 +000020835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020836sed 's/^/| /' conftest.$ac_ext >&5
20837
Martin v. Löwiseba40652007-08-30 20:10:57 +000020838
Guido van Rossum627b2d71993-12-24 10:39:16 +000020839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020840
20841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20842{ echo "$as_me:$LINENO: result: $works" >&5
20843echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020844
Martin v. Löwisd6320502004-08-12 13:45:08 +000020845# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020846{ echo "$as_me:$LINENO: checking for socketpair" >&5
20847echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020848cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020849/* confdefs.h. */
20850_ACEOF
20851cat confdefs.h >>conftest.$ac_ext
20852cat >>conftest.$ac_ext <<_ACEOF
20853/* end confdefs.h. */
20854
20855#include <sys/types.h>
20856#include <sys/socket.h>
20857
20858int
20859main ()
20860{
20861void *x=socketpair
20862 ;
20863 return 0;
20864}
20865_ACEOF
20866rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020867if { (ac_try="$ac_compile"
20868case "(($ac_try" in
20869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20870 *) ac_try_echo=$ac_try;;
20871esac
20872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020875 grep -v '^ *+' conftest.er1 >conftest.err
20876 rm -f conftest.er1
20877 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020879 (exit $ac_status); } && {
20880 test -z "$ac_c_werror_flag" ||
20881 test ! -s conftest.err
20882 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020883
20884cat >>confdefs.h <<\_ACEOF
20885#define HAVE_SOCKETPAIR 1
20886_ACEOF
20887
Martin v. Löwiseba40652007-08-30 20:10:57 +000020888 { echo "$as_me:$LINENO: result: yes" >&5
20889echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020890else
20891 echo "$as_me: failed program was:" >&5
20892sed 's/^/| /' conftest.$ac_ext >&5
20893
Martin v. Löwiseba40652007-08-30 20:10:57 +000020894 { echo "$as_me:$LINENO: result: no" >&5
20895echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020896
20897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020898
20899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020900
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020901# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020902{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20903echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020904cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020905/* confdefs.h. */
20906_ACEOF
20907cat confdefs.h >>conftest.$ac_ext
20908cat >>conftest.$ac_ext <<_ACEOF
20909/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020910#include <sys/types.h>
20911#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020912int
20913main ()
20914{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020915struct sockaddr x;
20916x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020917 ;
20918 return 0;
20919}
20920_ACEOF
20921rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020922if { (ac_try="$ac_compile"
20923case "(($ac_try" in
20924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20925 *) ac_try_echo=$ac_try;;
20926esac
20927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020930 grep -v '^ *+' conftest.er1 >conftest.err
20931 rm -f conftest.er1
20932 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020934 (exit $ac_status); } && {
20935 test -z "$ac_c_werror_flag" ||
20936 test ! -s conftest.err
20937 } && test -s conftest.$ac_objext; then
20938 { echo "$as_me:$LINENO: result: yes" >&5
20939echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020940
20941cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020942#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020943_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020944
20945else
Martin v. Löwis11437992002-04-12 09:54:03 +000020946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020947sed 's/^/| /' conftest.$ac_ext >&5
20948
Martin v. Löwiseba40652007-08-30 20:10:57 +000020949 { echo "$as_me:$LINENO: result: no" >&5
20950echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020952
20953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020954
Guido van Rossumda88dad1995-01-26 00:46:29 +000020955va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020956{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20957echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020959/* confdefs.h. */
20960_ACEOF
20961cat confdefs.h >>conftest.$ac_ext
20962cat >>conftest.$ac_ext <<_ACEOF
20963/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020964
20965#ifdef HAVE_STDARG_PROTOTYPES
20966#include <stdarg.h>
20967#else
20968#include <varargs.h>
20969#endif
20970
Martin v. Löwis11437992002-04-12 09:54:03 +000020971int
20972main ()
20973{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020974va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020975 ;
20976 return 0;
20977}
20978_ACEOF
20979rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020980if { (ac_try="$ac_compile"
20981case "(($ac_try" in
20982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20983 *) ac_try_echo=$ac_try;;
20984esac
20985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20986 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020988 grep -v '^ *+' conftest.er1 >conftest.err
20989 rm -f conftest.er1
20990 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020992 (exit $ac_status); } && {
20993 test -z "$ac_c_werror_flag" ||
20994 test ! -s conftest.err
20995 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020996 :
20997else
Martin v. Löwis11437992002-04-12 09:54:03 +000020998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020999sed 's/^/| /' conftest.$ac_ext >&5
21000
Martin v. Löwis11437992002-04-12 09:54:03 +000021001
21002
21003cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021004#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021005_ACEOF
21006
Guido van Rossumda88dad1995-01-26 00:46:29 +000021007 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021008
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021010
21011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21012{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21013echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021014
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021015# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021016
21017
21018
Martin v. Löwiseba40652007-08-30 20:10:57 +000021019{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21020echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021021if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021023else
Martin v. Löwis11437992002-04-12 09:54:03 +000021024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021025/* confdefs.h. */
21026_ACEOF
21027cat confdefs.h >>conftest.$ac_ext
21028cat >>conftest.$ac_ext <<_ACEOF
21029/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021030/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21031 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21032#define gethostbyname_r innocuous_gethostbyname_r
21033
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021034/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021035 which can conflict with char gethostbyname_r (); below.
21036 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021037 <limits.h> exists even on freestanding compilers. */
21038
21039#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021040# include <limits.h>
21041#else
21042# include <assert.h>
21043#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021044
21045#undef gethostbyname_r
21046
Martin v. Löwiseba40652007-08-30 20:10:57 +000021047/* Override any GCC internal prototype to avoid an error.
21048 Use char because int might match the return type of a GCC
21049 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021050#ifdef __cplusplus
21051extern "C"
21052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021053char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021054/* The GNU C library defines this for functions which it implements
21055 to always fail with ENOSYS. Some functions are actually named
21056 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021057#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021058choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021059#endif
21060
Skip Montanaro6dead952003-09-25 14:50:04 +000021061int
21062main ()
21063{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021064return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021065 ;
21066 return 0;
21067}
21068_ACEOF
21069rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021070if { (ac_try="$ac_link"
21071case "(($ac_try" in
21072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21073 *) ac_try_echo=$ac_try;;
21074esac
21075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21076 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021078 grep -v '^ *+' conftest.er1 >conftest.err
21079 rm -f conftest.er1
21080 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021082 (exit $ac_status); } && {
21083 test -z "$ac_c_werror_flag" ||
21084 test ! -s conftest.err
21085 } && test -s conftest$ac_exeext &&
21086 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021087 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021088else
Martin v. Löwis11437992002-04-12 09:54:03 +000021089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021090sed 's/^/| /' conftest.$ac_ext >&5
21091
Martin v. Löwiseba40652007-08-30 20:10:57 +000021092 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021094
21095rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021096 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021098{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21099echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021100if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021101
Martin v. Löwis11437992002-04-12 09:54:03 +000021102 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021103#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021104_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021105
Martin v. Löwiseba40652007-08-30 20:10:57 +000021106 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21107echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021108 OLD_CFLAGS=$CFLAGS
21109 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021111/* confdefs.h. */
21112_ACEOF
21113cat confdefs.h >>conftest.$ac_ext
21114cat >>conftest.$ac_ext <<_ACEOF
21115/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021116
21117# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021118
Martin v. Löwis11437992002-04-12 09:54:03 +000021119int
21120main ()
21121{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021122
21123 char *name;
21124 struct hostent *he, *res;
21125 char buffer[2048];
21126 int buflen = 2048;
21127 int h_errnop;
21128
21129 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021130
21131 ;
21132 return 0;
21133}
21134_ACEOF
21135rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021136if { (ac_try="$ac_compile"
21137case "(($ac_try" in
21138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21139 *) ac_try_echo=$ac_try;;
21140esac
21141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021144 grep -v '^ *+' conftest.er1 >conftest.err
21145 rm -f conftest.er1
21146 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021148 (exit $ac_status); } && {
21149 test -z "$ac_c_werror_flag" ||
21150 test ! -s conftest.err
21151 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021152
21153 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021154#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021155_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021156
Martin v. Löwis11437992002-04-12 09:54:03 +000021157
21158cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021159#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021160_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021161
Martin v. Löwiseba40652007-08-30 20:10:57 +000021162 { echo "$as_me:$LINENO: result: yes" >&5
21163echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021164
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021165else
Martin v. Löwis11437992002-04-12 09:54:03 +000021166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021167sed 's/^/| /' conftest.$ac_ext >&5
21168
Martin v. Löwis11437992002-04-12 09:54:03 +000021169
Martin v. Löwiseba40652007-08-30 20:10:57 +000021170 { echo "$as_me:$LINENO: result: no" >&5
21171echo "${ECHO_T}no" >&6; }
21172 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21173echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021175/* confdefs.h. */
21176_ACEOF
21177cat confdefs.h >>conftest.$ac_ext
21178cat >>conftest.$ac_ext <<_ACEOF
21179/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021180
21181# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021182
Martin v. Löwis11437992002-04-12 09:54:03 +000021183int
21184main ()
21185{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021186
21187 char *name;
21188 struct hostent *he;
21189 char buffer[2048];
21190 int buflen = 2048;
21191 int h_errnop;
21192
21193 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021194
21195 ;
21196 return 0;
21197}
21198_ACEOF
21199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021200if { (ac_try="$ac_compile"
21201case "(($ac_try" in
21202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21203 *) ac_try_echo=$ac_try;;
21204esac
21205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021208 grep -v '^ *+' conftest.er1 >conftest.err
21209 rm -f conftest.er1
21210 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021212 (exit $ac_status); } && {
21213 test -z "$ac_c_werror_flag" ||
21214 test ! -s conftest.err
21215 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021216
21217 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021218#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021219_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021220
Martin v. Löwis11437992002-04-12 09:54:03 +000021221
21222cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021223#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021224_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021225
Martin v. Löwiseba40652007-08-30 20:10:57 +000021226 { echo "$as_me:$LINENO: result: yes" >&5
21227echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021228
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021229else
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021231sed 's/^/| /' conftest.$ac_ext >&5
21232
Martin v. Löwis11437992002-04-12 09:54:03 +000021233
Martin v. Löwiseba40652007-08-30 20:10:57 +000021234 { echo "$as_me:$LINENO: result: no" >&5
21235echo "${ECHO_T}no" >&6; }
21236 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21237echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021239/* confdefs.h. */
21240_ACEOF
21241cat confdefs.h >>conftest.$ac_ext
21242cat >>conftest.$ac_ext <<_ACEOF
21243/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021244
21245# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021246
Martin v. Löwis11437992002-04-12 09:54:03 +000021247int
21248main ()
21249{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021250
21251 char *name;
21252 struct hostent *he;
21253 struct hostent_data data;
21254
21255 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021256
21257 ;
21258 return 0;
21259}
21260_ACEOF
21261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021262if { (ac_try="$ac_compile"
21263case "(($ac_try" in
21264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21265 *) ac_try_echo=$ac_try;;
21266esac
21267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021270 grep -v '^ *+' conftest.er1 >conftest.err
21271 rm -f conftest.er1
21272 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021274 (exit $ac_status); } && {
21275 test -z "$ac_c_werror_flag" ||
21276 test ! -s conftest.err
21277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021278
21279 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021280#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021281_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021282
Martin v. Löwis11437992002-04-12 09:54:03 +000021283
21284cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021285#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021286_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021287
Martin v. Löwiseba40652007-08-30 20:10:57 +000021288 { echo "$as_me:$LINENO: result: yes" >&5
21289echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021290
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021291else
Martin v. Löwis11437992002-04-12 09:54:03 +000021292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021293sed 's/^/| /' conftest.$ac_ext >&5
21294
Martin v. Löwis11437992002-04-12 09:54:03 +000021295
Martin v. Löwiseba40652007-08-30 20:10:57 +000021296 { echo "$as_me:$LINENO: result: no" >&5
21297echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021298
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021300
21301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021302
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021304
21305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021306
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021308
21309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021310 CFLAGS=$OLD_CFLAGS
21311
21312else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021313
Martin v. Löwis11437992002-04-12 09:54:03 +000021314
21315for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021316do
Martin v. Löwis11437992002-04-12 09:54:03 +000021317as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021318{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21319echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21320if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021322else
Martin v. Löwis11437992002-04-12 09:54:03 +000021323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021324/* confdefs.h. */
21325_ACEOF
21326cat confdefs.h >>conftest.$ac_ext
21327cat >>conftest.$ac_ext <<_ACEOF
21328/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021329/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21330 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21331#define $ac_func innocuous_$ac_func
21332
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021333/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021334 which can conflict with char $ac_func (); below.
21335 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021336 <limits.h> exists even on freestanding compilers. */
21337
21338#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021339# include <limits.h>
21340#else
21341# include <assert.h>
21342#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021343
21344#undef $ac_func
21345
Martin v. Löwiseba40652007-08-30 20:10:57 +000021346/* Override any GCC internal prototype to avoid an error.
21347 Use char because int might match the return type of a GCC
21348 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021349#ifdef __cplusplus
21350extern "C"
21351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021352char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021353/* The GNU C library defines this for functions which it implements
21354 to always fail with ENOSYS. Some functions are actually named
21355 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021356#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021357choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021358#endif
21359
Skip Montanaro6dead952003-09-25 14:50:04 +000021360int
21361main ()
21362{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021363return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021364 ;
21365 return 0;
21366}
21367_ACEOF
21368rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021369if { (ac_try="$ac_link"
21370case "(($ac_try" in
21371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21372 *) ac_try_echo=$ac_try;;
21373esac
21374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21375 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021377 grep -v '^ *+' conftest.er1 >conftest.err
21378 rm -f conftest.er1
21379 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021381 (exit $ac_status); } && {
21382 test -z "$ac_c_werror_flag" ||
21383 test ! -s conftest.err
21384 } && test -s conftest$ac_exeext &&
21385 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021386 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021387else
Martin v. Löwis11437992002-04-12 09:54:03 +000021388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021389sed 's/^/| /' conftest.$ac_ext >&5
21390
Martin v. Löwiseba40652007-08-30 20:10:57 +000021391 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021393
21394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021395 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021397ac_res=`eval echo '${'$as_ac_var'}'`
21398 { echo "$as_me:$LINENO: result: $ac_res" >&5
21399echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021400if test `eval echo '${'$as_ac_var'}'` = yes; then
21401 cat >>confdefs.h <<_ACEOF
21402#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21403_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021404
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021405fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021406done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021407
Michael W. Hudson54241132001-12-07 15:38:26 +000021408
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021409fi
21410
Michael W. Hudson54241132001-12-07 15:38:26 +000021411
21412
21413
21414
21415
21416
Guido van Rossum627b2d71993-12-24 10:39:16 +000021417# checks for system services
21418# (none yet)
21419
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021420# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021421{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21422echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021423if test "${ac_cv_func___fpu_control+set}" = set; then
21424 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021425else
Martin v. Löwis11437992002-04-12 09:54:03 +000021426 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021427/* confdefs.h. */
21428_ACEOF
21429cat confdefs.h >>conftest.$ac_ext
21430cat >>conftest.$ac_ext <<_ACEOF
21431/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021432/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21433 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21434#define __fpu_control innocuous___fpu_control
21435
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021436/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021437 which can conflict with char __fpu_control (); below.
21438 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021439 <limits.h> exists even on freestanding compilers. */
21440
21441#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021442# include <limits.h>
21443#else
21444# include <assert.h>
21445#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021446
21447#undef __fpu_control
21448
Martin v. Löwiseba40652007-08-30 20:10:57 +000021449/* Override any GCC internal prototype to avoid an error.
21450 Use char because int might match the return type of a GCC
21451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021452#ifdef __cplusplus
21453extern "C"
21454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021455char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021456/* The GNU C library defines this for functions which it implements
21457 to always fail with ENOSYS. Some functions are actually named
21458 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021459#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021460choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021461#endif
21462
Skip Montanaro6dead952003-09-25 14:50:04 +000021463int
21464main ()
21465{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021466return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021467 ;
21468 return 0;
21469}
21470_ACEOF
21471rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021472if { (ac_try="$ac_link"
21473case "(($ac_try" in
21474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21475 *) ac_try_echo=$ac_try;;
21476esac
21477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21478 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021480 grep -v '^ *+' conftest.er1 >conftest.err
21481 rm -f conftest.er1
21482 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021484 (exit $ac_status); } && {
21485 test -z "$ac_c_werror_flag" ||
21486 test ! -s conftest.err
21487 } && test -s conftest$ac_exeext &&
21488 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021489 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021490else
Martin v. Löwis11437992002-04-12 09:54:03 +000021491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021492sed 's/^/| /' conftest.$ac_ext >&5
21493
Martin v. Löwiseba40652007-08-30 20:10:57 +000021494 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021495fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021496
21497rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021498 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021500{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21501echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021502if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021503 :
21504else
Martin v. Löwis11437992002-04-12 09:54:03 +000021505
Martin v. Löwiseba40652007-08-30 20:10:57 +000021506{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21507echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021508if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21509 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021510else
Martin v. Löwis11437992002-04-12 09:54:03 +000021511 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021512LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021513cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021514/* confdefs.h. */
21515_ACEOF
21516cat confdefs.h >>conftest.$ac_ext
21517cat >>conftest.$ac_ext <<_ACEOF
21518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021519
Martin v. Löwiseba40652007-08-30 20:10:57 +000021520/* Override any GCC internal prototype to avoid an error.
21521 Use char because int might match the return type of a GCC
21522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021523#ifdef __cplusplus
21524extern "C"
21525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021526char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021527int
21528main ()
21529{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021530return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021531 ;
21532 return 0;
21533}
21534_ACEOF
21535rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021536if { (ac_try="$ac_link"
21537case "(($ac_try" in
21538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21539 *) ac_try_echo=$ac_try;;
21540esac
21541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21542 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021544 grep -v '^ *+' conftest.er1 >conftest.err
21545 rm -f conftest.er1
21546 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021548 (exit $ac_status); } && {
21549 test -z "$ac_c_werror_flag" ||
21550 test ! -s conftest.err
21551 } && test -s conftest$ac_exeext &&
21552 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021553 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021554else
Martin v. Löwis11437992002-04-12 09:54:03 +000021555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021556sed 's/^/| /' conftest.$ac_ext >&5
21557
Martin v. Löwiseba40652007-08-30 20:10:57 +000021558 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021560
21561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021562 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021563LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021565{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21566echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021567if test $ac_cv_lib_ieee___fpu_control = yes; then
21568 cat >>confdefs.h <<_ACEOF
21569#define HAVE_LIBIEEE 1
21570_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021571
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021572 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021573
Guido van Rossum627b2d71993-12-24 10:39:16 +000021574fi
21575
Michael W. Hudson54241132001-12-07 15:38:26 +000021576
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021577fi
21578
Michael W. Hudson54241132001-12-07 15:38:26 +000021579
Guido van Rossum7f253911997-05-09 02:42:48 +000021580# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021581{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21582echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021583
Martin v. Löwiseba40652007-08-30 20:10:57 +000021584# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021585if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021586 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021587if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021588then
21589
21590cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021591#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021592_ACEOF
21593
Martin v. Löwiseba40652007-08-30 20:10:57 +000021594 { echo "$as_me:$LINENO: result: yes" >&5
21595echo "${ECHO_T}yes" >&6; }
21596else { echo "$as_me:$LINENO: result: no" >&5
21597echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021598fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021599else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021600 { echo "$as_me:$LINENO: result: no" >&5
21601echo "${ECHO_T}no" >&6; }
21602fi
21603
Guido van Rossum7f253911997-05-09 02:42:48 +000021604
Guido van Rossum7f43da71994-08-01 12:15:30 +000021605# check for --with-libm=...
21606
Guido van Rossum563e7081996-09-10 18:20:48 +000021607case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021608Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021609BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021610*) LIBM=-lm
21611esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21613echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021614
Martin v. Löwiseba40652007-08-30 20:10:57 +000021615# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021616if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021617 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021618if test "$withval" = no
21619then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021620 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21621echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021622elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021623then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021624 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21625echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021626else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21627echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21628 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021629fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021630else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021631 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21632echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21633fi
21634
Guido van Rossum7f43da71994-08-01 12:15:30 +000021635
21636# check for --with-libc=...
21637
Martin v. Löwiseba40652007-08-30 20:10:57 +000021638{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21639echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021640
Martin v. Löwiseba40652007-08-30 20:10:57 +000021641# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021642if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021643 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021644if test "$withval" = no
21645then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021646 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21647echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021648elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021649then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021650 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21651echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021652else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21653echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21654 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021655fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021656else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021657 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21658echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21659fi
21660
Guido van Rossum7f43da71994-08-01 12:15:30 +000021661
Christian Heimes0a8143f2007-12-18 23:22:54 +000021662# ************************************
21663# * Check for mathematical functions *
21664# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021665
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021666LIBS_SAVE=$LIBS
21667LIBS="$LIBS $LIBM"
21668
Mark Dickinsone05e8402009-05-04 13:30:43 +000021669# Detect whether system arithmetic is subject to x87-style double
21670# rounding issues. The result of this test has little meaning on non
21671# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21672# mode is round-to-nearest and double rounding issues are present, and
21673# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
21674{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21675echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
21676if test "${ac_cv_x87_double_rounding+set}" = set; then
21677 echo $ECHO_N "(cached) $ECHO_C" >&6
21678else
21679
21680if test "$cross_compiling" = yes; then
21681 ac_cv_x87_double_rounding=no
21682else
21683 cat >conftest.$ac_ext <<_ACEOF
21684/* confdefs.h. */
21685_ACEOF
21686cat confdefs.h >>conftest.$ac_ext
21687cat >>conftest.$ac_ext <<_ACEOF
21688/* end confdefs.h. */
21689
21690#include <stdlib.h>
21691#include <math.h>
21692int main() {
21693 volatile double x, y, z;
21694 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21695 x = 0.99999999999999989; /* 1-2**-53 */
21696 y = 1./x;
21697 if (y != 1.)
21698 exit(0);
21699 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21700 x = 1e16;
21701 y = 2.99999;
21702 z = x + y;
21703 if (z != 1e16+4.)
21704 exit(0);
21705 /* both tests show evidence of double rounding */
21706 exit(1);
21707}
21708
21709_ACEOF
21710rm -f conftest$ac_exeext
21711if { (ac_try="$ac_link"
21712case "(($ac_try" in
21713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21714 *) ac_try_echo=$ac_try;;
21715esac
21716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21717 (eval "$ac_link") 2>&5
21718 ac_status=$?
21719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21720 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21721 { (case "(($ac_try" in
21722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21723 *) ac_try_echo=$ac_try;;
21724esac
21725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21726 (eval "$ac_try") 2>&5
21727 ac_status=$?
21728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21729 (exit $ac_status); }; }; then
21730 ac_cv_x87_double_rounding=no
21731else
21732 echo "$as_me: program exited with status $ac_status" >&5
21733echo "$as_me: failed program was:" >&5
21734sed 's/^/| /' conftest.$ac_ext >&5
21735
21736( exit $ac_status )
21737ac_cv_x87_double_rounding=yes
21738fi
21739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21740fi
21741
21742
21743fi
21744
21745{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
21746echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
21747if test "$ac_cv_x87_double_rounding" = yes
21748then
21749
21750cat >>confdefs.h <<\_ACEOF
21751#define X87_DOUBLE_ROUNDING 1
21752_ACEOF
21753
21754fi
21755
21756
Mark Dickinson265d7382008-04-21 22:32:24 +000021757# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21758# -0. on some architectures.
21759{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21760echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
21761if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
21762 echo $ECHO_N "(cached) $ECHO_C" >&6
21763else
21764
21765if test "$cross_compiling" = yes; then
21766 ac_cv_tanh_preserves_zero_sign=no
21767else
21768 cat >conftest.$ac_ext <<_ACEOF
21769/* confdefs.h. */
21770_ACEOF
21771cat confdefs.h >>conftest.$ac_ext
21772cat >>conftest.$ac_ext <<_ACEOF
21773/* end confdefs.h. */
21774
21775#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021776#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000021777int main() {
21778 /* return 0 if either negative zeros don't exist
21779 on this platform or if negative zeros exist
21780 and tanh(-0.) == -0. */
21781 if (atan2(0., -1.) == atan2(-0., -1.) ||
21782 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21783 else exit(1);
21784}
21785
21786_ACEOF
21787rm -f conftest$ac_exeext
21788if { (ac_try="$ac_link"
21789case "(($ac_try" in
21790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21791 *) ac_try_echo=$ac_try;;
21792esac
21793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21794 (eval "$ac_link") 2>&5
21795 ac_status=$?
21796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21797 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21798 { (case "(($ac_try" in
21799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21800 *) ac_try_echo=$ac_try;;
21801esac
21802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21803 (eval "$ac_try") 2>&5
21804 ac_status=$?
21805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21806 (exit $ac_status); }; }; then
21807 ac_cv_tanh_preserves_zero_sign=yes
21808else
21809 echo "$as_me: program exited with status $ac_status" >&5
21810echo "$as_me: failed program was:" >&5
21811sed 's/^/| /' conftest.$ac_ext >&5
21812
21813( exit $ac_status )
21814ac_cv_tanh_preserves_zero_sign=no
21815fi
21816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21817fi
21818
21819
21820fi
21821
21822{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21823echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
21824if test "$ac_cv_tanh_preserves_zero_sign" = yes
21825then
21826
21827cat >>confdefs.h <<\_ACEOF
21828#define TANH_PRESERVES_ZERO_SIGN 1
21829_ACEOF
21830
21831fi
21832
Martin v. Löwis11437992002-04-12 09:54:03 +000021833
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021834
Michael W. Hudson54241132001-12-07 15:38:26 +000021835
Christian Heimes0a8143f2007-12-18 23:22:54 +000021836
21837
21838
21839
21840
Mark Dickinsone05e8402009-05-04 13:30:43 +000021841for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021842do
21843as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21844{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21845echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21846if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21847 echo $ECHO_N "(cached) $ECHO_C" >&6
21848else
21849 cat >conftest.$ac_ext <<_ACEOF
21850/* confdefs.h. */
21851_ACEOF
21852cat confdefs.h >>conftest.$ac_ext
21853cat >>conftest.$ac_ext <<_ACEOF
21854/* end confdefs.h. */
21855/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21856 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21857#define $ac_func innocuous_$ac_func
21858
21859/* System header to define __stub macros and hopefully few prototypes,
21860 which can conflict with char $ac_func (); below.
21861 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21862 <limits.h> exists even on freestanding compilers. */
21863
21864#ifdef __STDC__
21865# include <limits.h>
21866#else
21867# include <assert.h>
21868#endif
21869
21870#undef $ac_func
21871
21872/* Override any GCC internal prototype to avoid an error.
21873 Use char because int might match the return type of a GCC
21874 builtin and then its argument prototype would still apply. */
21875#ifdef __cplusplus
21876extern "C"
21877#endif
21878char $ac_func ();
21879/* The GNU C library defines this for functions which it implements
21880 to always fail with ENOSYS. Some functions are actually named
21881 something starting with __ and the normal name is an alias. */
21882#if defined __stub_$ac_func || defined __stub___$ac_func
21883choke me
21884#endif
21885
21886int
21887main ()
21888{
21889return $ac_func ();
21890 ;
21891 return 0;
21892}
21893_ACEOF
21894rm -f conftest.$ac_objext conftest$ac_exeext
21895if { (ac_try="$ac_link"
21896case "(($ac_try" in
21897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21898 *) ac_try_echo=$ac_try;;
21899esac
21900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21901 (eval "$ac_link") 2>conftest.er1
21902 ac_status=$?
21903 grep -v '^ *+' conftest.er1 >conftest.err
21904 rm -f conftest.er1
21905 cat conftest.err >&5
21906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21907 (exit $ac_status); } && {
21908 test -z "$ac_c_werror_flag" ||
21909 test ! -s conftest.err
21910 } && test -s conftest$ac_exeext &&
21911 $as_test_x conftest$ac_exeext; then
21912 eval "$as_ac_var=yes"
21913else
21914 echo "$as_me: failed program was:" >&5
21915sed 's/^/| /' conftest.$ac_ext >&5
21916
21917 eval "$as_ac_var=no"
21918fi
21919
21920rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21921 conftest$ac_exeext conftest.$ac_ext
21922fi
21923ac_res=`eval echo '${'$as_ac_var'}'`
21924 { echo "$as_me:$LINENO: result: $ac_res" >&5
21925echo "${ECHO_T}$ac_res" >&6; }
21926if test `eval echo '${'$as_ac_var'}'` = yes; then
21927 cat >>confdefs.h <<_ACEOF
21928#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21929_ACEOF
21930
21931fi
21932done
21933
Mark Dickinsone05e8402009-05-04 13:30:43 +000021934{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
21935echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
21936if test "${ac_cv_have_decl_isinf+set}" = set; then
21937 echo $ECHO_N "(cached) $ECHO_C" >&6
21938else
21939 cat >conftest.$ac_ext <<_ACEOF
21940/* confdefs.h. */
21941_ACEOF
21942cat confdefs.h >>conftest.$ac_ext
21943cat >>conftest.$ac_ext <<_ACEOF
21944/* end confdefs.h. */
21945#include <math.h>
21946
21947int
21948main ()
21949{
21950#ifndef isinf
21951 (void) isinf;
21952#endif
21953
21954 ;
21955 return 0;
21956}
21957_ACEOF
21958rm -f conftest.$ac_objext
21959if { (ac_try="$ac_compile"
21960case "(($ac_try" in
21961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21962 *) ac_try_echo=$ac_try;;
21963esac
21964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21965 (eval "$ac_compile") 2>conftest.er1
21966 ac_status=$?
21967 grep -v '^ *+' conftest.er1 >conftest.err
21968 rm -f conftest.er1
21969 cat conftest.err >&5
21970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21971 (exit $ac_status); } && {
21972 test -z "$ac_c_werror_flag" ||
21973 test ! -s conftest.err
21974 } && test -s conftest.$ac_objext; then
21975 ac_cv_have_decl_isinf=yes
21976else
21977 echo "$as_me: failed program was:" >&5
21978sed 's/^/| /' conftest.$ac_ext >&5
21979
21980 ac_cv_have_decl_isinf=no
21981fi
21982
21983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21984fi
21985{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
21986echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
21987if test $ac_cv_have_decl_isinf = yes; then
21988
21989cat >>confdefs.h <<_ACEOF
21990#define HAVE_DECL_ISINF 1
21991_ACEOF
21992
21993
21994else
21995 cat >>confdefs.h <<_ACEOF
21996#define HAVE_DECL_ISINF 0
21997_ACEOF
21998
21999
22000fi
22001{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22002echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
22003if test "${ac_cv_have_decl_isnan+set}" = set; then
22004 echo $ECHO_N "(cached) $ECHO_C" >&6
22005else
22006 cat >conftest.$ac_ext <<_ACEOF
22007/* confdefs.h. */
22008_ACEOF
22009cat confdefs.h >>conftest.$ac_ext
22010cat >>conftest.$ac_ext <<_ACEOF
22011/* end confdefs.h. */
22012#include <math.h>
22013
22014int
22015main ()
22016{
22017#ifndef isnan
22018 (void) isnan;
22019#endif
22020
22021 ;
22022 return 0;
22023}
22024_ACEOF
22025rm -f conftest.$ac_objext
22026if { (ac_try="$ac_compile"
22027case "(($ac_try" in
22028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22029 *) ac_try_echo=$ac_try;;
22030esac
22031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22032 (eval "$ac_compile") 2>conftest.er1
22033 ac_status=$?
22034 grep -v '^ *+' conftest.er1 >conftest.err
22035 rm -f conftest.er1
22036 cat conftest.err >&5
22037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22038 (exit $ac_status); } && {
22039 test -z "$ac_c_werror_flag" ||
22040 test ! -s conftest.err
22041 } && test -s conftest.$ac_objext; then
22042 ac_cv_have_decl_isnan=yes
22043else
22044 echo "$as_me: failed program was:" >&5
22045sed 's/^/| /' conftest.$ac_ext >&5
22046
22047 ac_cv_have_decl_isnan=no
22048fi
22049
22050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22051fi
22052{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22053echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22054if test $ac_cv_have_decl_isnan = yes; then
22055
22056cat >>confdefs.h <<_ACEOF
22057#define HAVE_DECL_ISNAN 1
22058_ACEOF
22059
22060
22061else
22062 cat >>confdefs.h <<_ACEOF
22063#define HAVE_DECL_ISNAN 0
22064_ACEOF
22065
22066
22067fi
22068{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22069echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
22070if test "${ac_cv_have_decl_isfinite+set}" = set; then
22071 echo $ECHO_N "(cached) $ECHO_C" >&6
22072else
22073 cat >conftest.$ac_ext <<_ACEOF
22074/* confdefs.h. */
22075_ACEOF
22076cat confdefs.h >>conftest.$ac_ext
22077cat >>conftest.$ac_ext <<_ACEOF
22078/* end confdefs.h. */
22079#include <math.h>
22080
22081int
22082main ()
22083{
22084#ifndef isfinite
22085 (void) isfinite;
22086#endif
22087
22088 ;
22089 return 0;
22090}
22091_ACEOF
22092rm -f conftest.$ac_objext
22093if { (ac_try="$ac_compile"
22094case "(($ac_try" in
22095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22096 *) ac_try_echo=$ac_try;;
22097esac
22098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22099 (eval "$ac_compile") 2>conftest.er1
22100 ac_status=$?
22101 grep -v '^ *+' conftest.er1 >conftest.err
22102 rm -f conftest.er1
22103 cat conftest.err >&5
22104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22105 (exit $ac_status); } && {
22106 test -z "$ac_c_werror_flag" ||
22107 test ! -s conftest.err
22108 } && test -s conftest.$ac_objext; then
22109 ac_cv_have_decl_isfinite=yes
22110else
22111 echo "$as_me: failed program was:" >&5
22112sed 's/^/| /' conftest.$ac_ext >&5
22113
22114 ac_cv_have_decl_isfinite=no
22115fi
22116
22117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22118fi
22119{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22120echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22121if test $ac_cv_have_decl_isfinite = yes; then
22122
22123cat >>confdefs.h <<_ACEOF
22124#define HAVE_DECL_ISFINITE 1
22125_ACEOF
22126
22127
22128else
22129 cat >>confdefs.h <<_ACEOF
22130#define HAVE_DECL_ISFINITE 0
22131_ACEOF
22132
22133
22134fi
22135
22136
Christian Heimes0a8143f2007-12-18 23:22:54 +000022137
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022138LIBS=$LIBS_SAVE
22139
Guido van Rossumef2255b2000-03-10 22:30:29 +000022140# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022141if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022142 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22143echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022144if test "${ac_cv_header_wchar_h+set}" = set; then
22145 echo $ECHO_N "(cached) $ECHO_C" >&6
22146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022147{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22148echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022149else
Martin v. Löwis11437992002-04-12 09:54:03 +000022150 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022151{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22152echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022154/* confdefs.h. */
22155_ACEOF
22156cat confdefs.h >>conftest.$ac_ext
22157cat >>conftest.$ac_ext <<_ACEOF
22158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022159$ac_includes_default
22160#include <wchar.h>
22161_ACEOF
22162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022163if { (ac_try="$ac_compile"
22164case "(($ac_try" in
22165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22166 *) ac_try_echo=$ac_try;;
22167esac
22168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022171 grep -v '^ *+' conftest.er1 >conftest.err
22172 rm -f conftest.er1
22173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022175 (exit $ac_status); } && {
22176 test -z "$ac_c_werror_flag" ||
22177 test ! -s conftest.err
22178 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022179 ac_header_compiler=yes
22180else
22181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022182sed 's/^/| /' conftest.$ac_ext >&5
22183
Martin v. Löwiseba40652007-08-30 20:10:57 +000022184 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022186
22187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22188{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22189echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022190
22191# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022192{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22193echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022195/* confdefs.h. */
22196_ACEOF
22197cat confdefs.h >>conftest.$ac_ext
22198cat >>conftest.$ac_ext <<_ACEOF
22199/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022200#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022201_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022202if { (ac_try="$ac_cpp conftest.$ac_ext"
22203case "(($ac_try" in
22204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22205 *) ac_try_echo=$ac_try;;
22206esac
22207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22208 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022209 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022210 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022211 rm -f conftest.er1
22212 cat conftest.err >&5
22213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022214 (exit $ac_status); } >/dev/null && {
22215 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22216 test ! -s conftest.err
22217 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022218 ac_header_preproc=yes
22219else
22220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022221sed 's/^/| /' conftest.$ac_ext >&5
22222
Martin v. Löwis11437992002-04-12 09:54:03 +000022223 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022225
Martin v. Löwis11437992002-04-12 09:54:03 +000022226rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022227{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22228echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022229
22230# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022231case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22232 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022233 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22234echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022235 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22236echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22237 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022238 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022239 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022240 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22241echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022242 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22243echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22244 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22245echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22246 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22247echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022248 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22249echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022250 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22251echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022252 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022253## ------------------------------------------------ ##
22254## Report this to http://www.python.org/python-bugs ##
22255## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022256_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000022257 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022258 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022259esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000022260{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22261echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022262if test "${ac_cv_header_wchar_h+set}" = set; then
22263 echo $ECHO_N "(cached) $ECHO_C" >&6
22264else
22265 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022267{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22268echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022269
22270fi
22271if test $ac_cv_header_wchar_h = yes; then
22272
22273
22274cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022275#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022276_ACEOF
22277
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022278 wchar_h="yes"
22279
Guido van Rossumef2255b2000-03-10 22:30:29 +000022280else
Martin v. Löwis11437992002-04-12 09:54:03 +000022281 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022282
22283fi
22284
Michael W. Hudson54241132001-12-07 15:38:26 +000022285
Martin v. Löwis11437992002-04-12 09:54:03 +000022286
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022287# determine wchar_t size
22288if test "$wchar_h" = yes
22289then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022290 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22291echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022292if test "${ac_cv_type_wchar_t+set}" = set; then
22293 echo $ECHO_N "(cached) $ECHO_C" >&6
22294else
22295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022296/* confdefs.h. */
22297_ACEOF
22298cat confdefs.h >>conftest.$ac_ext
22299cat >>conftest.$ac_ext <<_ACEOF
22300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022301#include <wchar.h>
22302
Martin v. Löwiseba40652007-08-30 20:10:57 +000022303typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022304int
22305main ()
22306{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022307if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022308 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022309if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022310 return 0;
22311 ;
22312 return 0;
22313}
22314_ACEOF
22315rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022316if { (ac_try="$ac_compile"
22317case "(($ac_try" in
22318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22319 *) ac_try_echo=$ac_try;;
22320esac
22321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022324 grep -v '^ *+' conftest.er1 >conftest.err
22325 rm -f conftest.er1
22326 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022328 (exit $ac_status); } && {
22329 test -z "$ac_c_werror_flag" ||
22330 test ! -s conftest.err
22331 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022332 ac_cv_type_wchar_t=yes
22333else
22334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022335sed 's/^/| /' conftest.$ac_ext >&5
22336
Martin v. Löwiseba40652007-08-30 20:10:57 +000022337 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022338fi
Brett Cannon19fab762007-06-02 03:02:29 +000022339
Martin v. Löwiseba40652007-08-30 20:10:57 +000022340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22341fi
22342{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22343echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22344
22345# The cast to long int works around a bug in the HP C Compiler
22346# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22347# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22348# This bug is HP SR number 8606223364.
22349{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22350echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022351if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22352 echo $ECHO_N "(cached) $ECHO_C" >&6
22353else
Martin v. Löwis11437992002-04-12 09:54:03 +000022354 if test "$cross_compiling" = yes; then
22355 # Depending upon the size, compute the lo and hi bounds.
22356cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022357/* confdefs.h. */
22358_ACEOF
22359cat confdefs.h >>conftest.$ac_ext
22360cat >>conftest.$ac_ext <<_ACEOF
22361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022362#include <wchar.h>
22363
Martin v. Löwiseba40652007-08-30 20:10:57 +000022364 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022365int
22366main ()
22367{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022368static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022369test_array [0] = 0
22370
22371 ;
22372 return 0;
22373}
22374_ACEOF
22375rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022376if { (ac_try="$ac_compile"
22377case "(($ac_try" in
22378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22379 *) ac_try_echo=$ac_try;;
22380esac
22381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022384 grep -v '^ *+' conftest.er1 >conftest.err
22385 rm -f conftest.er1
22386 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022388 (exit $ac_status); } && {
22389 test -z "$ac_c_werror_flag" ||
22390 test ! -s conftest.err
22391 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022392 ac_lo=0 ac_mid=0
22393 while :; do
22394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022395/* confdefs.h. */
22396_ACEOF
22397cat confdefs.h >>conftest.$ac_ext
22398cat >>conftest.$ac_ext <<_ACEOF
22399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022400#include <wchar.h>
22401
Martin v. Löwiseba40652007-08-30 20:10:57 +000022402 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022403int
22404main ()
22405{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022407test_array [0] = 0
22408
22409 ;
22410 return 0;
22411}
22412_ACEOF
22413rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022414if { (ac_try="$ac_compile"
22415case "(($ac_try" in
22416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22417 *) ac_try_echo=$ac_try;;
22418esac
22419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022422 grep -v '^ *+' conftest.er1 >conftest.err
22423 rm -f conftest.er1
22424 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022426 (exit $ac_status); } && {
22427 test -z "$ac_c_werror_flag" ||
22428 test ! -s conftest.err
22429 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022430 ac_hi=$ac_mid; break
22431else
22432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022433sed 's/^/| /' conftest.$ac_ext >&5
22434
Martin v. Löwiseba40652007-08-30 20:10:57 +000022435 ac_lo=`expr $ac_mid + 1`
22436 if test $ac_lo -le $ac_mid; then
22437 ac_lo= ac_hi=
22438 break
22439 fi
22440 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022442
22443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022444 done
22445else
22446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022447sed 's/^/| /' conftest.$ac_ext >&5
22448
Martin v. Löwiseba40652007-08-30 20:10:57 +000022449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022450/* confdefs.h. */
22451_ACEOF
22452cat confdefs.h >>conftest.$ac_ext
22453cat >>conftest.$ac_ext <<_ACEOF
22454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022455#include <wchar.h>
22456
Martin v. Löwiseba40652007-08-30 20:10:57 +000022457 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022458int
22459main ()
22460{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022461static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022462test_array [0] = 0
22463
22464 ;
22465 return 0;
22466}
22467_ACEOF
22468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022469if { (ac_try="$ac_compile"
22470case "(($ac_try" in
22471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22472 *) ac_try_echo=$ac_try;;
22473esac
22474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022477 grep -v '^ *+' conftest.er1 >conftest.err
22478 rm -f conftest.er1
22479 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022481 (exit $ac_status); } && {
22482 test -z "$ac_c_werror_flag" ||
22483 test ! -s conftest.err
22484 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022485 ac_hi=-1 ac_mid=-1
22486 while :; do
22487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022488/* confdefs.h. */
22489_ACEOF
22490cat confdefs.h >>conftest.$ac_ext
22491cat >>conftest.$ac_ext <<_ACEOF
22492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022493#include <wchar.h>
22494
Martin v. Löwiseba40652007-08-30 20:10:57 +000022495 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022496int
22497main ()
22498{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022499static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022500test_array [0] = 0
22501
22502 ;
22503 return 0;
22504}
22505_ACEOF
22506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022507if { (ac_try="$ac_compile"
22508case "(($ac_try" in
22509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22510 *) ac_try_echo=$ac_try;;
22511esac
22512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022515 grep -v '^ *+' conftest.er1 >conftest.err
22516 rm -f conftest.er1
22517 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022519 (exit $ac_status); } && {
22520 test -z "$ac_c_werror_flag" ||
22521 test ! -s conftest.err
22522 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022523 ac_lo=$ac_mid; break
22524else
22525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022526sed 's/^/| /' conftest.$ac_ext >&5
22527
Martin v. Löwiseba40652007-08-30 20:10:57 +000022528 ac_hi=`expr '(' $ac_mid ')' - 1`
22529 if test $ac_mid -le $ac_hi; then
22530 ac_lo= ac_hi=
22531 break
22532 fi
22533 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022535
22536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022537 done
22538else
22539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022540sed 's/^/| /' conftest.$ac_ext >&5
22541
Martin v. Löwiseba40652007-08-30 20:10:57 +000022542 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022544
22545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022547
22548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022549# Binary search between lo and hi bounds.
22550while test "x$ac_lo" != "x$ac_hi"; do
22551 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022553/* confdefs.h. */
22554_ACEOF
22555cat confdefs.h >>conftest.$ac_ext
22556cat >>conftest.$ac_ext <<_ACEOF
22557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022558#include <wchar.h>
22559
Martin v. Löwiseba40652007-08-30 20:10:57 +000022560 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022561int
22562main ()
22563{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022565test_array [0] = 0
22566
22567 ;
22568 return 0;
22569}
22570_ACEOF
22571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022572if { (ac_try="$ac_compile"
22573case "(($ac_try" in
22574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22575 *) ac_try_echo=$ac_try;;
22576esac
22577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022580 grep -v '^ *+' conftest.er1 >conftest.err
22581 rm -f conftest.er1
22582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022584 (exit $ac_status); } && {
22585 test -z "$ac_c_werror_flag" ||
22586 test ! -s conftest.err
22587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022588 ac_hi=$ac_mid
22589else
22590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022591sed 's/^/| /' conftest.$ac_ext >&5
22592
Martin v. Löwiseba40652007-08-30 20:10:57 +000022593 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022595
22596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022597done
22598case $ac_lo in
22599?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022600'') if test "$ac_cv_type_wchar_t" = yes; then
22601 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022602See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022603echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022604See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022605 { (exit 77); exit 77; }; }
22606 else
22607 ac_cv_sizeof_wchar_t=0
22608 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022609esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022610else
Martin v. Löwis11437992002-04-12 09:54:03 +000022611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022612/* confdefs.h. */
22613_ACEOF
22614cat confdefs.h >>conftest.$ac_ext
22615cat >>conftest.$ac_ext <<_ACEOF
22616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022617#include <wchar.h>
22618
Martin v. Löwiseba40652007-08-30 20:10:57 +000022619 typedef wchar_t ac__type_sizeof_;
22620static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22621static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022622#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022623#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022624int
22625main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022626{
Martin v. Löwis11437992002-04-12 09:54:03 +000022627
22628 FILE *f = fopen ("conftest.val", "w");
22629 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022630 return 1;
22631 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022632 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022633 long int i = longval ();
22634 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22635 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022636 fprintf (f, "%ld\n", i);
22637 }
22638 else
22639 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022640 unsigned long int i = ulongval ();
22641 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22642 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022643 fprintf (f, "%lu\n", i);
22644 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022645 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022646
22647 ;
22648 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022649}
Martin v. Löwis11437992002-04-12 09:54:03 +000022650_ACEOF
22651rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022652if { (ac_try="$ac_link"
22653case "(($ac_try" in
22654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22655 *) ac_try_echo=$ac_try;;
22656esac
22657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22658 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022659 ac_status=$?
22660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022662 { (case "(($ac_try" in
22663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22664 *) ac_try_echo=$ac_try;;
22665esac
22666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22667 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022668 ac_status=$?
22669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22670 (exit $ac_status); }; }; then
22671 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022672else
Martin v. Löwis11437992002-04-12 09:54:03 +000022673 echo "$as_me: program exited with status $ac_status" >&5
22674echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022675sed 's/^/| /' conftest.$ac_ext >&5
22676
Martin v. Löwis11437992002-04-12 09:54:03 +000022677( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022678if test "$ac_cv_type_wchar_t" = yes; then
22679 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022680See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022681echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022682See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022683 { (exit 77); exit 77; }; }
22684 else
22685 ac_cv_sizeof_wchar_t=0
22686 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022688rm -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 +000022689fi
22690rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022692{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22693echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22694
22695
22696
Martin v. Löwis11437992002-04-12 09:54:03 +000022697cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022698#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022699_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022700
Michael W. Hudson54241132001-12-07 15:38:26 +000022701
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022702fi
22703
Martin v. Löwiseba40652007-08-30 20:10:57 +000022704{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22705echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022706have_ucs4_tcl=no
22707cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022708/* confdefs.h. */
22709_ACEOF
22710cat confdefs.h >>conftest.$ac_ext
22711cat >>conftest.$ac_ext <<_ACEOF
22712/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022713
22714#include <tcl.h>
22715#if TCL_UTF_MAX != 6
22716# error "NOT UCS4_TCL"
22717#endif
22718int
22719main ()
22720{
22721
22722 ;
22723 return 0;
22724}
22725_ACEOF
22726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022727if { (ac_try="$ac_compile"
22728case "(($ac_try" in
22729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22730 *) ac_try_echo=$ac_try;;
22731esac
22732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022735 grep -v '^ *+' conftest.er1 >conftest.err
22736 rm -f conftest.er1
22737 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022739 (exit $ac_status); } && {
22740 test -z "$ac_c_werror_flag" ||
22741 test ! -s conftest.err
22742 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022743
22744
22745cat >>confdefs.h <<\_ACEOF
22746#define HAVE_UCS4_TCL 1
22747_ACEOF
22748
22749 have_ucs4_tcl=yes
22750
22751else
22752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022753sed 's/^/| /' conftest.$ac_ext >&5
22754
Martin v. Löwiseba40652007-08-30 20:10:57 +000022755
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022757
22758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22759{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
22760echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022761
Skip Montanaro6dead952003-09-25 14:50:04 +000022762# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022763if test "$wchar_h" = yes
22764then
22765 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000022766 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
22767echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022768 if test "${ac_cv_wchar_t_signed+set}" = set; then
22769 echo $ECHO_N "(cached) $ECHO_C" >&6
22770else
22771
22772 if test "$cross_compiling" = yes; then
22773 ac_cv_wchar_t_signed=yes
22774else
22775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022776/* confdefs.h. */
22777_ACEOF
22778cat confdefs.h >>conftest.$ac_ext
22779cat >>conftest.$ac_ext <<_ACEOF
22780/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022781
22782 #include <wchar.h>
22783 int main()
22784 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000022785 /* Success: exit code 0 */
22786 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022787 }
22788
22789_ACEOF
22790rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022791if { (ac_try="$ac_link"
22792case "(($ac_try" in
22793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22794 *) ac_try_echo=$ac_try;;
22795esac
22796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22797 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022798 ac_status=$?
22799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022801 { (case "(($ac_try" in
22802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22803 *) ac_try_echo=$ac_try;;
22804esac
22805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22806 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022807 ac_status=$?
22808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22809 (exit $ac_status); }; }; then
22810 ac_cv_wchar_t_signed=yes
22811else
22812 echo "$as_me: program exited with status $ac_status" >&5
22813echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022814sed 's/^/| /' conftest.$ac_ext >&5
22815
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022816( exit $ac_status )
22817ac_cv_wchar_t_signed=no
22818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022819rm -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 +000022820fi
22821
Martin v. Löwiseba40652007-08-30 20:10:57 +000022822
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022823fi
22824
Martin v. Löwiseba40652007-08-30 20:10:57 +000022825 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
22826echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
22827fi
22828
22829{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
22830echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
22831# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022832if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022833 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022834else
22835 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000022836fi
22837
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022838
22839if test $enable_unicode = yes
22840then
Martin v. Löwisfd917792001-06-27 20:22:04 +000022841 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022842 case "$have_ucs4_tcl" in
22843 yes) enable_unicode="ucs4"
22844 ;;
22845 *) enable_unicode="ucs2"
22846 ;;
22847 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022848fi
22849
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022850
22851
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022852case "$enable_unicode" in
22853ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000022854 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022855#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000022856_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022857
22858 ;;
22859ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000022860 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022861#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000022862_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022863
22864 ;;
22865esac
22866
Michael W. Hudson54241132001-12-07 15:38:26 +000022867
Martin v. Löwis11437992002-04-12 09:54:03 +000022868
22869
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022870
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022871if test "$enable_unicode" = "no"
22872then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022873 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000022874 { echo "$as_me:$LINENO: result: not used" >&5
22875echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022876else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022877 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000022878
22879cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022880#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022881_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022882
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022883
22884 # wchar_t is only usable if it maps to an unsigned type
22885 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022886 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022887 then
22888 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022889
Martin v. Löwis11437992002-04-12 09:54:03 +000022890cat >>confdefs.h <<\_ACEOF
22891#define HAVE_USABLE_WCHAR_T 1
22892_ACEOF
22893
22894 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022895#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022896_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022897
22898 elif test "$ac_cv_sizeof_short" = "$unicode_size"
22899 then
22900 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000022901 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022902#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022903_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022904
22905 elif test "$ac_cv_sizeof_long" = "$unicode_size"
22906 then
22907 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000022908 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022909#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022910_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022911
22912 else
22913 PY_UNICODE_TYPE="no type found"
22914 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022915 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22916echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022917fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022918
22919# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000022920{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22921echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022922if test "${ac_cv_c_bigendian+set}" = set; then
22923 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022924else
Martin v. Löwis11437992002-04-12 09:54:03 +000022925 # See if sys/param.h defines the BYTE_ORDER macro.
22926cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022927/* confdefs.h. */
22928_ACEOF
22929cat confdefs.h >>conftest.$ac_ext
22930cat >>conftest.$ac_ext <<_ACEOF
22931/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022932#include <sys/types.h>
22933#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022934
Martin v. Löwis11437992002-04-12 09:54:03 +000022935int
22936main ()
22937{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022938#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22939 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022940 bogus endian macros
22941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022942
22943 ;
22944 return 0;
22945}
22946_ACEOF
22947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022948if { (ac_try="$ac_compile"
22949case "(($ac_try" in
22950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22951 *) ac_try_echo=$ac_try;;
22952esac
22953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022956 grep -v '^ *+' conftest.er1 >conftest.err
22957 rm -f conftest.er1
22958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022960 (exit $ac_status); } && {
22961 test -z "$ac_c_werror_flag" ||
22962 test ! -s conftest.err
22963 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022964 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022966/* confdefs.h. */
22967_ACEOF
22968cat confdefs.h >>conftest.$ac_ext
22969cat >>conftest.$ac_ext <<_ACEOF
22970/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022971#include <sys/types.h>
22972#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022973
Martin v. Löwis11437992002-04-12 09:54:03 +000022974int
22975main ()
22976{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022977#if BYTE_ORDER != BIG_ENDIAN
22978 not big endian
22979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022980
22981 ;
22982 return 0;
22983}
22984_ACEOF
22985rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022986if { (ac_try="$ac_compile"
22987case "(($ac_try" in
22988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22989 *) ac_try_echo=$ac_try;;
22990esac
22991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022994 grep -v '^ *+' conftest.er1 >conftest.err
22995 rm -f conftest.er1
22996 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022998 (exit $ac_status); } && {
22999 test -z "$ac_c_werror_flag" ||
23000 test ! -s conftest.err
23001 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023002 ac_cv_c_bigendian=yes
23003else
Martin v. Löwis11437992002-04-12 09:54:03 +000023004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023005sed 's/^/| /' conftest.$ac_ext >&5
23006
Martin v. Löwiseba40652007-08-30 20:10:57 +000023007 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023009
23010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023011else
Martin v. Löwis11437992002-04-12 09:54:03 +000023012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023013sed 's/^/| /' conftest.$ac_ext >&5
23014
Martin v. Löwiseba40652007-08-30 20:10:57 +000023015 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000023016if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023017 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000023018 ac_cv_c_bigendian=unknown
23019 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023020/* confdefs.h. */
23021_ACEOF
23022cat confdefs.h >>conftest.$ac_ext
23023cat >>conftest.$ac_ext <<_ACEOF
23024/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023025short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23026short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023027void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023028short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23029short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023030void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023031int
23032main ()
23033{
23034 _ascii (); _ebcdic ();
23035 ;
23036 return 0;
23037}
23038_ACEOF
23039rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023040if { (ac_try="$ac_compile"
23041case "(($ac_try" in
23042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23043 *) ac_try_echo=$ac_try;;
23044esac
23045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023048 grep -v '^ *+' conftest.er1 >conftest.err
23049 rm -f conftest.er1
23050 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023052 (exit $ac_status); } && {
23053 test -z "$ac_c_werror_flag" ||
23054 test ! -s conftest.err
23055 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023056 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023057 ac_cv_c_bigendian=yes
23058fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023059if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023060 if test "$ac_cv_c_bigendian" = unknown; then
23061 ac_cv_c_bigendian=no
23062 else
23063 # finding both strings is unlikely to happen, but who knows?
23064 ac_cv_c_bigendian=unknown
23065 fi
23066fi
23067else
23068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023069sed 's/^/| /' conftest.$ac_ext >&5
23070
Martin v. Löwiseba40652007-08-30 20:10:57 +000023071
Martin v. Löwis11437992002-04-12 09:54:03 +000023072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023073
23074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023075else
23076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023077/* confdefs.h. */
23078_ACEOF
23079cat confdefs.h >>conftest.$ac_ext
23080cat >>conftest.$ac_ext <<_ACEOF
23081/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023082$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023083int
23084main ()
23085{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023086
Guido van Rossumef2255b2000-03-10 22:30:29 +000023087 /* Are we little or big endian? From Harbison&Steele. */
23088 union
23089 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023090 long int l;
23091 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023092 } u;
23093 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023094 return u.c[sizeof (long int) - 1] == 1;
23095
23096 ;
23097 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023098}
Martin v. Löwis11437992002-04-12 09:54:03 +000023099_ACEOF
23100rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023101if { (ac_try="$ac_link"
23102case "(($ac_try" in
23103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23104 *) ac_try_echo=$ac_try;;
23105esac
23106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23107 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023108 ac_status=$?
23109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23110 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023111 { (case "(($ac_try" in
23112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23113 *) ac_try_echo=$ac_try;;
23114esac
23115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23116 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023117 ac_status=$?
23118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23119 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023120 ac_cv_c_bigendian=no
23121else
Martin v. Löwis11437992002-04-12 09:54:03 +000023122 echo "$as_me: program exited with status $ac_status" >&5
23123echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023124sed 's/^/| /' conftest.$ac_ext >&5
23125
Martin v. Löwis11437992002-04-12 09:54:03 +000023126( exit $ac_status )
23127ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023129rm -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 +000023130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023131
23132
Martin v. Löwis11437992002-04-12 09:54:03 +000023133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023134
23135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023137{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23138echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023139case $ac_cv_c_bigendian in
23140 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023141
Martin v. Löwis11437992002-04-12 09:54:03 +000023142cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023143#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023144_ACEOF
23145 ;;
23146 no)
23147 ;;
23148 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023149 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023150presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023151echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023152presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23153 { (exit 1); exit 1; }; } ;;
23154esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023155
Michael W. Hudson54241132001-12-07 15:38:26 +000023156
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023157# Check whether right shifting a negative integer extends the sign bit
23158# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000023159{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23160echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023161if test "${ac_cv_rshift_extends_sign+set}" = set; then
23162 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023163else
Martin v. Löwis11437992002-04-12 09:54:03 +000023164
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023165if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023166 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023167else
Martin v. Löwis11437992002-04-12 09:54:03 +000023168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023169/* confdefs.h. */
23170_ACEOF
23171cat confdefs.h >>conftest.$ac_ext
23172cat >>conftest.$ac_ext <<_ACEOF
23173/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023174
23175int main()
23176{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023177 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023178}
23179
Martin v. Löwis11437992002-04-12 09:54:03 +000023180_ACEOF
23181rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023182if { (ac_try="$ac_link"
23183case "(($ac_try" in
23184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23185 *) ac_try_echo=$ac_try;;
23186esac
23187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23188 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023189 ac_status=$?
23190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23191 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023192 { (case "(($ac_try" in
23193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23194 *) ac_try_echo=$ac_try;;
23195esac
23196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23197 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023198 ac_status=$?
23199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23200 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023201 ac_cv_rshift_extends_sign=yes
23202else
Martin v. Löwis11437992002-04-12 09:54:03 +000023203 echo "$as_me: program exited with status $ac_status" >&5
23204echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023205sed 's/^/| /' conftest.$ac_ext >&5
23206
Martin v. Löwis11437992002-04-12 09:54:03 +000023207( exit $ac_status )
23208ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023210rm -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 +000023211fi
23212
Martin v. Löwiseba40652007-08-30 20:10:57 +000023213
23214fi
23215
23216{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23217echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023218if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023219then
Martin v. Löwis11437992002-04-12 09:54:03 +000023220
23221cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023222#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023223_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023224
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023225fi
23226
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023227# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000023228{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23229echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023230if test "${ac_cv_have_getc_unlocked+set}" = set; then
23231 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023232else
Martin v. Löwis11437992002-04-12 09:54:03 +000023233
23234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023235/* confdefs.h. */
23236_ACEOF
23237cat confdefs.h >>conftest.$ac_ext
23238cat >>conftest.$ac_ext <<_ACEOF
23239/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023240#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023241int
23242main ()
23243{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023244
23245 FILE *f = fopen("/dev/null", "r");
23246 flockfile(f);
23247 getc_unlocked(f);
23248 funlockfile(f);
23249
Martin v. Löwis11437992002-04-12 09:54:03 +000023250 ;
23251 return 0;
23252}
23253_ACEOF
23254rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023255if { (ac_try="$ac_link"
23256case "(($ac_try" in
23257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23258 *) ac_try_echo=$ac_try;;
23259esac
23260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23261 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023263 grep -v '^ *+' conftest.er1 >conftest.err
23264 rm -f conftest.er1
23265 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023267 (exit $ac_status); } && {
23268 test -z "$ac_c_werror_flag" ||
23269 test ! -s conftest.err
23270 } && test -s conftest$ac_exeext &&
23271 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023272 ac_cv_have_getc_unlocked=yes
23273else
Martin v. Löwis11437992002-04-12 09:54:03 +000023274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023275sed 's/^/| /' conftest.$ac_ext >&5
23276
Martin v. Löwiseba40652007-08-30 20:10:57 +000023277 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023279
23280rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023281 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023282fi
23283
Martin v. Löwiseba40652007-08-30 20:10:57 +000023284{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23285echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023286if test "$ac_cv_have_getc_unlocked" = yes
23287then
Martin v. Löwis11437992002-04-12 09:54:03 +000023288
23289cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023290#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023291_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023292
23293fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023294
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023295# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023296# save the value of LIBS so we don't actually link Python with readline
23297LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023298
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023299# On some systems we need to link readline to a termcap compatible
23300# library. NOTE: Keep the precedence of listed libraries synchronised
23301# with setup.py.
23302py_cv_lib_readline=no
23303{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23304echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
23305for py_libtermcap in "" ncursesw ncurses curses termcap; do
23306 if test -z "$py_libtermcap"; then
23307 READLINE_LIBS="-lreadline"
23308 else
23309 READLINE_LIBS="-lreadline -l$py_libtermcap"
23310 fi
23311 LIBS="$READLINE_LIBS $LIBS_no_readline"
23312 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023313/* confdefs.h. */
23314_ACEOF
23315cat confdefs.h >>conftest.$ac_ext
23316cat >>conftest.$ac_ext <<_ACEOF
23317/* end confdefs.h. */
23318
Martin v. Löwiseba40652007-08-30 20:10:57 +000023319/* Override any GCC internal prototype to avoid an error.
23320 Use char because int might match the return type of a GCC
23321 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023322#ifdef __cplusplus
23323extern "C"
23324#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023325char readline ();
23326int
23327main ()
23328{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023329return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023330 ;
23331 return 0;
23332}
23333_ACEOF
23334rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023335if { (ac_try="$ac_link"
23336case "(($ac_try" in
23337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23338 *) ac_try_echo=$ac_try;;
23339esac
23340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23341 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023342 ac_status=$?
23343 grep -v '^ *+' conftest.er1 >conftest.err
23344 rm -f conftest.er1
23345 cat conftest.err >&5
23346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023347 (exit $ac_status); } && {
23348 test -z "$ac_c_werror_flag" ||
23349 test ! -s conftest.err
23350 } && test -s conftest$ac_exeext &&
23351 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023352 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023353else
23354 echo "$as_me: failed program was:" >&5
23355sed 's/^/| /' conftest.$ac_ext >&5
23356
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023357
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023359
23360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023361 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023362 if test $py_cv_lib_readline = yes; then
23363 break
23364 fi
23365done
23366# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23367#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000023368if test $py_cv_lib_readline = no; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023369 { echo "$as_me:$LINENO: result: none" >&5
23370echo "${ECHO_T}none" >&6; }
23371else
23372 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23373echo "${ECHO_T}$READLINE_LIBS" >&6; }
23374
23375cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023376#define HAVE_LIBREADLINE 1
23377_ACEOF
23378
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023379fi
23380
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023381# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023382{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23383echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023384if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23385 echo $ECHO_N "(cached) $ECHO_C" >&6
23386else
23387 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023388LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023389cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023390/* confdefs.h. */
23391_ACEOF
23392cat confdefs.h >>conftest.$ac_ext
23393cat >>conftest.$ac_ext <<_ACEOF
23394/* end confdefs.h. */
23395
Martin v. Löwiseba40652007-08-30 20:10:57 +000023396/* Override any GCC internal prototype to avoid an error.
23397 Use char because int might match the return type of a GCC
23398 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023399#ifdef __cplusplus
23400extern "C"
23401#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023402char rl_callback_handler_install ();
23403int
23404main ()
23405{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023406return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023407 ;
23408 return 0;
23409}
23410_ACEOF
23411rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023412if { (ac_try="$ac_link"
23413case "(($ac_try" in
23414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23415 *) ac_try_echo=$ac_try;;
23416esac
23417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23418 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023420 grep -v '^ *+' conftest.er1 >conftest.err
23421 rm -f conftest.er1
23422 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023424 (exit $ac_status); } && {
23425 test -z "$ac_c_werror_flag" ||
23426 test ! -s conftest.err
23427 } && test -s conftest$ac_exeext &&
23428 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023429 ac_cv_lib_readline_rl_callback_handler_install=yes
23430else
23431 echo "$as_me: failed program was:" >&5
23432sed 's/^/| /' conftest.$ac_ext >&5
23433
Martin v. Löwiseba40652007-08-30 20:10:57 +000023434 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023436
23437rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023438 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023439LIBS=$ac_check_lib_save_LIBS
23440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023441{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23442echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023443if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23444
23445cat >>confdefs.h <<\_ACEOF
23446#define HAVE_RL_CALLBACK 1
23447_ACEOF
23448
23449fi
23450
23451
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023452# check for readline 2.2
23453cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023454/* confdefs.h. */
23455_ACEOF
23456cat confdefs.h >>conftest.$ac_ext
23457cat >>conftest.$ac_ext <<_ACEOF
23458/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023459#include <readline/readline.h>
23460_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023461if { (ac_try="$ac_cpp conftest.$ac_ext"
23462case "(($ac_try" in
23463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23464 *) ac_try_echo=$ac_try;;
23465esac
23466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23467 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023468 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023469 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023470 rm -f conftest.er1
23471 cat conftest.err >&5
23472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023473 (exit $ac_status); } >/dev/null && {
23474 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23475 test ! -s conftest.err
23476 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023477 have_readline=yes
23478else
23479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023480sed 's/^/| /' conftest.$ac_ext >&5
23481
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023482 have_readline=no
23483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023484
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023485rm -f conftest.err conftest.$ac_ext
23486if test $have_readline = yes
23487then
23488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023489/* confdefs.h. */
23490_ACEOF
23491cat confdefs.h >>conftest.$ac_ext
23492cat >>conftest.$ac_ext <<_ACEOF
23493/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023494#include <readline/readline.h>
23495
23496_ACEOF
23497if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023498 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023499
23500cat >>confdefs.h <<\_ACEOF
23501#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23502_ACEOF
23503
23504fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000023505rm -f conftest*
Antoine Pitrou632e93f2009-10-27 12:30:12 +000023506
23507 cat >conftest.$ac_ext <<_ACEOF
23508/* confdefs.h. */
23509_ACEOF
23510cat confdefs.h >>conftest.$ac_ext
23511cat >>conftest.$ac_ext <<_ACEOF
23512/* end confdefs.h. */
23513#include <readline/readline.h>
23514
23515_ACEOF
23516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23517 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
23518
23519cat >>confdefs.h <<\_ACEOF
23520#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
23521_ACEOF
23522
23523fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000023524rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023525
23526fi
23527
Martin v. Löwis0daad592001-09-30 21:09:59 +000023528# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023529{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23530echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023531if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23532 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023533else
Martin v. Löwis11437992002-04-12 09:54:03 +000023534 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023535LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023537/* confdefs.h. */
23538_ACEOF
23539cat confdefs.h >>conftest.$ac_ext
23540cat >>conftest.$ac_ext <<_ACEOF
23541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023542
Martin v. Löwiseba40652007-08-30 20:10:57 +000023543/* Override any GCC internal prototype to avoid an error.
23544 Use char because int might match the return type of a GCC
23545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023546#ifdef __cplusplus
23547extern "C"
23548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023549char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023550int
23551main ()
23552{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023553return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023554 ;
23555 return 0;
23556}
23557_ACEOF
23558rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023559if { (ac_try="$ac_link"
23560case "(($ac_try" in
23561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23562 *) ac_try_echo=$ac_try;;
23563esac
23564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23565 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023567 grep -v '^ *+' conftest.er1 >conftest.err
23568 rm -f conftest.er1
23569 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023571 (exit $ac_status); } && {
23572 test -z "$ac_c_werror_flag" ||
23573 test ! -s conftest.err
23574 } && test -s conftest$ac_exeext &&
23575 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023576 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023577else
Martin v. Löwis11437992002-04-12 09:54:03 +000023578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023579sed 's/^/| /' conftest.$ac_ext >&5
23580
Martin v. Löwiseba40652007-08-30 20:10:57 +000023581 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023583
23584rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023585 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023586LIBS=$ac_check_lib_save_LIBS
23587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023588{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23589echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023590if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023591
Martin v. Löwis11437992002-04-12 09:54:03 +000023592cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023593#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023594_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023595
Martin v. Löwis0daad592001-09-30 21:09:59 +000023596fi
23597
Michael W. Hudson54241132001-12-07 15:38:26 +000023598
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023599# also in 4.0
23600{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23601echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23602if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23603 echo $ECHO_N "(cached) $ECHO_C" >&6
23604else
23605 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023606LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023607cat >conftest.$ac_ext <<_ACEOF
23608/* confdefs.h. */
23609_ACEOF
23610cat confdefs.h >>conftest.$ac_ext
23611cat >>conftest.$ac_ext <<_ACEOF
23612/* end confdefs.h. */
23613
23614/* Override any GCC internal prototype to avoid an error.
23615 Use char because int might match the return type of a GCC
23616 builtin and then its argument prototype would still apply. */
23617#ifdef __cplusplus
23618extern "C"
23619#endif
23620char rl_completion_display_matches_hook ();
23621int
23622main ()
23623{
23624return rl_completion_display_matches_hook ();
23625 ;
23626 return 0;
23627}
23628_ACEOF
23629rm -f conftest.$ac_objext conftest$ac_exeext
23630if { (ac_try="$ac_link"
23631case "(($ac_try" in
23632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23633 *) ac_try_echo=$ac_try;;
23634esac
23635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23636 (eval "$ac_link") 2>conftest.er1
23637 ac_status=$?
23638 grep -v '^ *+' conftest.er1 >conftest.err
23639 rm -f conftest.er1
23640 cat conftest.err >&5
23641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23642 (exit $ac_status); } && {
23643 test -z "$ac_c_werror_flag" ||
23644 test ! -s conftest.err
23645 } && test -s conftest$ac_exeext &&
23646 $as_test_x conftest$ac_exeext; then
23647 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23648else
23649 echo "$as_me: failed program was:" >&5
23650sed 's/^/| /' conftest.$ac_ext >&5
23651
23652 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23653fi
23654
23655rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23656 conftest$ac_exeext conftest.$ac_ext
23657LIBS=$ac_check_lib_save_LIBS
23658fi
23659{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23660echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23661if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23662
23663cat >>confdefs.h <<\_ACEOF
23664#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23665_ACEOF
23666
23667fi
23668
23669
Martin v. Löwis0daad592001-09-30 21:09:59 +000023670# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023671{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23672echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023673if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23674 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023675else
Martin v. Löwis11437992002-04-12 09:54:03 +000023676 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023677LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023678cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023679/* confdefs.h. */
23680_ACEOF
23681cat confdefs.h >>conftest.$ac_ext
23682cat >>conftest.$ac_ext <<_ACEOF
23683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023684
Martin v. Löwiseba40652007-08-30 20:10:57 +000023685/* Override any GCC internal prototype to avoid an error.
23686 Use char because int might match the return type of a GCC
23687 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023688#ifdef __cplusplus
23689extern "C"
23690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023691char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023692int
23693main ()
23694{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023695return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023696 ;
23697 return 0;
23698}
23699_ACEOF
23700rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023701if { (ac_try="$ac_link"
23702case "(($ac_try" in
23703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23704 *) ac_try_echo=$ac_try;;
23705esac
23706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23707 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023709 grep -v '^ *+' conftest.er1 >conftest.err
23710 rm -f conftest.er1
23711 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023713 (exit $ac_status); } && {
23714 test -z "$ac_c_werror_flag" ||
23715 test ! -s conftest.err
23716 } && test -s conftest$ac_exeext &&
23717 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023718 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023719else
Martin v. Löwis11437992002-04-12 09:54:03 +000023720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023721sed 's/^/| /' conftest.$ac_ext >&5
23722
Martin v. Löwiseba40652007-08-30 20:10:57 +000023723 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023725
23726rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023727 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023728LIBS=$ac_check_lib_save_LIBS
23729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023730{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23731echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023732if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023733
Martin v. Löwis11437992002-04-12 09:54:03 +000023734cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023735#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023736_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023737
Guido van Rossum353ae582001-07-10 16:45:32 +000023738fi
23739
Jack Jansendd19cf82001-12-06 22:36:17 +000023740
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023741# also in readline 4.2
23742cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023743/* confdefs.h. */
23744_ACEOF
23745cat confdefs.h >>conftest.$ac_ext
23746cat >>conftest.$ac_ext <<_ACEOF
23747/* end confdefs.h. */
23748#include <readline/readline.h>
23749_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023750if { (ac_try="$ac_cpp conftest.$ac_ext"
23751case "(($ac_try" in
23752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23753 *) ac_try_echo=$ac_try;;
23754esac
23755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23756 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023757 ac_status=$?
23758 grep -v '^ *+' conftest.er1 >conftest.err
23759 rm -f conftest.er1
23760 cat conftest.err >&5
23761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023762 (exit $ac_status); } >/dev/null && {
23763 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23764 test ! -s conftest.err
23765 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023766 have_readline=yes
23767else
23768 echo "$as_me: failed program was:" >&5
23769sed 's/^/| /' conftest.$ac_ext >&5
23770
23771 have_readline=no
23772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023773
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023774rm -f conftest.err conftest.$ac_ext
23775if test $have_readline = yes
23776then
23777 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023778/* confdefs.h. */
23779_ACEOF
23780cat confdefs.h >>conftest.$ac_ext
23781cat >>conftest.$ac_ext <<_ACEOF
23782/* end confdefs.h. */
23783#include <readline/readline.h>
23784
23785_ACEOF
23786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23787 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
23788
23789cat >>confdefs.h <<\_ACEOF
23790#define HAVE_RL_CATCH_SIGNAL 1
23791_ACEOF
23792
23793fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000023794rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023795
23796fi
23797
Martin v. Löwis82bca632006-02-10 20:49:30 +000023798# End of readline checks: restore LIBS
23799LIBS=$LIBS_no_readline
23800
Martin v. Löwiseba40652007-08-30 20:10:57 +000023801{ echo "$as_me:$LINENO: checking for broken nice()" >&5
23802echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023803if test "${ac_cv_broken_nice+set}" = set; then
23804 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000023805else
Martin v. Löwis11437992002-04-12 09:54:03 +000023806
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023807if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023808 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023809else
Martin v. Löwis11437992002-04-12 09:54:03 +000023810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023811/* confdefs.h. */
23812_ACEOF
23813cat confdefs.h >>conftest.$ac_ext
23814cat >>conftest.$ac_ext <<_ACEOF
23815/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023816
23817int main()
23818{
23819 int val1 = nice(1);
23820 if (val1 != -1 && val1 == nice(2))
23821 exit(0);
23822 exit(1);
23823}
23824
Martin v. Löwis11437992002-04-12 09:54:03 +000023825_ACEOF
23826rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023827if { (ac_try="$ac_link"
23828case "(($ac_try" in
23829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23830 *) ac_try_echo=$ac_try;;
23831esac
23832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23833 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023834 ac_status=$?
23835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023837 { (case "(($ac_try" in
23838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23839 *) ac_try_echo=$ac_try;;
23840esac
23841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23842 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023843 ac_status=$?
23844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23845 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023846 ac_cv_broken_nice=yes
23847else
Martin v. Löwis11437992002-04-12 09:54:03 +000023848 echo "$as_me: program exited with status $ac_status" >&5
23849echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023850sed 's/^/| /' conftest.$ac_ext >&5
23851
Martin v. Löwis11437992002-04-12 09:54:03 +000023852( exit $ac_status )
23853ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023855rm -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 +000023856fi
23857
Martin v. Löwiseba40652007-08-30 20:10:57 +000023858
23859fi
23860
23861{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
23862echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023863if test "$ac_cv_broken_nice" = yes
23864then
Martin v. Löwis11437992002-04-12 09:54:03 +000023865
23866cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023867#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023868_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023869
23870fi
23871
Martin v. Löwiseba40652007-08-30 20:10:57 +000023872{ echo "$as_me:$LINENO: checking for broken poll()" >&5
23873echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023874if test "$cross_compiling" = yes; then
23875 ac_cv_broken_poll=no
23876else
23877 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023878/* confdefs.h. */
23879_ACEOF
23880cat confdefs.h >>conftest.$ac_ext
23881cat >>conftest.$ac_ext <<_ACEOF
23882/* end confdefs.h. */
23883
23884#include <poll.h>
23885
23886int main (void)
23887 {
23888 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23889
23890 close (42);
23891
23892 int poll_test = poll (&poll_struct, 1, 0);
23893
23894 if (poll_test < 0)
23895 {
23896 exit(0);
23897 }
23898 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23899 {
23900 exit(0);
23901 }
23902 else
23903 {
23904 exit(1);
23905 }
23906 }
23907
23908_ACEOF
23909rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023910if { (ac_try="$ac_link"
23911case "(($ac_try" in
23912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23913 *) ac_try_echo=$ac_try;;
23914esac
23915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23916 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023917 ac_status=$?
23918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23919 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023920 { (case "(($ac_try" in
23921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23922 *) ac_try_echo=$ac_try;;
23923esac
23924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23925 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023926 ac_status=$?
23927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23928 (exit $ac_status); }; }; then
23929 ac_cv_broken_poll=yes
23930else
23931 echo "$as_me: program exited with status $ac_status" >&5
23932echo "$as_me: failed program was:" >&5
23933sed 's/^/| /' conftest.$ac_ext >&5
23934
23935( exit $ac_status )
23936ac_cv_broken_poll=no
23937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023938rm -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 +000023939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023940
23941
23942{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23943echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023944if test "$ac_cv_broken_poll" = yes
23945then
23946
23947cat >>confdefs.h <<\_ACEOF
23948#define HAVE_BROKEN_POLL 1
23949_ACEOF
23950
23951fi
23952
Brett Cannon43802422005-02-10 20:48:03 +000023953# 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 +000023954# (which is not required by ISO C or UNIX spec) and/or if we support
23955# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023956{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23957echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023958if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23959 echo $ECHO_N "(cached) $ECHO_C" >&6
23960else
23961 cat >conftest.$ac_ext <<_ACEOF
23962/* confdefs.h. */
23963_ACEOF
23964cat confdefs.h >>conftest.$ac_ext
23965cat >>conftest.$ac_ext <<_ACEOF
23966/* end confdefs.h. */
23967#include <sys/types.h>
23968#include <$ac_cv_struct_tm>
23969
23970
23971int
23972main ()
23973{
23974static struct tm ac_aggr;
23975if (ac_aggr.tm_zone)
23976return 0;
23977 ;
23978 return 0;
23979}
23980_ACEOF
23981rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023982if { (ac_try="$ac_compile"
23983case "(($ac_try" in
23984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23985 *) ac_try_echo=$ac_try;;
23986esac
23987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23988 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023989 ac_status=$?
23990 grep -v '^ *+' conftest.er1 >conftest.err
23991 rm -f conftest.er1
23992 cat conftest.err >&5
23993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023994 (exit $ac_status); } && {
23995 test -z "$ac_c_werror_flag" ||
23996 test ! -s conftest.err
23997 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023998 ac_cv_member_struct_tm_tm_zone=yes
23999else
24000 echo "$as_me: failed program was:" >&5
24001sed 's/^/| /' conftest.$ac_ext >&5
24002
Martin v. Löwiseba40652007-08-30 20:10:57 +000024003 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024004/* confdefs.h. */
24005_ACEOF
24006cat confdefs.h >>conftest.$ac_ext
24007cat >>conftest.$ac_ext <<_ACEOF
24008/* end confdefs.h. */
24009#include <sys/types.h>
24010#include <$ac_cv_struct_tm>
24011
24012
24013int
24014main ()
24015{
24016static struct tm ac_aggr;
24017if (sizeof ac_aggr.tm_zone)
24018return 0;
24019 ;
24020 return 0;
24021}
24022_ACEOF
24023rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024024if { (ac_try="$ac_compile"
24025case "(($ac_try" in
24026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24027 *) ac_try_echo=$ac_try;;
24028esac
24029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24030 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024031 ac_status=$?
24032 grep -v '^ *+' conftest.er1 >conftest.err
24033 rm -f conftest.er1
24034 cat conftest.err >&5
24035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024036 (exit $ac_status); } && {
24037 test -z "$ac_c_werror_flag" ||
24038 test ! -s conftest.err
24039 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024040 ac_cv_member_struct_tm_tm_zone=yes
24041else
24042 echo "$as_me: failed program was:" >&5
24043sed 's/^/| /' conftest.$ac_ext >&5
24044
Martin v. Löwiseba40652007-08-30 20:10:57 +000024045 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024047
24048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024050
24051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024053{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24054echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024055if test $ac_cv_member_struct_tm_tm_zone = yes; then
24056
24057cat >>confdefs.h <<_ACEOF
24058#define HAVE_STRUCT_TM_TM_ZONE 1
24059_ACEOF
24060
24061
24062fi
24063
24064if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24065
24066cat >>confdefs.h <<\_ACEOF
24067#define HAVE_TM_ZONE 1
24068_ACEOF
24069
24070else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024071 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24072echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24073if test "${ac_cv_have_decl_tzname+set}" = set; then
24074 echo $ECHO_N "(cached) $ECHO_C" >&6
24075else
24076 cat >conftest.$ac_ext <<_ACEOF
24077/* confdefs.h. */
24078_ACEOF
24079cat confdefs.h >>conftest.$ac_ext
24080cat >>conftest.$ac_ext <<_ACEOF
24081/* end confdefs.h. */
24082#include <time.h>
24083
24084int
24085main ()
24086{
24087#ifndef tzname
24088 (void) tzname;
24089#endif
24090
24091 ;
24092 return 0;
24093}
24094_ACEOF
24095rm -f conftest.$ac_objext
24096if { (ac_try="$ac_compile"
24097case "(($ac_try" in
24098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24099 *) ac_try_echo=$ac_try;;
24100esac
24101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24102 (eval "$ac_compile") 2>conftest.er1
24103 ac_status=$?
24104 grep -v '^ *+' conftest.er1 >conftest.err
24105 rm -f conftest.er1
24106 cat conftest.err >&5
24107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24108 (exit $ac_status); } && {
24109 test -z "$ac_c_werror_flag" ||
24110 test ! -s conftest.err
24111 } && test -s conftest.$ac_objext; then
24112 ac_cv_have_decl_tzname=yes
24113else
24114 echo "$as_me: failed program was:" >&5
24115sed 's/^/| /' conftest.$ac_ext >&5
24116
24117 ac_cv_have_decl_tzname=no
24118fi
24119
24120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24121fi
24122{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24123echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24124if test $ac_cv_have_decl_tzname = yes; then
24125
24126cat >>confdefs.h <<_ACEOF
24127#define HAVE_DECL_TZNAME 1
24128_ACEOF
24129
24130
24131else
24132 cat >>confdefs.h <<_ACEOF
24133#define HAVE_DECL_TZNAME 0
24134_ACEOF
24135
24136
24137fi
24138
24139
24140 { echo "$as_me:$LINENO: checking for tzname" >&5
24141echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024142if test "${ac_cv_var_tzname+set}" = set; then
24143 echo $ECHO_N "(cached) $ECHO_C" >&6
24144else
24145 cat >conftest.$ac_ext <<_ACEOF
24146/* confdefs.h. */
24147_ACEOF
24148cat confdefs.h >>conftest.$ac_ext
24149cat >>conftest.$ac_ext <<_ACEOF
24150/* end confdefs.h. */
24151#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000024152#if !HAVE_DECL_TZNAME
24153extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024154#endif
24155
24156int
24157main ()
24158{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024159return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024160 ;
24161 return 0;
24162}
24163_ACEOF
24164rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024165if { (ac_try="$ac_link"
24166case "(($ac_try" in
24167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24168 *) ac_try_echo=$ac_try;;
24169esac
24170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24171 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024172 ac_status=$?
24173 grep -v '^ *+' conftest.er1 >conftest.err
24174 rm -f conftest.er1
24175 cat conftest.err >&5
24176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024177 (exit $ac_status); } && {
24178 test -z "$ac_c_werror_flag" ||
24179 test ! -s conftest.err
24180 } && test -s conftest$ac_exeext &&
24181 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024182 ac_cv_var_tzname=yes
24183else
24184 echo "$as_me: failed program was:" >&5
24185sed 's/^/| /' conftest.$ac_ext >&5
24186
Martin v. Löwiseba40652007-08-30 20:10:57 +000024187 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024189
24190rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024191 conftest$ac_exeext conftest.$ac_ext
24192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024193{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24194echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024195 if test $ac_cv_var_tzname = yes; then
24196
24197cat >>confdefs.h <<\_ACEOF
24198#define HAVE_TZNAME 1
24199_ACEOF
24200
24201 fi
24202fi
24203
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024204
Martin v. Löwis1d459062005-03-14 21:23:33 +000024205# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000024206{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24207echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024208if test "${ac_cv_working_tzset+set}" = set; then
24209 echo $ECHO_N "(cached) $ECHO_C" >&6
24210else
24211
24212if test "$cross_compiling" = yes; then
24213 ac_cv_working_tzset=no
24214else
24215 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024216/* confdefs.h. */
24217_ACEOF
24218cat confdefs.h >>conftest.$ac_ext
24219cat >>conftest.$ac_ext <<_ACEOF
24220/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024221
24222#include <stdlib.h>
24223#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024224#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024225
24226#if HAVE_TZNAME
24227extern char *tzname[];
24228#endif
24229
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024230int main()
24231{
Brett Cannon18367812003-09-19 00:59:16 +000024232 /* Note that we need to ensure that not only does tzset(3)
24233 do 'something' with localtime, but it works as documented
24234 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024235 This includes making sure that tzname is set properly if
24236 tm->tm_zone does not exist since it is the alternative way
24237 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024238
24239 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024240 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024241 */
24242
Martin v. Löwis1d459062005-03-14 21:23:33 +000024243 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024244 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24245
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024246 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024247 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024248 if (localtime(&groundhogday)->tm_hour != 0)
24249 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024250#if HAVE_TZNAME
24251 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24252 if (strcmp(tzname[0], "UTC") ||
24253 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24254 exit(1);
24255#endif
Brett Cannon18367812003-09-19 00:59:16 +000024256
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024257 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024258 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024259 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024260 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024261#if HAVE_TZNAME
24262 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24263 exit(1);
24264#endif
Brett Cannon18367812003-09-19 00:59:16 +000024265
24266 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24267 tzset();
24268 if (localtime(&groundhogday)->tm_hour != 11)
24269 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024270#if HAVE_TZNAME
24271 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24272 exit(1);
24273#endif
24274
24275#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024276 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24277 exit(1);
24278 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24279 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024280#endif
Brett Cannon18367812003-09-19 00:59:16 +000024281
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024282 exit(0);
24283}
24284
24285_ACEOF
24286rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024287if { (ac_try="$ac_link"
24288case "(($ac_try" in
24289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24290 *) ac_try_echo=$ac_try;;
24291esac
24292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24293 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024294 ac_status=$?
24295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24296 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024297 { (case "(($ac_try" in
24298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24299 *) ac_try_echo=$ac_try;;
24300esac
24301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24302 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024303 ac_status=$?
24304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24305 (exit $ac_status); }; }; then
24306 ac_cv_working_tzset=yes
24307else
24308 echo "$as_me: program exited with status $ac_status" >&5
24309echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024310sed 's/^/| /' conftest.$ac_ext >&5
24311
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024312( exit $ac_status )
24313ac_cv_working_tzset=no
24314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024315rm -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 +000024316fi
24317
Martin v. Löwiseba40652007-08-30 20:10:57 +000024318
24319fi
24320
24321{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24322echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024323if test "$ac_cv_working_tzset" = yes
24324then
24325
24326cat >>confdefs.h <<\_ACEOF
24327#define HAVE_WORKING_TZSET 1
24328_ACEOF
24329
24330fi
24331
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024332# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024333{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24334echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024335if test "${ac_cv_stat_tv_nsec+set}" = set; then
24336 echo $ECHO_N "(cached) $ECHO_C" >&6
24337else
24338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024339/* confdefs.h. */
24340_ACEOF
24341cat confdefs.h >>conftest.$ac_ext
24342cat >>conftest.$ac_ext <<_ACEOF
24343/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024344#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024345int
24346main ()
24347{
24348
24349struct stat st;
24350st.st_mtim.tv_nsec = 1;
24351
24352 ;
24353 return 0;
24354}
24355_ACEOF
24356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024357if { (ac_try="$ac_compile"
24358case "(($ac_try" in
24359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24360 *) ac_try_echo=$ac_try;;
24361esac
24362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024365 grep -v '^ *+' conftest.er1 >conftest.err
24366 rm -f conftest.er1
24367 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024369 (exit $ac_status); } && {
24370 test -z "$ac_c_werror_flag" ||
24371 test ! -s conftest.err
24372 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024373 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024374else
24375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024376sed 's/^/| /' conftest.$ac_ext >&5
24377
Martin v. Löwiseba40652007-08-30 20:10:57 +000024378 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024379fi
24380
Martin v. Löwiseba40652007-08-30 20:10:57 +000024381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24382fi
24383
24384{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24385echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024386if test "$ac_cv_stat_tv_nsec" = yes
24387then
24388
24389cat >>confdefs.h <<\_ACEOF
24390#define HAVE_STAT_TV_NSEC 1
24391_ACEOF
24392
24393fi
24394
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024395# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024396{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24397echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024398if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24399 echo $ECHO_N "(cached) $ECHO_C" >&6
24400else
24401 cat >conftest.$ac_ext <<_ACEOF
24402/* confdefs.h. */
24403_ACEOF
24404cat confdefs.h >>conftest.$ac_ext
24405cat >>conftest.$ac_ext <<_ACEOF
24406/* end confdefs.h. */
24407#include <sys/stat.h>
24408int
24409main ()
24410{
24411
24412struct stat st;
24413st.st_mtimespec.tv_nsec = 1;
24414
24415 ;
24416 return 0;
24417}
24418_ACEOF
24419rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024420if { (ac_try="$ac_compile"
24421case "(($ac_try" in
24422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24423 *) ac_try_echo=$ac_try;;
24424esac
24425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024427 ac_status=$?
24428 grep -v '^ *+' conftest.er1 >conftest.err
24429 rm -f conftest.er1
24430 cat conftest.err >&5
24431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024432 (exit $ac_status); } && {
24433 test -z "$ac_c_werror_flag" ||
24434 test ! -s conftest.err
24435 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024436 ac_cv_stat_tv_nsec2=yes
24437else
24438 echo "$as_me: failed program was:" >&5
24439sed 's/^/| /' conftest.$ac_ext >&5
24440
Martin v. Löwiseba40652007-08-30 20:10:57 +000024441 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024442fi
24443
Martin v. Löwiseba40652007-08-30 20:10:57 +000024444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24445fi
24446
24447{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24448echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024449if test "$ac_cv_stat_tv_nsec2" = yes
24450then
24451
24452cat >>confdefs.h <<\_ACEOF
24453#define HAVE_STAT_TV_NSEC2 1
24454_ACEOF
24455
24456fi
24457
Jack Jansen666b1e72001-10-31 12:11:48 +000024458# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024459{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24460echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024461if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24462 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024463else
Martin v. Löwis11437992002-04-12 09:54:03 +000024464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024465/* confdefs.h. */
24466_ACEOF
24467cat confdefs.h >>conftest.$ac_ext
24468cat >>conftest.$ac_ext <<_ACEOF
24469/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024470#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024471int
24472main ()
24473{
Jack Jansen666b1e72001-10-31 12:11:48 +000024474
24475 int rtn;
24476 rtn = mvwdelch(0,0,0);
24477
Martin v. Löwis11437992002-04-12 09:54:03 +000024478 ;
24479 return 0;
24480}
24481_ACEOF
24482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024483if { (ac_try="$ac_compile"
24484case "(($ac_try" in
24485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24486 *) ac_try_echo=$ac_try;;
24487esac
24488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024491 grep -v '^ *+' conftest.er1 >conftest.err
24492 rm -f conftest.er1
24493 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024495 (exit $ac_status); } && {
24496 test -z "$ac_c_werror_flag" ||
24497 test ! -s conftest.err
24498 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024499 ac_cv_mvwdelch_is_expression=yes
24500else
Martin v. Löwis11437992002-04-12 09:54:03 +000024501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024502sed 's/^/| /' conftest.$ac_ext >&5
24503
Martin v. Löwiseba40652007-08-30 20:10:57 +000024504 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024505fi
24506
Martin v. Löwiseba40652007-08-30 20:10:57 +000024507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24508fi
24509
24510{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24511echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024512
24513if test "$ac_cv_mvwdelch_is_expression" = yes
24514then
Martin v. Löwis11437992002-04-12 09:54:03 +000024515
24516cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024517#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024518_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024519
24520fi
24521
Martin v. Löwiseba40652007-08-30 20:10:57 +000024522{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24523echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024524if test "${ac_cv_window_has_flags+set}" = set; then
24525 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024526else
Martin v. Löwis11437992002-04-12 09:54:03 +000024527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024528/* confdefs.h. */
24529_ACEOF
24530cat confdefs.h >>conftest.$ac_ext
24531cat >>conftest.$ac_ext <<_ACEOF
24532/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024533#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024534int
24535main ()
24536{
Jack Jansen666b1e72001-10-31 12:11:48 +000024537
24538 WINDOW *w;
24539 w->_flags = 0;
24540
Martin v. Löwis11437992002-04-12 09:54:03 +000024541 ;
24542 return 0;
24543}
24544_ACEOF
24545rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024546if { (ac_try="$ac_compile"
24547case "(($ac_try" in
24548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24549 *) ac_try_echo=$ac_try;;
24550esac
24551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024554 grep -v '^ *+' conftest.er1 >conftest.err
24555 rm -f conftest.er1
24556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024558 (exit $ac_status); } && {
24559 test -z "$ac_c_werror_flag" ||
24560 test ! -s conftest.err
24561 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024562 ac_cv_window_has_flags=yes
24563else
Martin v. Löwis11437992002-04-12 09:54:03 +000024564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024565sed 's/^/| /' conftest.$ac_ext >&5
24566
Martin v. Löwiseba40652007-08-30 20:10:57 +000024567 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024568fi
24569
Martin v. Löwiseba40652007-08-30 20:10:57 +000024570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24571fi
24572
24573{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24574echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024575
Jack Jansen666b1e72001-10-31 12:11:48 +000024576
24577if test "$ac_cv_window_has_flags" = yes
24578then
Martin v. Löwis11437992002-04-12 09:54:03 +000024579
24580cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024581#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024582_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024583
24584fi
24585
Martin v. Löwiseba40652007-08-30 20:10:57 +000024586{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24587echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024588cat >conftest.$ac_ext <<_ACEOF
24589/* confdefs.h. */
24590_ACEOF
24591cat confdefs.h >>conftest.$ac_ext
24592cat >>conftest.$ac_ext <<_ACEOF
24593/* end confdefs.h. */
24594#include <curses.h>
24595int
24596main ()
24597{
24598void *x=is_term_resized
24599 ;
24600 return 0;
24601}
24602_ACEOF
24603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024604if { (ac_try="$ac_compile"
24605case "(($ac_try" in
24606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24607 *) ac_try_echo=$ac_try;;
24608esac
24609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24610 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024611 ac_status=$?
24612 grep -v '^ *+' conftest.er1 >conftest.err
24613 rm -f conftest.er1
24614 cat conftest.err >&5
24615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024616 (exit $ac_status); } && {
24617 test -z "$ac_c_werror_flag" ||
24618 test ! -s conftest.err
24619 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024620
24621cat >>confdefs.h <<\_ACEOF
24622#define HAVE_CURSES_IS_TERM_RESIZED 1
24623_ACEOF
24624
Martin v. Löwiseba40652007-08-30 20:10:57 +000024625 { echo "$as_me:$LINENO: result: yes" >&5
24626echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024627else
24628 echo "$as_me: failed program was:" >&5
24629sed 's/^/| /' conftest.$ac_ext >&5
24630
Martin v. Löwiseba40652007-08-30 20:10:57 +000024631 { echo "$as_me:$LINENO: result: no" >&5
24632echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024633
24634fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024635
Martin v. Löwiseba40652007-08-30 20:10:57 +000024636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24637
24638{ echo "$as_me:$LINENO: checking for resize_term" >&5
24639echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024640cat >conftest.$ac_ext <<_ACEOF
24641/* confdefs.h. */
24642_ACEOF
24643cat confdefs.h >>conftest.$ac_ext
24644cat >>conftest.$ac_ext <<_ACEOF
24645/* end confdefs.h. */
24646#include <curses.h>
24647int
24648main ()
24649{
24650void *x=resize_term
24651 ;
24652 return 0;
24653}
24654_ACEOF
24655rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024656if { (ac_try="$ac_compile"
24657case "(($ac_try" in
24658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24659 *) ac_try_echo=$ac_try;;
24660esac
24661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24662 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024663 ac_status=$?
24664 grep -v '^ *+' conftest.er1 >conftest.err
24665 rm -f conftest.er1
24666 cat conftest.err >&5
24667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024668 (exit $ac_status); } && {
24669 test -z "$ac_c_werror_flag" ||
24670 test ! -s conftest.err
24671 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024672
24673cat >>confdefs.h <<\_ACEOF
24674#define HAVE_CURSES_RESIZE_TERM 1
24675_ACEOF
24676
Martin v. Löwiseba40652007-08-30 20:10:57 +000024677 { echo "$as_me:$LINENO: result: yes" >&5
24678echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024679else
24680 echo "$as_me: failed program was:" >&5
24681sed 's/^/| /' conftest.$ac_ext >&5
24682
Martin v. Löwiseba40652007-08-30 20:10:57 +000024683 { echo "$as_me:$LINENO: result: no" >&5
24684echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024685
24686fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024687
Martin v. Löwiseba40652007-08-30 20:10:57 +000024688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24689
24690{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24691echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024692cat >conftest.$ac_ext <<_ACEOF
24693/* confdefs.h. */
24694_ACEOF
24695cat confdefs.h >>conftest.$ac_ext
24696cat >>conftest.$ac_ext <<_ACEOF
24697/* end confdefs.h. */
24698#include <curses.h>
24699int
24700main ()
24701{
24702void *x=resizeterm
24703 ;
24704 return 0;
24705}
24706_ACEOF
24707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024708if { (ac_try="$ac_compile"
24709case "(($ac_try" in
24710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24711 *) ac_try_echo=$ac_try;;
24712esac
24713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24714 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024715 ac_status=$?
24716 grep -v '^ *+' conftest.er1 >conftest.err
24717 rm -f conftest.er1
24718 cat conftest.err >&5
24719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024720 (exit $ac_status); } && {
24721 test -z "$ac_c_werror_flag" ||
24722 test ! -s conftest.err
24723 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024724
24725cat >>confdefs.h <<\_ACEOF
24726#define HAVE_CURSES_RESIZETERM 1
24727_ACEOF
24728
Martin v. Löwiseba40652007-08-30 20:10:57 +000024729 { echo "$as_me:$LINENO: result: yes" >&5
24730echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024731else
24732 echo "$as_me: failed program was:" >&5
24733sed 's/^/| /' conftest.$ac_ext >&5
24734
Martin v. Löwiseba40652007-08-30 20:10:57 +000024735 { echo "$as_me:$LINENO: result: no" >&5
24736echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024737
24738fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024739
Martin v. Löwiseba40652007-08-30 20:10:57 +000024740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24741
24742{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24743echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024744
24745if test -r /dev/ptmx
24746then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024747 { echo "$as_me:$LINENO: result: yes" >&5
24748echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024749
24750cat >>confdefs.h <<\_ACEOF
24751#define HAVE_DEV_PTMX 1
24752_ACEOF
24753
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024754else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024755 { echo "$as_me:$LINENO: result: no" >&5
24756echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024757fi
24758
Martin v. Löwiseba40652007-08-30 20:10:57 +000024759{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
24760echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024761
24762if test -r /dev/ptc
24763then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024764 { echo "$as_me:$LINENO: result: yes" >&5
24765echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024766
24767cat >>confdefs.h <<\_ACEOF
24768#define HAVE_DEV_PTC 1
24769_ACEOF
24770
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024771else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024772 { echo "$as_me:$LINENO: result: no" >&5
24773echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024774fi
24775
Martin v. Löwiseba40652007-08-30 20:10:57 +000024776{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
24777echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024778if test "$cross_compiling" = yes; then
24779 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
24780See \`config.log' for more details." >&5
24781echo "$as_me: error: cannot run test program while cross compiling
24782See \`config.log' for more details." >&2;}
24783 { (exit 1); exit 1; }; }
24784else
24785 cat >conftest.$ac_ext <<_ACEOF
24786/* confdefs.h. */
24787_ACEOF
24788cat confdefs.h >>conftest.$ac_ext
24789cat >>conftest.$ac_ext <<_ACEOF
24790/* end confdefs.h. */
24791#include <stdio.h>
24792#include <stddef.h>
24793#include <string.h>
24794
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024795#ifdef HAVE_SYS_TYPES_H
24796#include <sys/types.h>
24797#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024798
24799#ifdef HAVE_SSIZE_T
24800typedef ssize_t Py_ssize_t;
24801#elif SIZEOF_VOID_P == SIZEOF_LONG
24802typedef long Py_ssize_t;
24803#else
24804typedef int Py_ssize_t;
24805#endif
Brett Cannon09d12362006-05-11 05:11:33 +000024806
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024807int main()
24808{
24809 char buffer[256];
24810
Brett Cannon09d12362006-05-11 05:11:33 +000024811 if(sprintf(buffer, "%zd", (size_t)123) < 0)
24812 return 1;
24813
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024814 if (strcmp(buffer, "123"))
24815 return 1;
24816
24817 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
24818 return 1;
24819
24820 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000024821 return 1;
24822
24823 return 0;
24824}
24825_ACEOF
24826rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024827if { (ac_try="$ac_link"
24828case "(($ac_try" in
24829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24830 *) ac_try_echo=$ac_try;;
24831esac
24832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24833 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024834 ac_status=$?
24835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024837 { (case "(($ac_try" in
24838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24839 *) ac_try_echo=$ac_try;;
24840esac
24841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24842 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024843 ac_status=$?
24844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24845 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024846 { echo "$as_me:$LINENO: result: yes" >&5
24847echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024848
24849cat >>confdefs.h <<\_ACEOF
24850#define PY_FORMAT_SIZE_T "z"
24851_ACEOF
24852
24853else
24854 echo "$as_me: program exited with status $ac_status" >&5
24855echo "$as_me: failed program was:" >&5
24856sed 's/^/| /' conftest.$ac_ext >&5
24857
24858( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024859{ echo "$as_me:$LINENO: result: no" >&5
24860echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024862rm -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 +000024863fi
24864
Martin v. Löwiseba40652007-08-30 20:10:57 +000024865
24866
24867{ echo "$as_me:$LINENO: checking for socklen_t" >&5
24868echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024869if test "${ac_cv_type_socklen_t+set}" = set; then
24870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000024871else
Martin v. Löwis11437992002-04-12 09:54:03 +000024872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024873/* confdefs.h. */
24874_ACEOF
24875cat confdefs.h >>conftest.$ac_ext
24876cat >>conftest.$ac_ext <<_ACEOF
24877/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000024878
24879#ifdef HAVE_SYS_TYPES_H
24880#include <sys/types.h>
24881#endif
24882#ifdef HAVE_SYS_SOCKET_H
24883#include <sys/socket.h>
24884#endif
24885
24886
Martin v. Löwiseba40652007-08-30 20:10:57 +000024887typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024888int
24889main ()
24890{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024891if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024892 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024893if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024894 return 0;
24895 ;
24896 return 0;
24897}
24898_ACEOF
24899rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024900if { (ac_try="$ac_compile"
24901case "(($ac_try" in
24902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24903 *) ac_try_echo=$ac_try;;
24904esac
24905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024908 grep -v '^ *+' conftest.er1 >conftest.err
24909 rm -f conftest.er1
24910 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024912 (exit $ac_status); } && {
24913 test -z "$ac_c_werror_flag" ||
24914 test ! -s conftest.err
24915 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024916 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024917else
Martin v. Löwis11437992002-04-12 09:54:03 +000024918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024919sed 's/^/| /' conftest.$ac_ext >&5
24920
Martin v. Löwiseba40652007-08-30 20:10:57 +000024921 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024923
24924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024926{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24927echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024928if test $ac_cv_type_socklen_t = yes; then
24929 :
24930else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024931
Martin v. Löwis01c04012002-11-11 14:58:44 +000024932cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024933#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024934_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024935
24936fi
24937
Michael W. Hudson54241132001-12-07 15:38:26 +000024938
Michael W. Hudson54241132001-12-07 15:38:26 +000024939
24940
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024941for h in `(cd $srcdir;echo Python/thread_*.h)`
24942do
24943 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24944done
24945
Ronald Oussoren55114422009-11-19 16:37:33 +000024946if test $ac_sys_system = Darwin
24947then
24948 LIBS="$LIBS -framework CoreFoundation"
24949fi
24950
24951
24952
Michael W. Hudson54241132001-12-07 15:38:26 +000024953
Neal Norwitzd24499d2005-12-18 21:36:39 +000024954SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024955{ echo "$as_me:$LINENO: checking for build directories" >&5
24956echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024957for dir in $SRCDIRS; do
24958 if test ! -d $dir; then
24959 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024960 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024961done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024962{ echo "$as_me:$LINENO: result: done" >&5
24963echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024964
Guido van Rossum627b2d71993-12-24 10:39:16 +000024965# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024966ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024967
Martin v. Löwis11437992002-04-12 09:54:03 +000024968cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024969# This file is a shell script that caches the results of configure
24970# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024971# scripts and configure runs, see configure's option --config-cache.
24972# It is not useful on other systems. If it contains results you don't
24973# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024974#
Martin v. Löwis11437992002-04-12 09:54:03 +000024975# config.status only pays attention to the cache file if you give it
24976# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024977#
Skip Montanaro6dead952003-09-25 14:50:04 +000024978# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024979# loading this file, other *unset* `ac_cv_foo' will be assigned the
24980# following values.
24981
24982_ACEOF
24983
Guido van Rossumf78abae1997-01-21 22:02:36 +000024984# The following way of writing the cache mishandles newlines in values,
24985# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024986# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024987# Ultrix sh set writes to stderr and can't be redirected directly,
24988# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024989(
24990 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24991 eval ac_val=\$$ac_var
24992 case $ac_val in #(
24993 *${as_nl}*)
24994 case $ac_var in #(
24995 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24996echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24997 esac
24998 case $ac_var in #(
24999 _ | IFS | as_nl) ;; #(
25000 *) $as_unset $ac_var ;;
25001 esac ;;
25002 esac
25003 done
25004
Martin v. Löwis11437992002-04-12 09:54:03 +000025005 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025006 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25007 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025008 # `set' does not quote correctly, so add quotes (double-quote
25009 # substitution turns \\\\ into \\, and sed turns \\ into \).
25010 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025011 "s/'/'\\\\''/g;
25012 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025013 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025014 *)
25015 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025016 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025017 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025018 esac |
25019 sort
25020) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025021 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025022 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025023 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000025024 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025025 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25026 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000025027 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25028 :end' >>confcache
25029if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25030 if test -w "$cache_file"; then
25031 test "x$cache_file" != "x/dev/null" &&
25032 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25033echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025034 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025035 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025036 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25037echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025038 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025039fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025040rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025041
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025042test "x$prefix" = xNONE && prefix=$ac_default_prefix
25043# Let make expand exec_prefix.
25044test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025045
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025046DEFS=-DHAVE_CONFIG_H
25047
Skip Montanaro6dead952003-09-25 14:50:04 +000025048ac_libobjs=
25049ac_ltlibobjs=
25050for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25051 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025052 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25053 ac_i=`echo "$ac_i" | sed "$ac_script"`
25054 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25055 # will be set to the directory where LIBOBJS objects are built.
25056 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25057 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025058done
25059LIBOBJS=$ac_libobjs
25060
25061LTLIBOBJS=$ac_ltlibobjs
25062
25063
Martin v. Löwis11437992002-04-12 09:54:03 +000025064
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025065: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025066ac_clean_files_save=$ac_clean_files
25067ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25068{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25069echo "$as_me: creating $CONFIG_STATUS" >&6;}
25070cat >$CONFIG_STATUS <<_ACEOF
25071#! $SHELL
25072# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025073# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025074# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025075# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025076
Martin v. Löwis11437992002-04-12 09:54:03 +000025077debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025078ac_cs_recheck=false
25079ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025080SHELL=\${CONFIG_SHELL-$SHELL}
25081_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025082
Martin v. Löwis11437992002-04-12 09:54:03 +000025083cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025084## --------------------- ##
25085## M4sh Initialization. ##
25086## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025087
Martin v. Löwiseba40652007-08-30 20:10:57 +000025088# Be more Bourne compatible
25089DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025090if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25091 emulate sh
25092 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025093 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25094 # is contrary to our usage. Disable this feature.
25095 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025096 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025097else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025098 case `(set -o) 2>/dev/null` in
25099 *posix*) set -o posix ;;
25100esac
25101
Martin v. Löwis11437992002-04-12 09:54:03 +000025102fi
Michael W. Hudson54241132001-12-07 15:38:26 +000025103
Skip Montanaro6dead952003-09-25 14:50:04 +000025104
Martin v. Löwis11437992002-04-12 09:54:03 +000025105
25106
Martin v. Löwiseba40652007-08-30 20:10:57 +000025107# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025108# Avoid depending upon Character Ranges.
25109as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25110as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25111as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25112as_cr_digits='0123456789'
25113as_cr_alnum=$as_cr_Letters$as_cr_digits
25114
25115# The user is always right.
25116if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000025117 echo "#! /bin/sh" >conf$$.sh
25118 echo "exit 0" >>conf$$.sh
25119 chmod +x conf$$.sh
25120 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025121 PATH_SEPARATOR=';'
25122 else
25123 PATH_SEPARATOR=:
25124 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000025125 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025126fi
25127
Martin v. Löwiseba40652007-08-30 20:10:57 +000025128# Support unset when possible.
25129if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25130 as_unset=unset
25131else
25132 as_unset=false
25133fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025134
Martin v. Löwiseba40652007-08-30 20:10:57 +000025135
25136# IFS
25137# We need space, tab and new line, in precisely that order. Quoting is
25138# there to prevent editors from complaining about space-tab.
25139# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25140# splitting by setting IFS to empty value.)
25141as_nl='
25142'
25143IFS=" "" $as_nl"
25144
25145# Find who we are. Look in the path if we contain no directory separator.
25146case $0 in
25147 *[\\/]* ) as_myself=$0 ;;
25148 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025149for as_dir in $PATH
25150do
25151 IFS=$as_save_IFS
25152 test -z "$as_dir" && as_dir=.
25153 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25154done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025155IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025156
Martin v. Löwiseba40652007-08-30 20:10:57 +000025157 ;;
25158esac
25159# We did not find ourselves, most probably we were run as `sh COMMAND'
25160# in which case we are not to be found in the path.
25161if test "x$as_myself" = x; then
25162 as_myself=$0
25163fi
25164if test ! -f "$as_myself"; then
25165 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25166 { (exit 1); exit 1; }
25167fi
25168
25169# Work around bugs in pre-3.0 UWIN ksh.
25170for as_var in ENV MAIL MAILPATH
25171do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25172done
25173PS1='$ '
25174PS2='> '
25175PS4='+ '
25176
25177# NLS nuisances.
25178for as_var in \
25179 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25180 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25181 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000025182do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025183 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25184 eval $as_var=C; export $as_var
25185 else
25186 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25187 fi
25188done
25189
25190# Required to use basename.
25191if expr a : '\(a\)' >/dev/null 2>&1 &&
25192 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25193 as_expr=expr
25194else
25195 as_expr=false
25196fi
25197
25198if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25199 as_basename=basename
25200else
25201 as_basename=false
25202fi
25203
25204
25205# Name of the executable.
25206as_me=`$as_basename -- "$0" ||
25207$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25208 X"$0" : 'X\(//\)$' \| \
25209 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25210echo X/"$0" |
25211 sed '/^.*\/\([^/][^/]*\)\/*$/{
25212 s//\1/
25213 q
25214 }
25215 /^X\/\(\/\/\)$/{
25216 s//\1/
25217 q
25218 }
25219 /^X\/\(\/\).*/{
25220 s//\1/
25221 q
25222 }
25223 s/.*/./; q'`
25224
25225# CDPATH.
25226$as_unset CDPATH
25227
25228
25229
Martin v. Löwis11437992002-04-12 09:54:03 +000025230 as_lineno_1=$LINENO
25231 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025232 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025233 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025234
Martin v. Löwis11437992002-04-12 09:54:03 +000025235 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25236 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000025237 # line-number line after each line using $LINENO; the second 'sed'
25238 # does the real work. The second script uses 'N' to pair each
25239 # line-number line with the line containing $LINENO, and appends
25240 # trailing '-' during substitution so that $LINENO is not a special
25241 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025242 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025243 # scripts with optimization help from Paolo Bonzini. Blame Lee
25244 # E. McMahon (1931-1989) for sed's syntax. :-)
25245 sed -n '
25246 p
25247 /[$]LINENO/=
25248 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025249 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025250 s/[$]LINENO.*/&-/
25251 t lineno
25252 b
25253 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025254 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000025255 :loop
25256 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025257 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000025258 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025259 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025260 chmod +x "$as_me.lineno" ||
25261 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025262 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025263
Martin v. Löwis11437992002-04-12 09:54:03 +000025264 # Don't try to exec as it changes $[0], causing all sort of problems
25265 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025266 # original and so on. Autoconf is especially sensitive to this).
25267 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025268 # Exit status is that of the last command.
25269 exit
25270}
25271
25272
Martin v. Löwiseba40652007-08-30 20:10:57 +000025273if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25274 as_dirname=dirname
25275else
25276 as_dirname=false
25277fi
25278
25279ECHO_C= ECHO_N= ECHO_T=
25280case `echo -n x` in
25281-n*)
25282 case `echo 'x\c'` in
25283 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25284 *) ECHO_C='\c';;
25285 esac;;
25286*)
25287 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025288esac
25289
Martin v. Löwiseba40652007-08-30 20:10:57 +000025290if expr a : '\(a\)' >/dev/null 2>&1 &&
25291 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025292 as_expr=expr
25293else
25294 as_expr=false
25295fi
25296
25297rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025298if test -d conf$$.dir; then
25299 rm -f conf$$.dir/conf$$.file
25300else
25301 rm -f conf$$.dir
25302 mkdir conf$$.dir
25303fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025304echo >conf$$.file
25305if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025306 as_ln_s='ln -s'
25307 # ... but there are two gotchas:
25308 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25309 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25310 # In both cases, we have to default to `cp -p'.
25311 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025312 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025313elif ln conf$$.file conf$$ 2>/dev/null; then
25314 as_ln_s=ln
25315else
25316 as_ln_s='cp -p'
25317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025318rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25319rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025320
Skip Montanaro6dead952003-09-25 14:50:04 +000025321if mkdir -p . 2>/dev/null; then
25322 as_mkdir_p=:
25323else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025324 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025325 as_mkdir_p=false
25326fi
25327
Martin v. Löwiseba40652007-08-30 20:10:57 +000025328if test -x / >/dev/null 2>&1; then
25329 as_test_x='test -x'
25330else
25331 if ls -dL / >/dev/null 2>&1; then
25332 as_ls_L_option=L
25333 else
25334 as_ls_L_option=
25335 fi
25336 as_test_x='
25337 eval sh -c '\''
25338 if test -d "$1"; then
25339 test -d "$1/.";
25340 else
25341 case $1 in
25342 -*)set "./$1";;
25343 esac;
25344 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25345 ???[sx]*):;;*)false;;esac;fi
25346 '\'' sh
25347 '
25348fi
25349as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025350
25351# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025352as_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 +000025353
25354# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025355as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025356
25357
Martin v. Löwis11437992002-04-12 09:54:03 +000025358exec 6>&1
25359
Martin v. Löwiseba40652007-08-30 20:10:57 +000025360# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025361# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025362# values after options handling.
25363ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000025364This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025365generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025366
25367 CONFIG_FILES = $CONFIG_FILES
25368 CONFIG_HEADERS = $CONFIG_HEADERS
25369 CONFIG_LINKS = $CONFIG_LINKS
25370 CONFIG_COMMANDS = $CONFIG_COMMANDS
25371 $ $0 $@
25372
Martin v. Löwiseba40652007-08-30 20:10:57 +000025373on `(hostname || uname -n) 2>/dev/null | sed 1q`
25374"
25375
Martin v. Löwis11437992002-04-12 09:54:03 +000025376_ACEOF
25377
Martin v. Löwiseba40652007-08-30 20:10:57 +000025378cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025379# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025380config_files="$ac_config_files"
25381config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025382
Martin v. Löwiseba40652007-08-30 20:10:57 +000025383_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025384
25385cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025386ac_cs_usage="\
25387\`$as_me' instantiates files from templates according to the
25388current configuration.
25389
25390Usage: $0 [OPTIONS] [FILE]...
25391
25392 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025393 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025394 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025395 -d, --debug don't remove temporary files
25396 --recheck update $as_me by reconfiguring in the same conditions
25397 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025398 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025399 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025400 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025401
25402Configuration files:
25403$config_files
25404
25405Configuration headers:
25406$config_headers
25407
25408Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025409
Martin v. Löwiseba40652007-08-30 20:10:57 +000025410_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025411cat >>$CONFIG_STATUS <<_ACEOF
25412ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000025413python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025414configured by $0, generated by GNU Autoconf 2.61,
25415 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025416
Martin v. Löwiseba40652007-08-30 20:10:57 +000025417Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025418This config.status script is free software; the Free Software Foundation
25419gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025420
25421ac_pwd='$ac_pwd'
25422srcdir='$srcdir'
25423INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025424_ACEOF
25425
25426cat >>$CONFIG_STATUS <<\_ACEOF
25427# If no file are specified by the user, then we need to provide default
25428# value. By we need to know if files were specified by the user.
25429ac_need_defaults=:
25430while test $# != 0
25431do
25432 case $1 in
25433 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025434 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25435 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025436 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025437 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025438 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025439 ac_option=$1
25440 ac_optarg=$2
25441 ac_shift=shift
25442 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025443 esac
25444
Skip Montanaro6dead952003-09-25 14:50:04 +000025445 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025446 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025447 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25448 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025449 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25450 echo "$ac_cs_version"; exit ;;
25451 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025452 debug=: ;;
25453 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025454 $ac_shift
25455 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025456 ac_need_defaults=false;;
25457 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025458 $ac_shift
25459 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025460 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025461 --he | --h)
25462 # Conflict between --help and --header
25463 { echo "$as_me: error: ambiguous option: $1
25464Try \`$0 --help' for more information." >&2
25465 { (exit 1); exit 1; }; };;
25466 --help | --hel | -h )
25467 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025468 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25469 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25470 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025471
25472 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025473 -*) { echo "$as_me: error: unrecognized option: $1
25474Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025475 { (exit 1); exit 1; }; } ;;
25476
Martin v. Löwiseba40652007-08-30 20:10:57 +000025477 *) ac_config_targets="$ac_config_targets $1"
25478 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025479
25480 esac
25481 shift
25482done
25483
Skip Montanaro6dead952003-09-25 14:50:04 +000025484ac_configure_extra_args=
25485
25486if $ac_cs_silent; then
25487 exec 6>/dev/null
25488 ac_configure_extra_args="$ac_configure_extra_args --silent"
25489fi
25490
25491_ACEOF
25492cat >>$CONFIG_STATUS <<_ACEOF
25493if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025494 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25495 CONFIG_SHELL=$SHELL
25496 export CONFIG_SHELL
25497 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025498fi
25499
Martin v. Löwis11437992002-04-12 09:54:03 +000025500_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025501cat >>$CONFIG_STATUS <<\_ACEOF
25502exec 5>>config.log
25503{
25504 echo
25505 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25506## Running $as_me. ##
25507_ASBOX
25508 echo "$ac_log"
25509} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025510
Martin v. Löwiseba40652007-08-30 20:10:57 +000025511_ACEOF
25512cat >>$CONFIG_STATUS <<_ACEOF
25513_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025514
25515cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025516
25517# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025518for ac_config_target in $ac_config_targets
25519do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025520 case $ac_config_target in
25521 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25522 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25523 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25524 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025525 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25526 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025527 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25528 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25529
Martin v. Löwis11437992002-04-12 09:54:03 +000025530 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25531echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25532 { (exit 1); exit 1; }; };;
25533 esac
25534done
25535
Martin v. Löwiseba40652007-08-30 20:10:57 +000025536
Martin v. Löwis11437992002-04-12 09:54:03 +000025537# If the user did not use the arguments to specify the items to instantiate,
25538# then the envvar interface is used. Set only those that are not.
25539# We use the long form for the default assignment because of an extremely
25540# bizarre bug on SunOS 4.1.3.
25541if $ac_need_defaults; then
25542 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25543 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25544fi
25545
Skip Montanaro6dead952003-09-25 14:50:04 +000025546# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025547# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025548# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025549# Hook for its removal unless debugging.
25550# Note that there is a small window in which the directory will not be cleaned:
25551# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025552$debug ||
25553{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025554 tmp=
25555 trap 'exit_status=$?
25556 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25557' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025558 trap '{ (exit 1); exit 1; }' 1 2 13 15
25559}
Martin v. Löwis11437992002-04-12 09:54:03 +000025560# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025561
Martin v. Löwis11437992002-04-12 09:54:03 +000025562{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025563 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025564 test -n "$tmp" && test -d "$tmp"
25565} ||
25566{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025567 tmp=./conf$$-$RANDOM
25568 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025569} ||
25570{
Skip Montanaro6dead952003-09-25 14:50:04 +000025571 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025572 { (exit 1); exit 1; }
25573}
25574
Martin v. Löwis11437992002-04-12 09:54:03 +000025575#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025576# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025577#
25578
25579# No need to generate the scripts if there are no CONFIG_FILES.
25580# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025581if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025582
25583_ACEOF
25584
Martin v. Löwiseba40652007-08-30 20:10:57 +000025585
25586
25587ac_delim='%!_!# '
25588for ac_last_try in false false false false false :; do
25589 cat >conf$$subs.sed <<_ACEOF
25590SHELL!$SHELL$ac_delim
25591PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25592PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25593PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25594PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25595PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25596PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25597exec_prefix!$exec_prefix$ac_delim
25598prefix!$prefix$ac_delim
25599program_transform_name!$program_transform_name$ac_delim
25600bindir!$bindir$ac_delim
25601sbindir!$sbindir$ac_delim
25602libexecdir!$libexecdir$ac_delim
25603datarootdir!$datarootdir$ac_delim
25604datadir!$datadir$ac_delim
25605sysconfdir!$sysconfdir$ac_delim
25606sharedstatedir!$sharedstatedir$ac_delim
25607localstatedir!$localstatedir$ac_delim
25608includedir!$includedir$ac_delim
25609oldincludedir!$oldincludedir$ac_delim
25610docdir!$docdir$ac_delim
25611infodir!$infodir$ac_delim
25612htmldir!$htmldir$ac_delim
25613dvidir!$dvidir$ac_delim
25614pdfdir!$pdfdir$ac_delim
25615psdir!$psdir$ac_delim
25616libdir!$libdir$ac_delim
25617localedir!$localedir$ac_delim
25618mandir!$mandir$ac_delim
25619DEFS!$DEFS$ac_delim
25620ECHO_C!$ECHO_C$ac_delim
25621ECHO_N!$ECHO_N$ac_delim
25622ECHO_T!$ECHO_T$ac_delim
25623LIBS!$LIBS$ac_delim
25624build_alias!$build_alias$ac_delim
25625host_alias!$host_alias$ac_delim
25626target_alias!$target_alias$ac_delim
25627VERSION!$VERSION$ac_delim
25628SOVERSION!$SOVERSION$ac_delim
25629CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25630UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025631ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025632PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025633PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025634PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25635PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25636PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25637FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25638FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25639FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25640FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25641FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25642MACHDEP!$MACHDEP$ac_delim
25643SGI_ABI!$SGI_ABI$ac_delim
25644EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25645EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25646CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25647EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25648CC!$CC$ac_delim
25649CFLAGS!$CFLAGS$ac_delim
25650LDFLAGS!$LDFLAGS$ac_delim
25651CPPFLAGS!$CPPFLAGS$ac_delim
25652ac_ct_CC!$ac_ct_CC$ac_delim
25653EXEEXT!$EXEEXT$ac_delim
25654OBJEXT!$OBJEXT$ac_delim
25655CXX!$CXX$ac_delim
25656MAINCC!$MAINCC$ac_delim
25657CPP!$CPP$ac_delim
25658GREP!$GREP$ac_delim
25659EGREP!$EGREP$ac_delim
25660BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25661LIBRARY!$LIBRARY$ac_delim
25662LDLIBRARY!$LDLIBRARY$ac_delim
25663DLLLIBRARY!$DLLLIBRARY$ac_delim
25664BLDLIBRARY!$BLDLIBRARY$ac_delim
25665LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25666INSTSONAME!$INSTSONAME$ac_delim
25667RUNSHARED!$RUNSHARED$ac_delim
25668LINKCC!$LINKCC$ac_delim
25669RANLIB!$RANLIB$ac_delim
25670AR!$AR$ac_delim
25671SVNVERSION!$SVNVERSION$ac_delim
25672INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25673INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25674INSTALL_DATA!$INSTALL_DATA$ac_delim
25675LN!$LN$ac_delim
25676OPT!$OPT$ac_delim
25677BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025678UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025679OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25680LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25681SO!$SO$ac_delim
25682LDSHARED!$LDSHARED$ac_delim
25683BLDSHARED!$BLDSHARED$ac_delim
25684CCSHARED!$CCSHARED$ac_delim
25685LINKFORSHARED!$LINKFORSHARED$ac_delim
25686CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025687_ACEOF
25688
25689 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25690 break
25691 elif $ac_last_try; then
25692 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25693echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25694 { (exit 1); exit 1; }; }
25695 else
25696 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025697 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025698done
25699
25700ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25701if test -n "$ac_eof"; then
25702 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25703 ac_eof=`expr $ac_eof + 1`
25704fi
25705
25706cat >>$CONFIG_STATUS <<_ACEOF
25707cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25708/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25709_ACEOF
25710sed '
25711s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25712s/^/s,@/; s/!/@,|#_!!_#|/
25713:n
25714t n
25715s/'"$ac_delim"'$/,g/; t
25716s/$/\\/; p
25717N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25718' >>$CONFIG_STATUS <conf$$subs.sed
25719rm -f conf$$subs.sed
25720cat >>$CONFIG_STATUS <<_ACEOF
25721CEOF$ac_eof
25722_ACEOF
25723
25724
25725ac_delim='%!_!# '
25726for ac_last_try in false false false false false :; do
25727 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025728SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025729USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025730SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025731USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25732LDLAST!$LDLAST$ac_delim
25733THREADOBJ!$THREADOBJ$ac_delim
25734DLINCLDIR!$DLINCLDIR$ac_delim
25735DYNLOADFILE!$DYNLOADFILE$ac_delim
25736MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25737TRUE!$TRUE$ac_delim
25738LIBOBJS!$LIBOBJS$ac_delim
25739HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25740HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25741HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25742HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25743HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25744LIBM!$LIBM$ac_delim
25745LIBC!$LIBC$ac_delim
25746UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25747THREADHEADERS!$THREADHEADERS$ac_delim
25748SRCDIRS!$SRCDIRS$ac_delim
25749LTLIBOBJS!$LTLIBOBJS$ac_delim
25750_ACEOF
25751
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025752 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 +000025753 break
25754 elif $ac_last_try; then
25755 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25756echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25757 { (exit 1); exit 1; }; }
25758 else
25759 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25760 fi
25761done
25762
25763ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25764if test -n "$ac_eof"; then
25765 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25766 ac_eof=`expr $ac_eof + 1`
25767fi
25768
25769cat >>$CONFIG_STATUS <<_ACEOF
25770cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25771/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25772_ACEOF
25773sed '
25774s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25775s/^/s,@/; s/!/@,|#_!!_#|/
25776:n
25777t n
25778s/'"$ac_delim"'$/,g/; t
25779s/$/\\/; p
25780N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25781' >>$CONFIG_STATUS <conf$$subs.sed
25782rm -f conf$$subs.sed
25783cat >>$CONFIG_STATUS <<_ACEOF
25784:end
25785s/|#_!!_#|//g
25786CEOF$ac_eof
25787_ACEOF
25788
25789
25790# VPATH may cause trouble with some makes, so we remove $(srcdir),
25791# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25792# trailing colons and then remove the whole line if VPATH becomes empty
25793# (actually we leave an empty line to preserve line numbers).
25794if test "x$srcdir" = x.; then
25795 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25796s/:*\$(srcdir):*/:/
25797s/:*\${srcdir}:*/:/
25798s/:*@srcdir@:*/:/
25799s/^\([^=]*=[ ]*\):*/\1/
25800s/:*$//
25801s/^[^=]*=[ ]*$//
25802}'
25803fi
25804
25805cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025806fi # test -n "$CONFIG_FILES"
25807
Martin v. Löwiseba40652007-08-30 20:10:57 +000025808
25809for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
25810do
25811 case $ac_tag in
25812 :[FHLC]) ac_mode=$ac_tag; continue;;
25813 esac
25814 case $ac_mode$ac_tag in
25815 :[FHL]*:*);;
25816 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25817echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25818 { (exit 1); exit 1; }; };;
25819 :[FH]-) ac_tag=-:-;;
25820 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25821 esac
25822 ac_save_IFS=$IFS
25823 IFS=:
25824 set x $ac_tag
25825 IFS=$ac_save_IFS
25826 shift
25827 ac_file=$1
25828 shift
25829
25830 case $ac_mode in
25831 :L) ac_source=$1;;
25832 :[FH])
25833 ac_file_inputs=
25834 for ac_f
25835 do
25836 case $ac_f in
25837 -) ac_f="$tmp/stdin";;
25838 *) # Look for the file first in the build tree, then in the source tree
25839 # (if the path is not absolute). The absolute path cannot be DOS-style,
25840 # because $ac_f cannot contain `:'.
25841 test -f "$ac_f" ||
25842 case $ac_f in
25843 [\\/$]*) false;;
25844 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25845 esac ||
25846 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25847echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25848 { (exit 1); exit 1; }; };;
25849 esac
25850 ac_file_inputs="$ac_file_inputs $ac_f"
25851 done
25852
25853 # Let's still pretend it is `configure' which instantiates (i.e., don't
25854 # use $as_me), people would be surprised to read:
25855 # /* config.h. Generated by config.status. */
25856 configure_input="Generated from "`IFS=:
25857 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25858 if test x"$ac_file" != x-; then
25859 configure_input="$ac_file. $configure_input"
25860 { echo "$as_me:$LINENO: creating $ac_file" >&5
25861echo "$as_me: creating $ac_file" >&6;}
25862 fi
25863
25864 case $ac_tag in
25865 *:-:* | *:-) cat >"$tmp/stdin";;
25866 esac
25867 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025868 esac
25869
Martin v. Löwiseba40652007-08-30 20:10:57 +000025870 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025871$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025872 X"$ac_file" : 'X\(//\)[^/]' \| \
25873 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025874 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025875echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025876 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25877 s//\1/
25878 q
25879 }
25880 /^X\(\/\/\)[^/].*/{
25881 s//\1/
25882 q
25883 }
25884 /^X\(\/\/\)$/{
25885 s//\1/
25886 q
25887 }
25888 /^X\(\/\).*/{
25889 s//\1/
25890 q
25891 }
25892 s/.*/./; q'`
25893 { as_dir="$ac_dir"
25894 case $as_dir in #(
25895 -*) as_dir=./$as_dir;;
25896 esac
25897 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025898 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025899 while :; do
25900 case $as_dir in #(
25901 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25902 *) as_qdir=$as_dir;;
25903 esac
25904 as_dirs="'$as_qdir' $as_dirs"
25905 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025906$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025907 X"$as_dir" : 'X\(//\)[^/]' \| \
25908 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025909 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025910echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025911 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25912 s//\1/
25913 q
25914 }
25915 /^X\(\/\/\)[^/].*/{
25916 s//\1/
25917 q
25918 }
25919 /^X\(\/\/\)$/{
25920 s//\1/
25921 q
25922 }
25923 /^X\(\/\).*/{
25924 s//\1/
25925 q
25926 }
25927 s/.*/./; q'`
25928 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025929 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025930 test -z "$as_dirs" || eval "mkdir $as_dirs"
25931 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25932echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025933 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025934 ac_builddir=.
25935
Martin v. Löwiseba40652007-08-30 20:10:57 +000025936case "$ac_dir" in
25937.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25938*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025939 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025940 # A ".." for each directory in $ac_dir_suffix.
25941 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25942 case $ac_top_builddir_sub in
25943 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25944 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25945 esac ;;
25946esac
25947ac_abs_top_builddir=$ac_pwd
25948ac_abs_builddir=$ac_pwd$ac_dir_suffix
25949# for backward compatibility:
25950ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025951
25952case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025953 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025954 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025955 ac_top_srcdir=$ac_top_builddir_sub
25956 ac_abs_top_srcdir=$ac_pwd ;;
25957 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025958 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025959 ac_top_srcdir=$srcdir
25960 ac_abs_top_srcdir=$srcdir ;;
25961 *) # Relative name.
25962 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25963 ac_top_srcdir=$ac_top_build_prefix$srcdir
25964 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025965esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025966ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025967
Martin v. Löwis11437992002-04-12 09:54:03 +000025968
Martin v. Löwiseba40652007-08-30 20:10:57 +000025969 case $ac_mode in
25970 :F)
25971 #
25972 # CONFIG_FILE
25973 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025974
25975 case $INSTALL in
25976 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025977 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025978 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025979_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025980
25981cat >>$CONFIG_STATUS <<\_ACEOF
25982# If the template does not know about datarootdir, expand it.
25983# FIXME: This hack should be removed a few years after 2.60.
25984ac_datarootdir_hack=; ac_datarootdir_seen=
25985
25986case `sed -n '/datarootdir/ {
25987 p
25988 q
25989}
25990/@datadir@/p
25991/@docdir@/p
25992/@infodir@/p
25993/@localedir@/p
25994/@mandir@/p
25995' $ac_file_inputs` in
25996*datarootdir*) ac_datarootdir_seen=yes;;
25997*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25998 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25999echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26000_ACEOF
26001cat >>$CONFIG_STATUS <<_ACEOF
26002 ac_datarootdir_hack='
26003 s&@datadir@&$datadir&g
26004 s&@docdir@&$docdir&g
26005 s&@infodir@&$infodir&g
26006 s&@localedir@&$localedir&g
26007 s&@mandir@&$mandir&g
26008 s&\\\${datarootdir}&$datarootdir&g' ;;
26009esac
26010_ACEOF
26011
26012# Neutralize VPATH when `$srcdir' = `.'.
26013# Shell code in configure.ac might set extrasub.
26014# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000026015cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026016 sed "$ac_vpsub
26017$extrasub
26018_ACEOF
26019cat >>$CONFIG_STATUS <<\_ACEOF
26020:t
26021/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000026022s&@configure_input@&$configure_input&;t t
26023s&@top_builddir@&$ac_top_builddir_sub&;t t
26024s&@srcdir@&$ac_srcdir&;t t
26025s&@abs_srcdir@&$ac_abs_srcdir&;t t
26026s&@top_srcdir@&$ac_top_srcdir&;t t
26027s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26028s&@builddir@&$ac_builddir&;t t
26029s&@abs_builddir@&$ac_abs_builddir&;t t
26030s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26031s&@INSTALL@&$ac_INSTALL&;t t
26032$ac_datarootdir_hack
26033" $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 +000026034
Martin v. Löwiseba40652007-08-30 20:10:57 +000026035test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26036 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26037 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26038 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26039which seems to be undefined. Please make sure it is defined." >&5
26040echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26041which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026042
Martin v. Löwiseba40652007-08-30 20:10:57 +000026043 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026044 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026045 -) cat "$tmp/out"; rm -f "$tmp/out";;
26046 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026047 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026048 ;;
26049 :H)
26050 #
26051 # CONFIG_HEADER
26052 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026053_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026054
Martin v. Löwiseba40652007-08-30 20:10:57 +000026055# Transform confdefs.h into a sed script `conftest.defines', that
26056# substitutes the proper values into config.h.in to produce config.h.
26057rm -f conftest.defines conftest.tail
26058# First, append a space to every undef/define line, to ease matching.
26059echo 's/$/ /' >conftest.defines
26060# Then, protect against being on the right side of a sed subst, or in
26061# an unquoted here document, in config.status. If some macros were
26062# called several times there might be several #defines for the same
26063# symbol, which is useless. But do not sort them, since the last
26064# AC_DEFINE must be honored.
26065ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26066# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26067# NAME is the cpp macro being defined, VALUE is the value it is being given.
26068# PARAMS is the parameter list in the macro definition--in most cases, it's
26069# just an empty string.
26070ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26071ac_dB='\\)[ (].*,\\1define\\2'
26072ac_dC=' '
26073ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026074
Martin v. Löwiseba40652007-08-30 20:10:57 +000026075uniq confdefs.h |
26076 sed -n '
26077 t rset
26078 :rset
26079 s/^[ ]*#[ ]*define[ ][ ]*//
26080 t ok
26081 d
26082 :ok
26083 s/[\\&,]/\\&/g
26084 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26085 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26086 ' >>conftest.defines
26087
26088# Remove the space that was appended to ease matching.
26089# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026090# example, in the case of _POSIX_SOURCE, which is predefined and required
26091# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026092# (The regexp can be short, since the line contains either #define or #undef.)
26093echo 's/ $//
26094s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000026095
Martin v. Löwiseba40652007-08-30 20:10:57 +000026096# Break up conftest.defines:
26097ac_max_sed_lines=50
26098
26099# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26100# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26101# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26102# et cetera.
26103ac_in='$ac_file_inputs'
26104ac_out='"$tmp/out1"'
26105ac_nxt='"$tmp/out2"'
26106
26107while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000026108do
Martin v. Löwiseba40652007-08-30 20:10:57 +000026109 # Write a here document:
26110 cat >>$CONFIG_STATUS <<_ACEOF
26111 # First, check the format of the line:
26112 cat >"\$tmp/defines.sed" <<\\CEOF
26113/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26114/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26115b
26116:def
26117_ACEOF
26118 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000026119 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026120 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26121 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26122 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26123 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000026124 rm -f conftest.defines
26125 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000026126done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026127rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000026128
Martin v. Löwiseba40652007-08-30 20:10:57 +000026129echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026130cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026131 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026132 echo "/* $configure_input */" >"$tmp/config.h"
26133 cat "$ac_result" >>"$tmp/config.h"
26134 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026135 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26136echo "$as_me: $ac_file is unchanged" >&6;}
26137 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026138 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026139 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026140 fi
26141 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026142 echo "/* $configure_input */"
26143 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026144 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026145 rm -f "$tmp/out12"
26146 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026147
Martin v. Löwiseba40652007-08-30 20:10:57 +000026148
26149 esac
26150
26151done # for ac_tag
26152
Guido van Rossum627b2d71993-12-24 10:39:16 +000026153
Martin v. Löwis11437992002-04-12 09:54:03 +000026154{ (exit 0); exit 0; }
26155_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026156chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026157ac_clean_files=$ac_clean_files_save
26158
26159
26160# configure is writing to config.log, and then calls config.status.
26161# config.status does its own redirection, appending to config.log.
26162# Unfortunately, on DOS this fails, as config.log is still kept open
26163# by configure, so config.status won't be able to write to it; its
26164# output is simply discarded. So we exec the FD to /dev/null,
26165# effectively closing config.log, so it can be properly (re)opened and
26166# appended to by config.status. When coming back to configure, we
26167# need to make the FD available again.
26168if test "$no_create" != yes; then
26169 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026170 ac_config_status_args=
26171 test "$silent" = yes &&
26172 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026173 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026174 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026175 exec 5>>config.log
26176 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26177 # would make configure fail if this is the last instruction.
26178 $ac_cs_success || { (exit 1); exit 1; }
26179fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026180
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026181
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026182echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026183if test ! -f Modules/Setup
26184then
26185 cp $srcdir/Modules/Setup.dist Modules/Setup
26186fi
26187
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026188echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026189if test ! -f Modules/Setup.local
26190then
26191 echo "# Edit this file for local setup changes" >Modules/Setup.local
26192fi
26193
26194echo "creating Makefile"
26195$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26196 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026197 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000026198
26199case $ac_sys_system in
26200BeOS)
26201 { echo "$as_me:$LINENO: WARNING:
26202
26203 Support for BeOS is deprecated as of Python 2.6.
26204 See PEP 11 for the gory details.
26205 " >&5
26206echo "$as_me: WARNING:
26207
26208 Support for BeOS is deprecated as of Python 2.6.
26209 See PEP 11 for the gory details.
26210 " >&2;}
26211 ;;
26212*) ;;
26213esac
26214
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026215mv config.c Modules