blob: 17b932d9616770aadf0a71a76389ad031d664cd5 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jesse Noller355b1262009-04-02 00:03:28 +00002# From configure.in Revision: 70903 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis174440b2008-10-03 08:59:41 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
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'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
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
Martin v. Löwis174440b2008-10-03 08:59:41 +00001250\`configure' configures python 2.7 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
Martin v. Löwis174440b2008-10-03 08:59:41 +00001311 short | recursive ) echo "Configuration of python 2.7:";;
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
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001327 --enable-big-digits[=BITS]
1328 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001329 --enable-unicode[=ucs[24]]
1330 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
1332Optional Packages:
1333 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1334 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001335 --with-universal-archs=ARCH
1336 select architectures for universal build ("32-bit",
1337 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001338 --with-framework-name=FRAMEWORK
1339 specify an alternate name of the framework built
1340 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001342 --with-cxx-main=<compiler>
1343 compile main() and link python executable with C++
1344 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with-suffix=.exe set executable suffix
1346 --with-pydebug build with Py_DEBUG defined
1347 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001348 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
1355 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001357 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-pymalloc disable/enable specialized mallocs
1359 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-fpectl enable SIGFPE catching
1361 --with-libm=STRING math library
1362 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001363
1364Some influential environment variables:
1365 CC C compiler command
1366 CFLAGS C compiler flags
1367 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1368 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001369 LIBS libraries to pass to the linker, e.g. -l<library>
1370 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1371 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 CPP C preprocessor
1373
1374Use these variables to override the choices made by `configure' or to help
1375it to find libraries and programs with nonstandard names/locations.
1376
Martin v. Löwis1d459062005-03-14 21:23:33 +00001377Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001378_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001379ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001380fi
1381
1382if test "$ac_init_help" = "recursive"; then
1383 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 ac_builddir=.
1387
Martin v. Löwiseba40652007-08-30 20:10:57 +00001388case "$ac_dir" in
1389.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1390*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001392 # A ".." for each directory in $ac_dir_suffix.
1393 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1394 case $ac_top_builddir_sub in
1395 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1397 esac ;;
1398esac
1399ac_abs_top_builddir=$ac_pwd
1400ac_abs_builddir=$ac_pwd$ac_dir_suffix
1401# for backward compatibility:
1402ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
1404case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001405 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407 ac_top_srcdir=$ac_top_builddir_sub
1408 ac_abs_top_srcdir=$ac_pwd ;;
1409 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411 ac_top_srcdir=$srcdir
1412 ac_abs_top_srcdir=$srcdir ;;
1413 *) # Relative name.
1414 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1415 ac_top_srcdir=$ac_top_build_prefix$srcdir
1416 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001417esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001419
Martin v. Löwiseba40652007-08-30 20:10:57 +00001420 cd "$ac_dir" || { ac_status=$?; continue; }
1421 # Check for guested configure.
1422 if test -f "$ac_srcdir/configure.gnu"; then
1423 echo &&
1424 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1425 elif test -f "$ac_srcdir/configure"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 else
1429 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430 fi || ac_status=$?
1431 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 done
1433fi
1434
Martin v. Löwiseba40652007-08-30 20:10:57 +00001435test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001436if $ac_init_version; then
1437 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001438python configure 2.7
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001440
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14422002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001443This configure script is free software; the Free Software Foundation
1444gives unlimited permission to copy, distribute and modify it.
1445_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001448cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This file contains any messages produced by compilers while
1450running configure, to aid debugging if configure makes a mistake.
1451
Martin v. Löwis174440b2008-10-03 08:59:41 +00001452It was created by python $as_me 2.7, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001453generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001454
1455 $ $0 $@
1456
1457_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001458exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001459{
1460cat <<_ASUNAME
1461## --------- ##
1462## Platform. ##
1463## --------- ##
1464
1465hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1466uname -m = `(uname -m) 2>/dev/null || echo unknown`
1467uname -r = `(uname -r) 2>/dev/null || echo unknown`
1468uname -s = `(uname -s) 2>/dev/null || echo unknown`
1469uname -v = `(uname -v) 2>/dev/null || echo unknown`
1470
1471/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1472/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1473
1474/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1475/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1476/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001477/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001478/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1479/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1480/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1481
1482_ASUNAME
1483
1484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1485for as_dir in $PATH
1486do
1487 IFS=$as_save_IFS
1488 test -z "$as_dir" && as_dir=.
1489 echo "PATH: $as_dir"
1490done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001491IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001492
1493} >&5
1494
1495cat >&5 <<_ACEOF
1496
1497
1498## ----------- ##
1499## Core tests. ##
1500## ----------- ##
1501
1502_ACEOF
1503
1504
1505# Keep a trace of the command line.
1506# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001507# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001509# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001511ac_configure_args0=
1512ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001513ac_must_keep_next=false
1514for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001515do
Skip Montanaro6dead952003-09-25 14:50:04 +00001516 for ac_arg
1517 do
1518 case $ac_arg in
1519 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1520 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1521 | -silent | --silent | --silen | --sile | --sil)
1522 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001523 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1525 esac
1526 case $ac_pass in
1527 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1528 2)
1529 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1530 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001532 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001533 case $ac_arg in
1534 *=* | --config-cache | -C | -disable-* | --disable-* \
1535 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1536 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1537 | -with-* | --with-* | -without-* | --without-* | --x)
1538 case "$ac_configure_args0 " in
1539 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1540 esac
1541 ;;
1542 -* ) ac_must_keep_next=true ;;
1543 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001544 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001546 ;;
1547 esac
1548 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001549done
Skip Montanaro6dead952003-09-25 14:50:04 +00001550$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1551$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 +00001552
1553# When interrupted or exit'd, cleanup temporary files, and complete
1554# config.log. We remove comments because anyway the quotes in there
1555# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001556# WARNING: Use '\'' to represent an apostrophe within the trap.
1557# 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 +00001558trap 'exit_status=$?
1559 # Save into config.log some information that might help in debugging.
1560 {
1561 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001562
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 cat <<\_ASBOX
1564## ---------------- ##
1565## Cache variables. ##
1566## ---------------- ##
1567_ASBOX
1568 echo
1569 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001570(
1571 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1572 eval ac_val=\$$ac_var
1573 case $ac_val in #(
1574 *${as_nl}*)
1575 case $ac_var in #(
1576 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1577echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1578 esac
1579 case $ac_var in #(
1580 _ | IFS | as_nl) ;; #(
1581 *) $as_unset $ac_var ;;
1582 esac ;;
1583 esac
1584 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001586 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1587 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001589 "s/'\''/'\''\\\\'\'''\''/g;
1590 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1591 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001592 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001594 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 esac |
1596 sort
1597)
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001599
1600 cat <<\_ASBOX
1601## ----------------- ##
1602## Output variables. ##
1603## ----------------- ##
1604_ASBOX
1605 echo
1606 for ac_var in $ac_subst_vars
1607 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001608 eval ac_val=\$$ac_var
1609 case $ac_val in
1610 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1611 esac
1612 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001613 done | sort
1614 echo
1615
1616 if test -n "$ac_subst_files"; then
1617 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618## ------------------- ##
1619## File substitutions. ##
1620## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001621_ASBOX
1622 echo
1623 for ac_var in $ac_subst_files
1624 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001625 eval ac_val=\$$ac_var
1626 case $ac_val in
1627 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1628 esac
1629 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001630 done | sort
1631 echo
1632 fi
1633
Martin v. Löwis11437992002-04-12 09:54:03 +00001634 if test -s confdefs.h; then
1635 cat <<\_ASBOX
1636## ----------- ##
1637## confdefs.h. ##
1638## ----------- ##
1639_ASBOX
1640 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001641 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 echo
1643 fi
1644 test "$ac_signal" != 0 &&
1645 echo "$as_me: caught signal $ac_signal"
1646 echo "$as_me: exit $exit_status"
1647 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001648 rm -f core *.core core.conftest.* &&
1649 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001651' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001652for ac_signal in 1 2 13 15; do
1653 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1654done
1655ac_signal=0
1656
1657# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001658rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001659
1660# Predefined preprocessor variables.
1661
1662cat >>confdefs.h <<_ACEOF
1663#define PACKAGE_NAME "$PACKAGE_NAME"
1664_ACEOF
1665
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1669_ACEOF
1670
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_VERSION "$PACKAGE_VERSION"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_STRING "$PACKAGE_STRING"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1684_ACEOF
1685
1686
1687# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001688# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001689if test -n "$CONFIG_SITE"; then
1690 set x "$CONFIG_SITE"
1691elif test "x$prefix" != xNONE; then
1692 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1693else
1694 set x "$ac_default_prefix/share/config.site" \
1695 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001697shift
1698for ac_site_file
1699do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001700 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1702echo "$as_me: loading site script $ac_site_file" >&6;}
1703 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704 . "$ac_site_file"
1705 fi
1706done
1707
1708if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 # Some versions of bash will fail to source /dev/null (special
1710 # files actually), so we avoid doing that.
1711 if test -f "$cache_file"; then
1712 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1713echo "$as_me: loading cache $cache_file" >&6;}
1714 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001715 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1716 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 esac
1718 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001719else
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1721echo "$as_me: creating cache $cache_file" >&6;}
1722 >$cache_file
1723fi
1724
1725# Check that the precious variables saved in the cache have kept the same
1726# value.
1727ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001728for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001729 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1730 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001731 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1732 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001733 case $ac_old_set,$ac_new_set in
1734 set,)
1735 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1736echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1737 ac_cache_corrupted=: ;;
1738 ,set)
1739 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1740echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1741 ac_cache_corrupted=: ;;
1742 ,);;
1743 *)
1744 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001746echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001747 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001748echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001749 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001750echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001751 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001752 fi;;
1753 esac
1754 # Pass precious variables to config.status.
1755 if test "$ac_new_set" = set; then
1756 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001757 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 *) ac_arg=$ac_var=$ac_new_val ;;
1759 esac
1760 case " $ac_configure_args " in
1761 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1762 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1763 esac
1764 fi
1765done
1766if $ac_cache_corrupted; then
1767 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1768echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1769 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1770echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1771 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001772fi
1773
Martin v. Löwiseba40652007-08-30 20:10:57 +00001774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
Guido van Rossum7f43da71994-08-01 12:15:30 +00001798ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1802ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001803
Guido van Rossum627b2d71993-12-24 10:39:16 +00001804
Michael W. Hudson54241132001-12-07 15:38:26 +00001805
Martin v. Löwiseba40652007-08-30 20:10:57 +00001806ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001807
1808
Martin v. Löwis11437992002-04-12 09:54:03 +00001809
Georg Brandlbcd64a32009-03-31 21:45:18 +00001810if test "$prefix" != "/"; then
1811 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1812fi
1813
1814
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
1816
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001817
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001818
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001819# We don't use PACKAGE_ variables, and they cause conflicts
1820# with other autoconf-based packages that include Python.h
1821grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1822rm confdefs.h
1823mv confdefs.h.new confdefs.h
1824
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001825
Martin v. Löwis174440b2008-10-03 08:59:41 +00001826VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001827
Martin v. Löwis1142de32002-03-29 16:28:31 +00001828
1829SOVERSION=1.0
1830
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001831# The later defininition of _XOPEN_SOURCE disables certain features
1832# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1833
1834cat >>confdefs.h <<\_ACEOF
1835#define _GNU_SOURCE 1
1836_ACEOF
1837
1838
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001839# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1840# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1841# them.
1842
1843cat >>confdefs.h <<\_ACEOF
1844#define _NETBSD_SOURCE 1
1845_ACEOF
1846
1847
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001848# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1849# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1850# them.
1851
1852cat >>confdefs.h <<\_ACEOF
1853#define __BSD_VISIBLE 1
1854_ACEOF
1855
1856
Martin v. Löwisd6320502004-08-12 13:45:08 +00001857# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1858# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1859
1860cat >>confdefs.h <<\_ACEOF
1861#define _BSD_TYPES 1
1862_ACEOF
1863
1864
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001865# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1866# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1867# them.
1868
1869cat >>confdefs.h <<\_ACEOF
1870#define _DARWIN_C_SOURCE 1
1871_ACEOF
1872
1873
1874
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001875define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001876
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001877# Arguments passed to configure.
1878
1879CONFIG_ARGS="$ac_configure_args"
1880
Martin v. Löwiseba40652007-08-30 20:10:57 +00001881# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001882if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001883 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001884 case $enableval in
1885 yes)
1886 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1887 ;;
1888 esac
1889 case $enableval in
1890 no)
1891 UNIVERSALSDK=
1892 enable_universalsdk=
1893 ;;
1894 *)
1895 UNIVERSALSDK=$enableval
1896 ;;
1897 esac
1898
1899else
1900
1901 UNIVERSALSDK=
1902 enable_universalsdk=
1903
Martin v. Löwiseba40652007-08-30 20:10:57 +00001904fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001905
1906
Martin v. Löwiseba40652007-08-30 20:10:57 +00001907
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001908ARCH_RUN_32BIT=
1909
1910
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001911UNIVERSAL_ARCHS="32-bit"
1912{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1913echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1914
1915# Check whether --with-universal-archs was given.
1916if test "${with_universal_archs+set}" = set; then
1917 withval=$with_universal_archs;
1918 { echo "$as_me:$LINENO: result: $withval" >&5
1919echo "${ECHO_T}$withval" >&6; }
1920 UNIVERSAL_ARCHS="$withval"
1921
1922else
1923
1924 { echo "$as_me:$LINENO: result: 32-bit" >&5
1925echo "${ECHO_T}32-bit" >&6; }
1926
1927fi
1928
1929
1930
1931
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001932
1933# Check whether --with-framework-name was given.
1934if test "${with_framework_name+set}" = set; then
1935 withval=$with_framework_name;
1936 PYTHONFRAMEWORK=${withval}
1937 PYTHONFRAMEWORKDIR=${withval}.framework
1938 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1939
1940else
1941
1942 PYTHONFRAMEWORK=Python
1943 PYTHONFRAMEWORKDIR=Python.framework
1944 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1945
1946fi
1947
Martin v. Löwiseba40652007-08-30 20:10:57 +00001948# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001949if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001950 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001951 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001952 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001953 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001954 esac
1955 case $enableval in
1956 no)
1957 PYTHONFRAMEWORK=
1958 PYTHONFRAMEWORKDIR=no-framework
1959 PYTHONFRAMEWORKPREFIX=
1960 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001961 FRAMEWORKINSTALLFIRST=
1962 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001963 FRAMEWORKALTINSTALLFIRST=
1964 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001965 if test "x${prefix}" = "xNONE"; then
1966 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1967 else
1968 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1969 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001970 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001971 ;;
1972 *)
1973 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001974 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001975 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001976 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1977 if test "$UNIVERSAL_ARCHS" = "all"
1978 then
1979 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001980 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001981 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001982 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001983 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1984 fi
1985
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001986 if test "x${prefix}" = "xNONE" ; then
1987 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1988 else
1989 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1990 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001991 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001992
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001993 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001994 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001995 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001996
Martin v. Löwiseba40652007-08-30 20:10:57 +00001997 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001998
Martin v. Löwiseba40652007-08-30 20:10:57 +00001999 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002000
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002001 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2002
2003 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2004
Jack Jansene578a632001-08-15 01:27:14 +00002005 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Guido van Rossum563e7081996-09-10 18:20:48 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002011 PYTHONFRAMEWORKPREFIX=
2012 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002017 if test "x${prefix}" = "xNONE" ; then
2018 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2019 else
2020 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2021 fi
Jack Jansene578a632001-08-15 01:27:14 +00002022 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002024 if test "$UNIVERSAL_ARCHS" = "all"
2025 then
2026 FRAMEWORKINSTALLLAST=update4wayuniversal
2027 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2028 fi
2029
Martin v. Löwiseba40652007-08-30 20:10:57 +00002030fi
2031
Michael W. Hudson54241132001-12-07 15:38:26 +00002032
2033
2034
2035
Jack Jansene578a632001-08-15 01:27:14 +00002036
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002037
2038
Ronald Oussoren5b787322006-06-06 19:50:24 +00002039
2040
2041
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002042
Jack Jansene578a632001-08-15 01:27:14 +00002043##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002044## AC_HELP_STRING(--with-dyld,
2045## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002046##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002047# Set name for machine-dependent library files
2048
Martin v. Löwiseba40652007-08-30 20:10:57 +00002049{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2050echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002051if test -z "$MACHDEP"
2052then
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002054 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2055 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002056 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002059 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002060 ac_md_system=`echo $ac_sys_system |
2061 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2062 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002063 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002064 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002065
Guido van Rossum07397971997-04-29 21:49:50 +00002066 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002067 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002068 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002069 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002070 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002071 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072 esac
2073fi
Guido van Rossum91922671997-10-09 20:24:13 +00002074
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002075# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2076# disable features if it is defined, without any means to access these
2077# features as extensions. For these systems, we skip the definition of
2078# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2079# some feature, make sure there is no alternative way to access this
2080# feature. Also, when using wildcards, make sure you have verified the
2081# need for not defining _XOPEN_SOURCE on all systems matching the
2082# wildcard, and that the wildcard does not include future systems
2083# (which may remove their limitations).
2084case $ac_sys_system/$ac_sys_release in
2085 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2086 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002087 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002088 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002089 define_xopen_source=no
2090 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2091 # also defined. This can be overridden by defining _BSD_SOURCE
2092 # As this has a different meaning on Linux, only define it on OpenBSD
2093
2094cat >>confdefs.h <<\_ACEOF
2095#define _BSD_SOURCE 1
2096_ACEOF
2097
2098 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002099 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2100 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2101 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002102 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 +00002103 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002104 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2105 # of union __?sigval. Reported by Stuart Bishop.
2106 SunOS/5.6)
2107 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002108 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2109 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002110 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002111 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002112 define_xopen_source=no;;
2113 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002114 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002115 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002116 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002117 # On FreeBSD 4, the math functions C89 does not cover are never defined
2118 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2119 FreeBSD/4.*)
2120 define_xopen_source=no;;
2121 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2122 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2123 # identifies itself as Darwin/7.*
2124 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # disables platform specific features beyond repair.
2126 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2127 # has no effect, don't bother defining them
2128 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002130 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2131 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2132 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002133 AIX/4)
2134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002135 AIX/5)
2136 if test `uname -r` -eq 1; then
2137 define_xopen_source=no
2138 fi
2139 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002140 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2141 # defining NI_NUMERICHOST.
2142 QNX/6.3.2)
2143 define_xopen_source=no
2144 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002145
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002146esac
2147
2148if test $define_xopen_source = yes
2149then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002150 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2151 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002152 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2153 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002155 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002156
2157cat >>confdefs.h <<\_ACEOF
2158#define _XOPEN_SOURCE 500
2159_ACEOF
2160
2161 ;;
2162 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002163
2164cat >>confdefs.h <<\_ACEOF
2165#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002166_ACEOF
2167
Skip Montanarof0d5f792004-08-15 14:08:23 +00002168 ;;
2169 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002170
2171 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2172 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2173 # several APIs are not declared. Since this is also needed in some
2174 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002175 # except for Solaris 10, where it must not be defined,
2176 # as it implies XPG4.2
2177 case $ac_sys_system/$ac_sys_release in
2178 SunOS/5.10)
2179 ;;
2180 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181
2182cat >>confdefs.h <<\_ACEOF
2183#define _XOPEN_SOURCE_EXTENDED 1
2184_ACEOF
2185
Martin v. Löwis7dece662005-11-26 11:38:24 +00002186 ;;
2187 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002189
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002190cat >>confdefs.h <<\_ACEOF
2191#define _POSIX_C_SOURCE 200112L
2192_ACEOF
2193
2194
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002195fi
2196
Guido van Rossum91922671997-10-09 20:24:13 +00002197#
2198# SGI compilers allow the specification of the both the ABI and the
2199# ISA on the command line. Depending on the values of these switches,
2200# different and often incompatable code will be generated.
2201#
2202# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2203# thus supply support for various ABI/ISA combinations. The MACHDEP
2204# variable is also adjusted.
2205#
2206
2207if test ! -z "$SGI_ABI"
2208then
2209 CC="cc $SGI_ABI"
2210 LDFLAGS="$SGI_ABI $LDFLAGS"
2211 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002213{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2214echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002215
Jack Jansen83f898c2002-12-30 22:23:40 +00002216# And add extra plat-mac for darwin
2217
Jack Jansen7b59b422003-03-17 15:44:10 +00002218
Martin v. Löwiseba40652007-08-30 20:10:57 +00002219{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2220echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002221if test -z "$EXTRAPLATDIR"
2222then
2223 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002224 darwin)
2225 EXTRAPLATDIR="\$(PLATMACDIRS)"
2226 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2227 ;;
2228 *)
2229 EXTRAPLATDIR=""
2230 EXTRAMACHDEPPATH=""
2231 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002232 esac
2233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002234{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2235echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002236
Jack Jansen6b08a402004-06-03 12:41:45 +00002237# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2238# it may influence the way we can build extensions, so distutils
2239# needs to check it
2240
Ronald Oussoren988117f2006-04-29 11:31:35 +00002241
Jack Jansen6b08a402004-06-03 12:41:45 +00002242CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002243EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002244
Mark Dickinson65134662008-04-25 16:11:04 +00002245{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2246echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2247ac_sys_machine=`uname -m`
2248{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2249echo "${ECHO_T}$ac_sys_machine" >&6; }
2250
Guido van Rossum627b2d71993-12-24 10:39:16 +00002251# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002252
2253# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2254# for debug/optimization stuff. BASECFLAGS is for flags that are required
2255# just to get things to compile and link. Users are free to override OPT
2256# when running configure or make. The build should not break if they do.
2257# BASECFLAGS should generally not be messed with, however.
2258
2259# XXX shouldn't some/most/all of this code be merged with the stuff later
2260# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002261{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2262echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002263
Martin v. Löwiseba40652007-08-30 20:10:57 +00002264# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002265if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002266 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002267 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002268 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002269 without_gcc=yes;;
2270 yes) CC=gcc
2271 without_gcc=no;;
2272 *) CC=$withval
2273 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002274 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002275else
Martin v. Löwis11437992002-04-12 09:54:03 +00002276
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002277 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002278 AIX*) CC=cc_r
2279 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002280 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002281 case $BE_HOST_CPU in
2282 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002283 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002284 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002285 BASECFLAGS="$BASECFLAGS -export pragma"
2286 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002287 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002288 ;;
2289 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002290 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002291 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002292 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 ;;
2294 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002295 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2296echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2297 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002298 ;;
2299 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002300 AR="\$(srcdir)/Modules/ar_beos"
2301 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002302 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002303 Monterey*)
2304 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002305 without_gcc=;;
2306 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002307 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002308fi
2309
2310{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2311echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002312
Guido van Rossum8b131c51995-03-09 14:10:13 +00002313# If the user switches compilers, we can't believe the cache
2314if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2315then
Martin v. Löwis11437992002-04-12 09:54:03 +00002316 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2317(it is also a good idea to do 'make clean' before compiling)" >&5
2318echo "$as_me: error: cached CC is different -- throw away $cache_file
2319(it is also a good idea to do 'make clean' before compiling)" >&2;}
2320 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002321fi
2322
Martin v. Löwis11437992002-04-12 09:54:03 +00002323ac_ext=c
2324ac_cpp='$CPP $CPPFLAGS'
2325ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2326ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2327ac_compiler_gnu=$ac_cv_c_compiler_gnu
2328if test -n "$ac_tool_prefix"; then
2329 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2330set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002331{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2332echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002333if test "${ac_cv_prog_CC+set}" = set; then
2334 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002335else
2336 if test -n "$CC"; then
2337 ac_cv_prog_CC="$CC" # Let the user override the test.
2338else
Martin v. Löwis11437992002-04-12 09:54:03 +00002339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2340for as_dir in $PATH
2341do
2342 IFS=$as_save_IFS
2343 test -z "$as_dir" && as_dir=.
2344 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002345 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 +00002346 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2347 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2348 break 2
2349 fi
2350done
2351done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002352IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002353
Jack Jansendd19cf82001-12-06 22:36:17 +00002354fi
2355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002356CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002357if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002358 { echo "$as_me:$LINENO: result: $CC" >&5
2359echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002360else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002361 { echo "$as_me:$LINENO: result: no" >&5
2362echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002363fi
2364
Martin v. Löwiseba40652007-08-30 20:10:57 +00002365
Martin v. Löwis11437992002-04-12 09:54:03 +00002366fi
2367if test -z "$ac_cv_prog_CC"; then
2368 ac_ct_CC=$CC
2369 # Extract the first word of "gcc", so it can be a program name with args.
2370set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002371{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2372echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002373if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2374 echo $ECHO_N "(cached) $ECHO_C" >&6
2375else
2376 if test -n "$ac_ct_CC"; then
2377 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2378else
2379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2380for as_dir in $PATH
2381do
2382 IFS=$as_save_IFS
2383 test -z "$as_dir" && as_dir=.
2384 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002385 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 +00002386 ac_cv_prog_ac_ct_CC="gcc"
2387 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2388 break 2
2389 fi
2390done
2391done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394fi
2395fi
2396ac_ct_CC=$ac_cv_prog_ac_ct_CC
2397if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002398 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2399echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002400else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401 { echo "$as_me:$LINENO: result: no" >&5
2402echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002403fi
2404
Martin v. Löwiseba40652007-08-30 20:10:57 +00002405 if test "x$ac_ct_CC" = x; then
2406 CC=""
2407 else
2408 case $cross_compiling:$ac_tool_warned in
2409yes:)
2410{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2411whose name does not start with the host triplet. If you think this
2412configuration is useful to you, please write to autoconf@gnu.org." >&5
2413echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2414whose name does not start with the host triplet. If you think this
2415configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2416ac_tool_warned=yes ;;
2417esac
2418 CC=$ac_ct_CC
2419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002420else
2421 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002422fi
2423
Jack Jansendd19cf82001-12-06 22:36:17 +00002424if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002425 if test -n "$ac_tool_prefix"; then
2426 # 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 +00002427set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002428{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2429echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002430if test "${ac_cv_prog_CC+set}" = set; then
2431 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002432else
2433 if test -n "$CC"; then
2434 ac_cv_prog_CC="$CC" # Let the user override the test.
2435else
Martin v. Löwis11437992002-04-12 09:54:03 +00002436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2437for as_dir in $PATH
2438do
2439 IFS=$as_save_IFS
2440 test -z "$as_dir" && as_dir=.
2441 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002442 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 +00002443 ac_cv_prog_CC="${ac_tool_prefix}cc"
2444 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2445 break 2
2446 fi
2447done
2448done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002449IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451fi
2452fi
2453CC=$ac_cv_prog_CC
2454if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455 { echo "$as_me:$LINENO: result: $CC" >&5
2456echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002457else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002458 { echo "$as_me:$LINENO: result: no" >&5
2459echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002460fi
2461
Martin v. Löwiseba40652007-08-30 20:10:57 +00002462
Martin v. Löwis11437992002-04-12 09:54:03 +00002463 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002464fi
2465if test -z "$CC"; then
2466 # Extract the first word of "cc", so it can be a program name with args.
2467set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2469echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002470if test "${ac_cv_prog_CC+set}" = set; then
2471 echo $ECHO_N "(cached) $ECHO_C" >&6
2472else
2473 if test -n "$CC"; then
2474 ac_cv_prog_CC="$CC" # Let the user override the test.
2475else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002476 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2478for as_dir in $PATH
2479do
2480 IFS=$as_save_IFS
2481 test -z "$as_dir" && as_dir=.
2482 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002483 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 +00002484 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2485 ac_prog_rejected=yes
2486 continue
2487 fi
2488 ac_cv_prog_CC="cc"
2489 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2490 break 2
2491 fi
2492done
2493done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002495
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002496if test $ac_prog_rejected = yes; then
2497 # We found a bogon in the path, so make sure we never use it.
2498 set dummy $ac_cv_prog_CC
2499 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002501 # We chose a different compiler from the bogus one.
2502 # However, it has the same basename, so the bogon will be chosen
2503 # first if we set CC to just the basename; use the full file name.
2504 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002506 fi
2507fi
2508fi
2509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002510CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002511if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512 { echo "$as_me:$LINENO: result: $CC" >&5
2513echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002514else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002515 { echo "$as_me:$LINENO: result: no" >&5
2516echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002517fi
2518
Martin v. Löwiseba40652007-08-30 20:10:57 +00002519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520fi
2521if test -z "$CC"; then
2522 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002523 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 do
2525 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2526set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002527{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2528echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002529if test "${ac_cv_prog_CC+set}" = set; then
2530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002531else
2532 if test -n "$CC"; then
2533 ac_cv_prog_CC="$CC" # Let the user override the test.
2534else
Martin v. Löwis11437992002-04-12 09:54:03 +00002535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2536for as_dir in $PATH
2537do
2538 IFS=$as_save_IFS
2539 test -z "$as_dir" && as_dir=.
2540 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541 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 +00002542 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2543 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2544 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002545 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002546done
2547done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002548IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002549
2550fi
2551fi
2552CC=$ac_cv_prog_CC
2553if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554 { echo "$as_me:$LINENO: result: $CC" >&5
2555echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002556else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002557 { echo "$as_me:$LINENO: result: no" >&5
2558echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002559fi
2560
Martin v. Löwiseba40652007-08-30 20:10:57 +00002561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 test -n "$CC" && break
2563 done
2564fi
2565if test -z "$CC"; then
2566 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002567 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002568do
2569 # Extract the first word of "$ac_prog", so it can be a program name with args.
2570set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2572echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002573if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2574 echo $ECHO_N "(cached) $ECHO_C" >&6
2575else
2576 if test -n "$ac_ct_CC"; then
2577 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2578else
2579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2580for as_dir in $PATH
2581do
2582 IFS=$as_save_IFS
2583 test -z "$as_dir" && as_dir=.
2584 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002585 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 +00002586 ac_cv_prog_ac_ct_CC="$ac_prog"
2587 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2588 break 2
2589 fi
2590done
2591done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002592IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594fi
2595fi
2596ac_ct_CC=$ac_cv_prog_ac_ct_CC
2597if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002598 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2599echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002600else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601 { echo "$as_me:$LINENO: result: no" >&5
2602echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002603fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002604
Martin v. Löwiseba40652007-08-30 20:10:57 +00002605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 test -n "$ac_ct_CC" && break
2607done
Michael W. Hudson54241132001-12-07 15:38:26 +00002608
Martin v. Löwiseba40652007-08-30 20:10:57 +00002609 if test "x$ac_ct_CC" = x; then
2610 CC=""
2611 else
2612 case $cross_compiling:$ac_tool_warned in
2613yes:)
2614{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2615whose name does not start with the host triplet. If you think this
2616configuration is useful to you, please write to autoconf@gnu.org." >&5
2617echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2618whose name does not start with the host triplet. If you think this
2619configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2620ac_tool_warned=yes ;;
2621esac
2622 CC=$ac_ct_CC
2623 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002624fi
2625
2626fi
2627
2628
Skip Montanaro6dead952003-09-25 14:50:04 +00002629test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2630See \`config.log' for more details." >&5
2631echo "$as_me: error: no acceptable C compiler found in \$PATH
2632See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 { (exit 1); exit 1; }; }
2634
2635# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002637ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002638{ (ac_try="$ac_compiler --version >&5"
2639case "(($ac_try" in
2640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2641 *) ac_try_echo=$ac_try;;
2642esac
2643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2644 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 ac_status=$?
2646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2647 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002648{ (ac_try="$ac_compiler -v >&5"
2649case "(($ac_try" in
2650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2651 *) ac_try_echo=$ac_try;;
2652esac
2653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2654 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 ac_status=$?
2656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2657 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658{ (ac_try="$ac_compiler -V >&5"
2659case "(($ac_try" in
2660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2661 *) ac_try_echo=$ac_try;;
2662esac
2663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2664 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 ac_status=$?
2666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2667 (exit $ac_status); }
2668
2669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002670/* confdefs.h. */
2671_ACEOF
2672cat confdefs.h >>conftest.$ac_ext
2673cat >>conftest.$ac_ext <<_ACEOF
2674/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676int
2677main ()
2678{
2679
2680 ;
2681 return 0;
2682}
2683_ACEOF
2684ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002685ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002686# Try to create an executable without -o first, disregard a.out.
2687# It will help us diagnose broken compilers, and finding out an intuition
2688# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002689{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2690echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002691ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002692#
2693# List of possible output files, starting from the most likely.
2694# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2695# only as a last resort. b.out is created by i960 compilers.
2696ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2697#
2698# The IRIX 6 linker writes into existing files which may not be
2699# executable, retaining their permissions. Remove them first so a
2700# subsequent execution test works.
2701ac_rmfiles=
2702for ac_file in $ac_files
2703do
2704 case $ac_file in
2705 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2706 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2707 esac
2708done
2709rm -f $ac_rmfiles
2710
2711if { (ac_try="$ac_link_default"
2712case "(($ac_try" in
2713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2714 *) ac_try_echo=$ac_try;;
2715esac
2716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2717 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 ac_status=$?
2719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2720 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002721 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2722# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2723# in a Makefile. We should not override ac_cv_exeext if it was cached,
2724# so that the user can short-circuit this test for compilers unknown to
2725# Autoconf.
2726for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002727do
2728 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002731 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002732 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 # We found the default executable, but exeext='' is most
2734 # certainly right.
2735 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002736 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002737 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2738 then :; else
2739 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2740 fi
2741 # We set ac_cv_exeext here because the later test for it is not
2742 # safe: cross compilers may not add the suffix if given an `-o'
2743 # argument, so we may need to know it at that point already.
2744 # Even if this section looks crufty: it has the advantage of
2745 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002746 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002747 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002748 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 esac
2750done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002751test "$ac_cv_exeext" = no && ac_cv_exeext=
2752
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002753else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002754 ac_file=''
2755fi
2756
2757{ echo "$as_me:$LINENO: result: $ac_file" >&5
2758echo "${ECHO_T}$ac_file" >&6; }
2759if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002761sed 's/^/| /' conftest.$ac_ext >&5
2762
2763{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2764See \`config.log' for more details." >&5
2765echo "$as_me: error: C compiler cannot create executables
2766See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002768fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002769
Martin v. Löwis11437992002-04-12 09:54:03 +00002770ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002771
Martin v. Löwiseba40652007-08-30 20:10:57 +00002772# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002773# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002774{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2775echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002776# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2777# If not cross compiling, check that we can run a simple program.
2778if test "$cross_compiling" != yes; then
2779 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002780 { (case "(($ac_try" in
2781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2782 *) ac_try_echo=$ac_try;;
2783esac
2784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2785 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002786 ac_status=$?
2787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2788 (exit $ac_status); }; }; then
2789 cross_compiling=no
2790 else
2791 if test "$cross_compiling" = maybe; then
2792 cross_compiling=yes
2793 else
2794 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002795If you meant to cross compile, use \`--host'.
2796See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002797echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002798If you meant to cross compile, use \`--host'.
2799See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002800 { (exit 1); exit 1; }; }
2801 fi
2802 fi
2803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002804{ echo "$as_me:$LINENO: result: yes" >&5
2805echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002806
Skip Montanaro6dead952003-09-25 14:50:04 +00002807rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002808ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002809# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002810# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002811{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2812echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2813{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2814echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002815
Martin v. Löwiseba40652007-08-30 20:10:57 +00002816{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2817echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2818if { (ac_try="$ac_link"
2819case "(($ac_try" in
2820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2821 *) ac_try_echo=$ac_try;;
2822esac
2823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2824 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002825 ac_status=$?
2826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2827 (exit $ac_status); }; then
2828 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2829# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2830# work properly (i.e., refer to `conftest.exe'), while it won't with
2831# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002832for ac_file in conftest.exe conftest conftest.*; do
2833 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002835 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002837 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 * ) break;;
2839 esac
2840done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002841else
Skip Montanaro6dead952003-09-25 14:50:04 +00002842 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2843See \`config.log' for more details." >&5
2844echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2845See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002846 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002847fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002848
Martin v. Löwis11437992002-04-12 09:54:03 +00002849rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002850{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2851echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002852
2853rm -f conftest.$ac_ext
2854EXEEXT=$ac_cv_exeext
2855ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002856{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2857echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002858if test "${ac_cv_objext+set}" = set; then
2859 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002860else
Martin v. Löwis11437992002-04-12 09:54:03 +00002861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002862/* confdefs.h. */
2863_ACEOF
2864cat confdefs.h >>conftest.$ac_ext
2865cat >>conftest.$ac_ext <<_ACEOF
2866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002867
Martin v. Löwis11437992002-04-12 09:54:03 +00002868int
2869main ()
2870{
2871
2872 ;
2873 return 0;
2874}
2875_ACEOF
2876rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002877if { (ac_try="$ac_compile"
2878case "(($ac_try" in
2879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2880 *) ac_try_echo=$ac_try;;
2881esac
2882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2883 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002884 ac_status=$?
2885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2886 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002887 for ac_file in conftest.o conftest.obj conftest.*; do
2888 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002890 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002891 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2892 break;;
2893 esac
2894done
2895else
2896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002897sed 's/^/| /' conftest.$ac_ext >&5
2898
2899{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2900See \`config.log' for more details." >&5
2901echo "$as_me: error: cannot compute suffix of object files: cannot compile
2902See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 { (exit 1); exit 1; }; }
2904fi
2905
2906rm -f conftest.$ac_cv_objext conftest.$ac_ext
2907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002908{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2909echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002910OBJEXT=$ac_cv_objext
2911ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002912{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2913echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002914if test "${ac_cv_c_compiler_gnu+set}" = set; then
2915 echo $ECHO_N "(cached) $ECHO_C" >&6
2916else
2917 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002918/* confdefs.h. */
2919_ACEOF
2920cat confdefs.h >>conftest.$ac_ext
2921cat >>conftest.$ac_ext <<_ACEOF
2922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002923
Martin v. Löwis11437992002-04-12 09:54:03 +00002924int
2925main ()
2926{
2927#ifndef __GNUC__
2928 choke me
2929#endif
2930
2931 ;
2932 return 0;
2933}
2934_ACEOF
2935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002936if { (ac_try="$ac_compile"
2937case "(($ac_try" in
2938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2939 *) ac_try_echo=$ac_try;;
2940esac
2941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002944 grep -v '^ *+' conftest.er1 >conftest.err
2945 rm -f conftest.er1
2946 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002948 (exit $ac_status); } && {
2949 test -z "$ac_c_werror_flag" ||
2950 test ! -s conftest.err
2951 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002952 ac_compiler_gnu=yes
2953else
2954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002955sed 's/^/| /' conftest.$ac_ext >&5
2956
Martin v. Löwiseba40652007-08-30 20:10:57 +00002957 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002959
2960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002961ac_cv_c_compiler_gnu=$ac_compiler_gnu
2962
2963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002964{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2965echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002966GCC=`test $ac_compiler_gnu = yes && echo yes`
2967ac_test_CFLAGS=${CFLAGS+set}
2968ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002969{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2970echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002971if test "${ac_cv_prog_cc_g+set}" = set; then
2972 echo $ECHO_N "(cached) $ECHO_C" >&6
2973else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002974 ac_save_c_werror_flag=$ac_c_werror_flag
2975 ac_c_werror_flag=yes
2976 ac_cv_prog_cc_g=no
2977 CFLAGS="-g"
2978 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002979/* confdefs.h. */
2980_ACEOF
2981cat confdefs.h >>conftest.$ac_ext
2982cat >>conftest.$ac_ext <<_ACEOF
2983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
Martin v. Löwis11437992002-04-12 09:54:03 +00002985int
2986main ()
2987{
2988
2989 ;
2990 return 0;
2991}
2992_ACEOF
2993rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002994if { (ac_try="$ac_compile"
2995case "(($ac_try" in
2996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2997 *) ac_try_echo=$ac_try;;
2998esac
2999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3000 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003002 grep -v '^ *+' conftest.er1 >conftest.err
3003 rm -f conftest.er1
3004 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003006 (exit $ac_status); } && {
3007 test -z "$ac_c_werror_flag" ||
3008 test ! -s conftest.err
3009 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003010 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003011else
Martin v. Löwis11437992002-04-12 09:54:03 +00003012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003013sed 's/^/| /' conftest.$ac_ext >&5
3014
Martin v. Löwiseba40652007-08-30 20:10:57 +00003015 CFLAGS=""
3016 cat >conftest.$ac_ext <<_ACEOF
3017/* confdefs.h. */
3018_ACEOF
3019cat confdefs.h >>conftest.$ac_ext
3020cat >>conftest.$ac_ext <<_ACEOF
3021/* end confdefs.h. */
3022
3023int
3024main ()
3025{
3026
3027 ;
3028 return 0;
3029}
3030_ACEOF
3031rm -f conftest.$ac_objext
3032if { (ac_try="$ac_compile"
3033case "(($ac_try" in
3034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3035 *) ac_try_echo=$ac_try;;
3036esac
3037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3038 (eval "$ac_compile") 2>conftest.er1
3039 ac_status=$?
3040 grep -v '^ *+' conftest.er1 >conftest.err
3041 rm -f conftest.er1
3042 cat conftest.err >&5
3043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3044 (exit $ac_status); } && {
3045 test -z "$ac_c_werror_flag" ||
3046 test ! -s conftest.err
3047 } && test -s conftest.$ac_objext; then
3048 :
3049else
3050 echo "$as_me: failed program was:" >&5
3051sed 's/^/| /' conftest.$ac_ext >&5
3052
3053 ac_c_werror_flag=$ac_save_c_werror_flag
3054 CFLAGS="-g"
3055 cat >conftest.$ac_ext <<_ACEOF
3056/* confdefs.h. */
3057_ACEOF
3058cat confdefs.h >>conftest.$ac_ext
3059cat >>conftest.$ac_ext <<_ACEOF
3060/* end confdefs.h. */
3061
3062int
3063main ()
3064{
3065
3066 ;
3067 return 0;
3068}
3069_ACEOF
3070rm -f conftest.$ac_objext
3071if { (ac_try="$ac_compile"
3072case "(($ac_try" in
3073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3074 *) ac_try_echo=$ac_try;;
3075esac
3076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3077 (eval "$ac_compile") 2>conftest.er1
3078 ac_status=$?
3079 grep -v '^ *+' conftest.er1 >conftest.err
3080 rm -f conftest.er1
3081 cat conftest.err >&5
3082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3083 (exit $ac_status); } && {
3084 test -z "$ac_c_werror_flag" ||
3085 test ! -s conftest.err
3086 } && test -s conftest.$ac_objext; then
3087 ac_cv_prog_cc_g=yes
3088else
3089 echo "$as_me: failed program was:" >&5
3090sed 's/^/| /' conftest.$ac_ext >&5
3091
3092
Guido van Rossum627b2d71993-12-24 10:39:16 +00003093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003094
3095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003097
3098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3099fi
3100
3101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3102 ac_c_werror_flag=$ac_save_c_werror_flag
3103fi
3104{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3105echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003106if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003107 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003108elif test $ac_cv_prog_cc_g = yes; then
3109 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003110 CFLAGS="-g -O2"
3111 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003112 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003113 fi
3114else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003115 if test "$GCC" = yes; then
3116 CFLAGS="-O2"
3117 else
3118 CFLAGS=
3119 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003121{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3122echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3123if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003124 echo $ECHO_N "(cached) $ECHO_C" >&6
3125else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003126 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003127ac_save_CC=$CC
3128cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003129/* confdefs.h. */
3130_ACEOF
3131cat confdefs.h >>conftest.$ac_ext
3132cat >>conftest.$ac_ext <<_ACEOF
3133/* end confdefs.h. */
3134#include <stdarg.h>
3135#include <stdio.h>
3136#include <sys/types.h>
3137#include <sys/stat.h>
3138/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3139struct buf { int x; };
3140FILE * (*rcsopen) (struct buf *, struct stat *, int);
3141static char *e (p, i)
3142 char **p;
3143 int i;
3144{
3145 return p[i];
3146}
3147static char *f (char * (*g) (char **, int), char **p, ...)
3148{
3149 char *s;
3150 va_list v;
3151 va_start (v,p);
3152 s = g (p, va_arg (v,int));
3153 va_end (v);
3154 return s;
3155}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003156
3157/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3158 function prototypes and stuff, but not '\xHH' hex character constants.
3159 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003160 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003161 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3162 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003163 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003164int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3165
Martin v. Löwiseba40652007-08-30 20:10:57 +00003166/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3167 inside strings and character constants. */
3168#define FOO(x) 'x'
3169int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3170
Skip Montanaro6dead952003-09-25 14:50:04 +00003171int test (int i, double x);
3172struct s1 {int (*f) (int a);};
3173struct s2 {int (*f) (double a);};
3174int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3175int argc;
3176char **argv;
3177int
3178main ()
3179{
3180return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3181 ;
3182 return 0;
3183}
3184_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003185for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3186 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003187do
3188 CC="$ac_save_CC $ac_arg"
3189 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003190if { (ac_try="$ac_compile"
3191case "(($ac_try" in
3192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3193 *) ac_try_echo=$ac_try;;
3194esac
3195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3196 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003198 grep -v '^ *+' conftest.er1 >conftest.err
3199 rm -f conftest.er1
3200 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003202 (exit $ac_status); } && {
3203 test -z "$ac_c_werror_flag" ||
3204 test ! -s conftest.err
3205 } && test -s conftest.$ac_objext; then
3206 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003207else
3208 echo "$as_me: failed program was:" >&5
3209sed 's/^/| /' conftest.$ac_ext >&5
3210
Martin v. Löwiseba40652007-08-30 20:10:57 +00003211
Skip Montanaro6dead952003-09-25 14:50:04 +00003212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003213
3214rm -f core conftest.err conftest.$ac_objext
3215 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003216done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003217rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003218CC=$ac_save_CC
3219
3220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221# AC_CACHE_VAL
3222case "x$ac_cv_prog_cc_c89" in
3223 x)
3224 { echo "$as_me:$LINENO: result: none needed" >&5
3225echo "${ECHO_T}none needed" >&6; } ;;
3226 xno)
3227 { echo "$as_me:$LINENO: result: unsupported" >&5
3228echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003229 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003230 CC="$CC $ac_cv_prog_cc_c89"
3231 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3232echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003233esac
3234
Skip Montanaro6dead952003-09-25 14:50:04 +00003235
Martin v. Löwis11437992002-04-12 09:54:03 +00003236ac_ext=c
3237ac_cpp='$CPP $CPPFLAGS'
3238ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3239ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3240ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003241
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003242
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003243
3244
Martin v. Löwiseba40652007-08-30 20:10:57 +00003245{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3246echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003247
Martin v. Löwiseba40652007-08-30 20:10:57 +00003248# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003249if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003251
3252 case $withval in
3253 no) with_cxx_main=no
3254 MAINCC='$(CC)';;
3255 yes) with_cxx_main=yes
3256 MAINCC='$(CXX)';;
3257 *) with_cxx_main=yes
3258 MAINCC=$withval
3259 if test -z "$CXX"
3260 then
3261 CXX=$withval
3262 fi;;
3263 esac
3264else
3265
3266 with_cxx_main=no
3267 MAINCC='$(CC)'
3268
Martin v. Löwiseba40652007-08-30 20:10:57 +00003269fi
3270
3271{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3272echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003273
3274preset_cxx="$CXX"
3275if test -z "$CXX"
3276then
3277 case "$CC" in
3278 gcc) # Extract the first word of "g++", so it can be a program name with args.
3279set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003280{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3281echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003282if test "${ac_cv_path_CXX+set}" = set; then
3283 echo $ECHO_N "(cached) $ECHO_C" >&6
3284else
3285 case $CXX in
3286 [\\/]* | ?:[\\/]*)
3287 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3288 ;;
3289 *)
3290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3291for as_dir in notfound
3292do
3293 IFS=$as_save_IFS
3294 test -z "$as_dir" && as_dir=.
3295 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003296 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 +00003297 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3298 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3299 break 2
3300 fi
3301done
3302done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003303IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003304
3305 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3306 ;;
3307esac
3308fi
3309CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003310if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003311 { echo "$as_me:$LINENO: result: $CXX" >&5
3312echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003313else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003314 { echo "$as_me:$LINENO: result: no" >&5
3315echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003317
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003318 ;;
3319 cc) # Extract the first word of "c++", so it can be a program name with args.
3320set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003321{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3322echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003323if test "${ac_cv_path_CXX+set}" = set; then
3324 echo $ECHO_N "(cached) $ECHO_C" >&6
3325else
3326 case $CXX in
3327 [\\/]* | ?:[\\/]*)
3328 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3329 ;;
3330 *)
3331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3332for as_dir in notfound
3333do
3334 IFS=$as_save_IFS
3335 test -z "$as_dir" && as_dir=.
3336 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003337 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 +00003338 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3340 break 2
3341 fi
3342done
3343done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003344IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003345
3346 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3347 ;;
3348esac
3349fi
3350CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003351if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003352 { echo "$as_me:$LINENO: result: $CXX" >&5
3353echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003354else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003355 { echo "$as_me:$LINENO: result: no" >&5
3356echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003358
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003359 ;;
3360 esac
3361 if test "$CXX" = "notfound"
3362 then
3363 CXX=""
3364 fi
3365fi
3366if test -z "$CXX"
3367then
3368 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3369do
3370 # Extract the first word of "$ac_prog", so it can be a program name with args.
3371set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003372{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3373echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003374if test "${ac_cv_prog_CXX+set}" = set; then
3375 echo $ECHO_N "(cached) $ECHO_C" >&6
3376else
3377 if test -n "$CXX"; then
3378 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3379else
3380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3381for as_dir in $PATH
3382do
3383 IFS=$as_save_IFS
3384 test -z "$as_dir" && as_dir=.
3385 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003386 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 +00003387 ac_cv_prog_CXX="$ac_prog"
3388 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3389 break 2
3390 fi
3391done
3392done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003393IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003394
3395fi
3396fi
3397CXX=$ac_cv_prog_CXX
3398if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003399 { echo "$as_me:$LINENO: result: $CXX" >&5
3400echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003401else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003402 { echo "$as_me:$LINENO: result: no" >&5
3403echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003404fi
3405
Martin v. Löwiseba40652007-08-30 20:10:57 +00003406
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003407 test -n "$CXX" && break
3408done
3409test -n "$CXX" || CXX="notfound"
3410
3411 if test "$CXX" = "notfound"
3412 then
3413 CXX=""
3414 fi
3415fi
3416if test "$preset_cxx" != "$CXX"
3417then
3418 { echo "$as_me:$LINENO: WARNING:
3419
3420 By default, distutils will build C++ extension modules with \"$CXX\".
3421 If this is not intended, then set CXX on the configure command line.
3422 " >&5
3423echo "$as_me: WARNING:
3424
3425 By default, distutils will build C++ extension modules with \"$CXX\".
3426 If this is not intended, then set CXX on the configure command line.
3427 " >&2;}
3428fi
3429
3430
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003431# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003432
3433ac_ext=c
3434ac_cpp='$CPP $CPPFLAGS'
3435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3437ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003438{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3439echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003440# On Suns, sometimes $CPP names a directory.
3441if test -n "$CPP" && test -d "$CPP"; then
3442 CPP=
3443fi
3444if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003445 if test "${ac_cv_prog_CPP+set}" = set; then
3446 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003447else
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 # Double quotes because CPP needs to be expanded
3449 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3450 do
3451 ac_preproc_ok=false
3452for ac_c_preproc_warn_flag in '' yes
3453do
3454 # Use a header file that comes with gcc, so configuring glibc
3455 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003456 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3457 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003458 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003459 # not just through cpp. "Syntax error" is here to catch this case.
3460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003461/* confdefs.h. */
3462_ACEOF
3463cat confdefs.h >>conftest.$ac_ext
3464cat >>conftest.$ac_ext <<_ACEOF
3465/* end confdefs.h. */
3466#ifdef __STDC__
3467# include <limits.h>
3468#else
3469# include <assert.h>
3470#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003471 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003472_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003473if { (ac_try="$ac_cpp conftest.$ac_ext"
3474case "(($ac_try" in
3475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3476 *) ac_try_echo=$ac_try;;
3477esac
3478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3479 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003480 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003481 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 rm -f conftest.er1
3483 cat conftest.err >&5
3484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485 (exit $ac_status); } >/dev/null && {
3486 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3487 test ! -s conftest.err
3488 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003489 :
3490else
Martin v. Löwis11437992002-04-12 09:54:03 +00003491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003492sed 's/^/| /' conftest.$ac_ext >&5
3493
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 # Broken: fails on valid input.
3495continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003497
Martin v. Löwis11437992002-04-12 09:54:03 +00003498rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003499
Martin v. Löwiseba40652007-08-30 20:10:57 +00003500 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 # can be detected and how.
3502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003503/* confdefs.h. */
3504_ACEOF
3505cat confdefs.h >>conftest.$ac_ext
3506cat >>conftest.$ac_ext <<_ACEOF
3507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003508#include <ac_nonexistent.h>
3509_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003510if { (ac_try="$ac_cpp conftest.$ac_ext"
3511case "(($ac_try" in
3512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3513 *) ac_try_echo=$ac_try;;
3514esac
3515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3516 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003518 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 rm -f conftest.er1
3520 cat conftest.err >&5
3521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522 (exit $ac_status); } >/dev/null && {
3523 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3524 test ! -s conftest.err
3525 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003526 # Broken: success on invalid input.
3527continue
3528else
3529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003530sed 's/^/| /' conftest.$ac_ext >&5
3531
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 # Passes both tests.
3533ac_preproc_ok=:
3534break
3535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003536
Martin v. Löwis11437992002-04-12 09:54:03 +00003537rm -f conftest.err conftest.$ac_ext
3538
3539done
3540# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3541rm -f conftest.err conftest.$ac_ext
3542if $ac_preproc_ok; then
3543 break
3544fi
3545
3546 done
3547 ac_cv_prog_CPP=$CPP
3548
3549fi
3550 CPP=$ac_cv_prog_CPP
3551else
3552 ac_cv_prog_CPP=$CPP
3553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003554{ echo "$as_me:$LINENO: result: $CPP" >&5
3555echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003556ac_preproc_ok=false
3557for ac_c_preproc_warn_flag in '' yes
3558do
3559 # Use a header file that comes with gcc, so configuring glibc
3560 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003561 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3562 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003563 # On the NeXT, cc -E runs the code through the compiler's parser,
3564 # not just through cpp. "Syntax error" is here to catch this case.
3565 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003566/* confdefs.h. */
3567_ACEOF
3568cat confdefs.h >>conftest.$ac_ext
3569cat >>conftest.$ac_ext <<_ACEOF
3570/* end confdefs.h. */
3571#ifdef __STDC__
3572# include <limits.h>
3573#else
3574# include <assert.h>
3575#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003576 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003577_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003578if { (ac_try="$ac_cpp conftest.$ac_ext"
3579case "(($ac_try" in
3580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3581 *) ac_try_echo=$ac_try;;
3582esac
3583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3584 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003586 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 rm -f conftest.er1
3588 cat conftest.err >&5
3589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003590 (exit $ac_status); } >/dev/null && {
3591 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3592 test ! -s conftest.err
3593 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 :
3595else
3596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003597sed 's/^/| /' conftest.$ac_ext >&5
3598
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 # Broken: fails on valid input.
3600continue
3601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003602
Martin v. Löwis11437992002-04-12 09:54:03 +00003603rm -f conftest.err conftest.$ac_ext
3604
Martin v. Löwiseba40652007-08-30 20:10:57 +00003605 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 # can be detected and how.
3607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003608/* confdefs.h. */
3609_ACEOF
3610cat confdefs.h >>conftest.$ac_ext
3611cat >>conftest.$ac_ext <<_ACEOF
3612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003613#include <ac_nonexistent.h>
3614_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615if { (ac_try="$ac_cpp conftest.$ac_ext"
3616case "(($ac_try" in
3617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3618 *) ac_try_echo=$ac_try;;
3619esac
3620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3621 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003623 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 rm -f conftest.er1
3625 cat conftest.err >&5
3626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003627 (exit $ac_status); } >/dev/null && {
3628 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3629 test ! -s conftest.err
3630 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 # Broken: success on invalid input.
3632continue
3633else
3634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003635sed 's/^/| /' conftest.$ac_ext >&5
3636
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 # Passes both tests.
3638ac_preproc_ok=:
3639break
3640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003641
Martin v. Löwis11437992002-04-12 09:54:03 +00003642rm -f conftest.err conftest.$ac_ext
3643
3644done
3645# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3646rm -f conftest.err conftest.$ac_ext
3647if $ac_preproc_ok; then
3648 :
3649else
Skip Montanaro6dead952003-09-25 14:50:04 +00003650 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3651See \`config.log' for more details." >&5
3652echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3653See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003654 { (exit 1); exit 1; }; }
3655fi
3656
3657ac_ext=c
3658ac_cpp='$CPP $CPPFLAGS'
3659ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3660ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3661ac_compiler_gnu=$ac_cv_c_compiler_gnu
3662
3663
Martin v. Löwiseba40652007-08-30 20:10:57 +00003664{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3665echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3666if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003667 echo $ECHO_N "(cached) $ECHO_C" >&6
3668else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003669 # Extract the first word of "grep ggrep" to use in msg output
3670if test -z "$GREP"; then
3671set dummy grep ggrep; ac_prog_name=$2
3672if test "${ac_cv_path_GREP+set}" = set; then
3673 echo $ECHO_N "(cached) $ECHO_C" >&6
3674else
3675 ac_path_GREP_found=false
3676# Loop through the user's path and test for each of PROGNAME-LIST
3677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3678for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3679do
3680 IFS=$as_save_IFS
3681 test -z "$as_dir" && as_dir=.
3682 for ac_prog in grep ggrep; do
3683 for ac_exec_ext in '' $ac_executable_extensions; do
3684 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3685 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3686 # Check for GNU ac_path_GREP and select it if it is found.
3687 # Check for GNU $ac_path_GREP
3688case `"$ac_path_GREP" --version 2>&1` in
3689*GNU*)
3690 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3691*)
3692 ac_count=0
3693 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3694 while :
3695 do
3696 cat "conftest.in" "conftest.in" >"conftest.tmp"
3697 mv "conftest.tmp" "conftest.in"
3698 cp "conftest.in" "conftest.nl"
3699 echo 'GREP' >> "conftest.nl"
3700 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3701 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3702 ac_count=`expr $ac_count + 1`
3703 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3704 # Best one so far, save it but keep looking for a better one
3705 ac_cv_path_GREP="$ac_path_GREP"
3706 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003707 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003708 # 10*(2^10) chars as input seems more than enough
3709 test $ac_count -gt 10 && break
3710 done
3711 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3712esac
3713
3714
3715 $ac_path_GREP_found && break 3
3716 done
3717done
3718
3719done
3720IFS=$as_save_IFS
3721
3722
Skip Montanaro6dead952003-09-25 14:50:04 +00003723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003724
3725GREP="$ac_cv_path_GREP"
3726if test -z "$GREP"; then
3727 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3728echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3729 { (exit 1); exit 1; }; }
3730fi
3731
3732else
3733 ac_cv_path_GREP=$GREP
3734fi
3735
3736
3737fi
3738{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3739echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3740 GREP="$ac_cv_path_GREP"
3741
3742
3743{ echo "$as_me:$LINENO: checking for egrep" >&5
3744echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3745if test "${ac_cv_path_EGREP+set}" = set; then
3746 echo $ECHO_N "(cached) $ECHO_C" >&6
3747else
3748 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3749 then ac_cv_path_EGREP="$GREP -E"
3750 else
3751 # Extract the first word of "egrep" to use in msg output
3752if test -z "$EGREP"; then
3753set dummy egrep; ac_prog_name=$2
3754if test "${ac_cv_path_EGREP+set}" = set; then
3755 echo $ECHO_N "(cached) $ECHO_C" >&6
3756else
3757 ac_path_EGREP_found=false
3758# Loop through the user's path and test for each of PROGNAME-LIST
3759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3760for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3761do
3762 IFS=$as_save_IFS
3763 test -z "$as_dir" && as_dir=.
3764 for ac_prog in egrep; do
3765 for ac_exec_ext in '' $ac_executable_extensions; do
3766 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3767 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3768 # Check for GNU ac_path_EGREP and select it if it is found.
3769 # Check for GNU $ac_path_EGREP
3770case `"$ac_path_EGREP" --version 2>&1` in
3771*GNU*)
3772 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3773*)
3774 ac_count=0
3775 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3776 while :
3777 do
3778 cat "conftest.in" "conftest.in" >"conftest.tmp"
3779 mv "conftest.tmp" "conftest.in"
3780 cp "conftest.in" "conftest.nl"
3781 echo 'EGREP' >> "conftest.nl"
3782 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3783 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3784 ac_count=`expr $ac_count + 1`
3785 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3786 # Best one so far, save it but keep looking for a better one
3787 ac_cv_path_EGREP="$ac_path_EGREP"
3788 ac_path_EGREP_max=$ac_count
3789 fi
3790 # 10*(2^10) chars as input seems more than enough
3791 test $ac_count -gt 10 && break
3792 done
3793 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3794esac
3795
3796
3797 $ac_path_EGREP_found && break 3
3798 done
3799done
3800
3801done
3802IFS=$as_save_IFS
3803
3804
3805fi
3806
3807EGREP="$ac_cv_path_EGREP"
3808if test -z "$EGREP"; then
3809 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3810echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3811 { (exit 1); exit 1; }; }
3812fi
3813
3814else
3815 ac_cv_path_EGREP=$EGREP
3816fi
3817
3818
3819 fi
3820fi
3821{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3822echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3823 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003824
3825
Martin v. Löwis11437992002-04-12 09:54:03 +00003826
Martin v. Löwiseba40652007-08-30 20:10:57 +00003827{ echo "$as_me:$LINENO: checking for AIX" >&5
3828echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003830/* confdefs.h. */
3831_ACEOF
3832cat confdefs.h >>conftest.$ac_ext
3833cat >>conftest.$ac_ext <<_ACEOF
3834/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003835#ifdef _AIX
3836 yes
3837#endif
3838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003841 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003842 { echo "$as_me:$LINENO: result: yes" >&5
3843echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003844cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003845#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003846_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003847
3848else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003849 { echo "$as_me:$LINENO: result: no" >&5
3850echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003851fi
3852rm -f conftest*
3853
Michael W. Hudson54241132001-12-07 15:38:26 +00003854
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003855
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003856# Check for unsupported systems
3857case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003858atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003859 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3860 echo See README for details.
3861 exit 1;;
3862esac
3863
Michael W. Hudson54241132001-12-07 15:38:26 +00003864
Martin v. Löwiseba40652007-08-30 20:10:57 +00003865{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3866echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003867
Martin v. Löwiseba40652007-08-30 20:10:57 +00003868# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003869if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003870 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003871 case $withval in
3872 no) EXEEXT=;;
3873 yes) EXEEXT=.exe;;
3874 *) EXEEXT=$withval;;
3875 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003876fi
3877
3878{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3879echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003880
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003881# Test whether we're running on a non-case-sensitive system, in which
3882# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003883
Martin v. Löwiseba40652007-08-30 20:10:57 +00003884{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3885echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003886if test ! -d CaseSensitiveTestDir; then
3887mkdir CaseSensitiveTestDir
3888fi
3889
3890if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003891then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003892 { echo "$as_me:$LINENO: result: yes" >&5
3893echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003894 BUILDEXEEXT=.exe
3895else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896 { echo "$as_me:$LINENO: result: no" >&5
3897echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003898 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003899fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003900rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003901
Guido van Rossumdd997f71998-10-07 19:58:26 +00003902case $MACHDEP in
3903bsdos*)
3904 case $CC in
3905 gcc) CC="$CC -D_HAVE_BSDI";;
3906 esac;;
3907esac
3908
Guido van Rossum24b1e751997-08-21 02:29:16 +00003909case $ac_sys_system in
3910hp*|HP*)
3911 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003912 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003913 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003914Monterey*)
3915 case $CC in
3916 cc) CC="$CC -Wl,-Bexport";;
3917 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003918SunOS*)
3919 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003920
3921cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003922#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003923_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003924
3925 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003926esac
3927
Michael W. Hudson54241132001-12-07 15:38:26 +00003928
3929
Martin v. Löwiseba40652007-08-30 20:10:57 +00003930{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3931echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003932if test -z "$LIBRARY"
3933then
3934 LIBRARY='libpython$(VERSION).a'
3935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003936{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3937echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003938
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003939# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003940# name of the library into which to insert object files). BLDLIBRARY is also
3941# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3942# is blank as the main program is not linked directly against LDLIBRARY.
3943# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3944# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3945# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3946# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003947#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003948# RUNSHARED is used to run shared python without installed libraries
3949#
3950# INSTSONAME is the name of the shared library that will be use to install
3951# on the system - some systems like version suffix, others don't
3952
3953
Michael W. Hudson54241132001-12-07 15:38:26 +00003954
3955
3956
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003957
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003958LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003959BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003960INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003961DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003962LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003963RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003964
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003965# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003966# If CXX is set, and if it is needed to link a main function that was
3967# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3968# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003969# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003970# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003971
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972{ echo "$as_me:$LINENO: checking LINKCC" >&5
3973echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003974if test -z "$LINKCC"
3975then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003976 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003977 case $ac_sys_system in
3978 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003979 exp_extra="\"\""
3980 if test $ac_sys_release -ge 5 -o \
3981 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3982 exp_extra="."
3983 fi
3984 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003985 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003986 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003987 QNX*)
3988 # qcc must be used because the other compilers do not
3989 # support -N.
3990 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003991 esac
3992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003993{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3994echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003995
Martin v. Löwiseba40652007-08-30 20:10:57 +00003996{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3997echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3998# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003999if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004000 enableval=$enable_shared;
4001fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004002
Martin v. Löwis1142de32002-03-29 16:28:31 +00004003
4004if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00004005then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004006 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004007 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004008 enable_shared="yes";;
4009 *)
4010 enable_shared="no";;
4011 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004013{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4014echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004015
Martin v. Löwiseba40652007-08-30 20:10:57 +00004016{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4017echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4018# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004019if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004020 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004021 CC="$CC -pg"
4022 if test "$cross_compiling" = yes; then
4023 ac_enable_profiling="no"
4024else
4025 cat >conftest.$ac_ext <<_ACEOF
4026/* confdefs.h. */
4027_ACEOF
4028cat confdefs.h >>conftest.$ac_ext
4029cat >>conftest.$ac_ext <<_ACEOF
4030/* end confdefs.h. */
4031int main() { return 0; }
4032_ACEOF
4033rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004034if { (ac_try="$ac_link"
4035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
4039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4040 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004041 ac_status=$?
4042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004044 { (case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
4048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4049 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004050 ac_status=$?
4051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052 (exit $ac_status); }; }; then
4053 ac_enable_profiling="yes"
4054else
4055 echo "$as_me: program exited with status $ac_status" >&5
4056echo "$as_me: failed program was:" >&5
4057sed 's/^/| /' conftest.$ac_ext >&5
4058
4059( exit $ac_status )
4060ac_enable_profiling="no"
4061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004062rm -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 +00004063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004064
4065
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004066 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004067fi
4068
4069{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4070echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004071
4072case "$ac_enable_profiling" in
4073 "yes")
4074 BASECFLAGS="-pg $BASECFLAGS"
4075 LDFLAGS="-pg $LDFLAGS"
4076 ;;
4077esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004078
Martin v. Löwiseba40652007-08-30 20:10:57 +00004079{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4080echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004081
Guido van Rossumb8552162001-09-05 14:58:11 +00004082# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4083# library that we build, but we do not want to link against it (we
4084# will find it with a -framework option). For this reason there is an
4085# extra variable BLDLIBRARY against which Python and the extension
4086# modules are linked, BLDLIBRARY. This is normally the same as
4087# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004088if test "$enable_framework"
4089then
4090 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004091 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004092 BLDLIBRARY=''
4093else
4094 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004095fi
Jack Jansene578a632001-08-15 01:27:14 +00004096
Martin v. Löwis1142de32002-03-29 16:28:31 +00004097# Other platforms follow
4098if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004099
4100cat >>confdefs.h <<\_ACEOF
4101#define Py_ENABLE_SHARED 1
4102_ACEOF
4103
Martin v. Löwis1142de32002-03-29 16:28:31 +00004104 case $ac_sys_system in
4105 BeOS*)
4106 LDLIBRARY='libpython$(VERSION).so'
4107 ;;
4108 CYGWIN*)
4109 LDLIBRARY='libpython$(VERSION).dll.a'
4110 DLLLIBRARY='libpython$(VERSION).dll'
4111 ;;
4112 SunOS*)
4113 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004114 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004115 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004116 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004117 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004118 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004119 LDLIBRARY='libpython$(VERSION).so'
4120 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004121 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004122 case $ac_sys_system in
4123 FreeBSD*)
4124 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4125 ;;
4126 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004127 INSTSONAME="$LDLIBRARY".$SOVERSION
4128 ;;
4129 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004130 case `uname -m` in
4131 ia64)
4132 LDLIBRARY='libpython$(VERSION).so'
4133 ;;
4134 *)
4135 LDLIBRARY='libpython$(VERSION).sl'
4136 ;;
4137 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004138 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004139 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004140 ;;
4141 OSF*)
4142 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004143 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004144 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004145 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004146 atheos*)
4147 LDLIBRARY='libpython$(VERSION).so'
4148 BLDLIBRARY='-L. -lpython$(VERSION)'
4149 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4150 ;;
Ronald Oussoren79f90492009-01-02 10:44:46 +00004151 Darwin*)
4152 LDLIBRARY='libpython$(VERSION).dylib'
4153 BLDLIBRARY='-L. -lpython$(VERSION)'
4154 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4155 ;;
4156
Martin v. Löwis1142de32002-03-29 16:28:31 +00004157 esac
Jason Tishler30765592003-09-04 11:04:06 +00004158else # shared is disabled
4159 case $ac_sys_system in
4160 CYGWIN*)
4161 BLDLIBRARY='$(LIBRARY)'
4162 LDLIBRARY='libpython$(VERSION).dll.a'
4163 ;;
4164 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004165fi
4166
Martin v. Löwiseba40652007-08-30 20:10:57 +00004167{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4168echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004169
Martin v. Löwis11437992002-04-12 09:54:03 +00004170if test -n "$ac_tool_prefix"; then
4171 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4172set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004173{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4174echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004175if test "${ac_cv_prog_RANLIB+set}" = set; then
4176 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177else
4178 if test -n "$RANLIB"; then
4179 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4180else
Martin v. Löwis11437992002-04-12 09:54:03 +00004181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4182for as_dir in $PATH
4183do
4184 IFS=$as_save_IFS
4185 test -z "$as_dir" && as_dir=.
4186 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004187 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 +00004188 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4189 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4190 break 2
4191 fi
4192done
4193done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004194IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004195
Guido van Rossum627b2d71993-12-24 10:39:16 +00004196fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004198RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004200 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4201echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004202else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004203 { echo "$as_me:$LINENO: result: no" >&5
4204echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004205fi
4206
Martin v. Löwiseba40652007-08-30 20:10:57 +00004207
Martin v. Löwis11437992002-04-12 09:54:03 +00004208fi
4209if test -z "$ac_cv_prog_RANLIB"; then
4210 ac_ct_RANLIB=$RANLIB
4211 # Extract the first word of "ranlib", so it can be a program name with args.
4212set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004213{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4214echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004215if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4216 echo $ECHO_N "(cached) $ECHO_C" >&6
4217else
4218 if test -n "$ac_ct_RANLIB"; then
4219 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4220else
4221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4222for as_dir in $PATH
4223do
4224 IFS=$as_save_IFS
4225 test -z "$as_dir" && as_dir=.
4226 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227 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 +00004228 ac_cv_prog_ac_ct_RANLIB="ranlib"
4229 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4230 break 2
4231 fi
4232done
4233done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004234IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004235
Martin v. Löwis11437992002-04-12 09:54:03 +00004236fi
4237fi
4238ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4239if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004240 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4241echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004242else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004243 { echo "$as_me:$LINENO: result: no" >&5
4244echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004245fi
4246
Martin v. Löwiseba40652007-08-30 20:10:57 +00004247 if test "x$ac_ct_RANLIB" = x; then
4248 RANLIB=":"
4249 else
4250 case $cross_compiling:$ac_tool_warned in
4251yes:)
4252{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4253whose name does not start with the host triplet. If you think this
4254configuration is useful to you, please write to autoconf@gnu.org." >&5
4255echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4256whose name does not start with the host triplet. If you think this
4257configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4258ac_tool_warned=yes ;;
4259esac
4260 RANLIB=$ac_ct_RANLIB
4261 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004262else
4263 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004265
4266
Guido van Rossum7f43da71994-08-01 12:15:30 +00004267for ac_prog in ar aal
4268do
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004271{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4272echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004273if test "${ac_cv_prog_AR+set}" = set; then
4274 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275else
4276 if test -n "$AR"; then
4277 ac_cv_prog_AR="$AR" # Let the user override the test.
4278else
Martin v. Löwis11437992002-04-12 09:54:03 +00004279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4280for as_dir in $PATH
4281do
4282 IFS=$as_save_IFS
4283 test -z "$as_dir" && as_dir=.
4284 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004285 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 +00004286 ac_cv_prog_AR="$ac_prog"
4287 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4288 break 2
4289 fi
4290done
4291done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004292IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004293
Guido van Rossum7f43da71994-08-01 12:15:30 +00004294fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004296AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004297if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004298 { echo "$as_me:$LINENO: result: $AR" >&5
4299echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004300else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004301 { echo "$as_me:$LINENO: result: no" >&5
4302echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004303fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004304
Martin v. Löwiseba40652007-08-30 20:10:57 +00004305
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004307done
4308test -n "$AR" || AR="ar"
4309
Michael W. Hudson54241132001-12-07 15:38:26 +00004310
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004311
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004312# Extract the first word of "svnversion", so it can be a program name with args.
4313set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004314{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4315echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004316if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4317 echo $ECHO_N "(cached) $ECHO_C" >&6
4318else
4319 if test -n "$SVNVERSION"; then
4320 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4321else
4322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4323for as_dir in $PATH
4324do
4325 IFS=$as_save_IFS
4326 test -z "$as_dir" && as_dir=.
4327 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004328 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004329 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004330 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4331 break 2
4332 fi
4333done
4334done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004336
Martin v. Löwisff600232006-04-03 19:12:32 +00004337 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004338fi
4339fi
4340SVNVERSION=$ac_cv_prog_SVNVERSION
4341if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004342 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4343echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004344else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004345 { echo "$as_me:$LINENO: result: no" >&5
4346echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004347fi
4348
Martin v. Löwiseba40652007-08-30 20:10:57 +00004349
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004350if test $SVNVERSION = found
4351then
4352 SVNVERSION="svnversion \$(srcdir)"
4353else
4354 SVNVERSION="echo exported"
4355fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004356
Neil Schemenauera42c8272001-03-31 00:01:55 +00004357case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004358bsdos*|hp*|HP*)
4359 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004360 if test -z "$INSTALL"
4361 then
4362 INSTALL="${srcdir}/install-sh -c"
4363 fi
4364esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004365ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004366for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4367 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004368 ac_aux_dir=$ac_dir
4369 ac_install_sh="$ac_aux_dir/install-sh -c"
4370 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004371 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004372 ac_aux_dir=$ac_dir
4373 ac_install_sh="$ac_aux_dir/install.sh -c"
4374 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004375 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004376 ac_aux_dir=$ac_dir
4377 ac_install_sh="$ac_aux_dir/shtool install -c"
4378 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004379 fi
4380done
4381if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004382 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4383echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004384 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386
4387# These three variables are undocumented and unsupported,
4388# and are intended to be withdrawn in a future Autoconf release.
4389# They can cause serious problems if a builder's source tree is in a directory
4390# whose full name contains unusual characters.
4391ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4392ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4393ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4394
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004395
4396# Find a good install program. We prefer a C program (faster),
4397# so one script is as good as another. But avoid the broken or
4398# incompatible versions:
4399# SysV /etc/install, /usr/sbin/install
4400# SunOS /usr/etc/install
4401# IRIX /sbin/install
4402# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004403# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004404# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4405# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4406# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004407# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004408# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004409{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4410echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004411if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004412if test "${ac_cv_path_install+set}" = set; then
4413 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004414else
Martin v. Löwis11437992002-04-12 09:54:03 +00004415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4416for as_dir in $PATH
4417do
4418 IFS=$as_save_IFS
4419 test -z "$as_dir" && as_dir=.
4420 # Account for people who put trailing slashes in PATH elements.
4421case $as_dir/ in
4422 ./ | .// | /cC/* | \
4423 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004424 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004425 /usr/ucb/* ) ;;
4426 *)
4427 # OSF1 and SCO ODT 3.0 have their own names for install.
4428 # Don't use installbsd from OSF since it installs stuff as root
4429 # by default.
4430 for ac_prog in ginstall scoinst install; do
4431 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004432 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 +00004433 if test $ac_prog = install &&
4434 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4435 # AIX install. It has an incompatible calling convention.
4436 :
4437 elif test $ac_prog = install &&
4438 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4439 # program-specific install script used by HP pwplus--don't use.
4440 :
4441 else
4442 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4443 break 3
4444 fi
4445 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004446 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004447 done
4448 ;;
4449esac
4450done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004451IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004452
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004453
4454fi
4455 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004456 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004457 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004458 # As a last resort, use the slow shell script. Don't cache a
4459 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004460 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004461 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004462 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004463 fi
4464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004465{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4466echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004467
4468# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4469# It thinks the first close brace ends the variable substitution.
4470test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4471
Martin v. Löwis11437992002-04-12 09:54:03 +00004472test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004473
4474test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4475
Michael W. Hudson54241132001-12-07 15:38:26 +00004476
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004477# Not every filesystem supports hard links
4478
4479if test -z "$LN" ; then
4480 case $ac_sys_system in
4481 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004482 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004483 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004484 *) LN=ln;;
4485 esac
4486fi
4487
Fred Drake109d9862001-07-11 06:27:56 +00004488# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004489{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4490echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004491
Martin v. Löwiseba40652007-08-30 20:10:57 +00004492# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004493if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004494 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004495if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004496then
4497
4498cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004499#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004500_ACEOF
4501
Martin v. Löwiseba40652007-08-30 20:10:57 +00004502 { echo "$as_me:$LINENO: result: yes" >&5
4503echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004504 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004505else { echo "$as_me:$LINENO: result: no" >&5
4506echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004507fi
4508else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004509 { echo "$as_me:$LINENO: result: no" >&5
4510echo "${ECHO_T}no" >&6; }
4511fi
4512
Fred Drake109d9862001-07-11 06:27:56 +00004513
Skip Montanarodecc6a42003-01-01 20:07:49 +00004514# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4515# merged with this chunk of code?
4516
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004517# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004518# ------------------------
4519# (The following bit of code is complicated enough - please keep things
4520# indented properly. Just pretend you're editing Python code. ;-)
4521
4522# There are two parallel sets of case statements below, one that checks to
4523# see if OPT was set and one that does BASECFLAGS setting based upon
4524# compiler and platform. BASECFLAGS tweaks need to be made even if the
4525# user set OPT.
4526
4527# tweak OPT based on compiler and platform, only if the user didn't set
4528# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004529
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004530if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004531then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004532 case $GCC in
4533 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004534 if test "$CC" != 'g++' ; then
4535 STRICT_PROTO="-Wstrict-prototypes"
4536 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004537 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4538 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4539 WRAP="-fwrapv"
4540 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004541 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004542 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004543 if test "$Py_DEBUG" = 'true' ; then
4544 # Optimization messes up debuggers, so turn it off for
4545 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004546 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004547 else
Thomas Hellere5529592007-12-13 21:20:29 +00004548 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004549 fi
4550 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004551 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004552 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004553 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004554 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004555 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004556 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4557 ;;
4558 esac
Fred Drake109d9862001-07-11 06:27:56 +00004559 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004560
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004561 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004562 OPT="-O"
4563 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004564 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004565
4566 # The current (beta) Monterey compiler dies with optimizations
4567 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004568 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004569 Monterey*)
4570 OPT=""
4571 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004572 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004573
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004574fi
4575
Skip Montanarodecc6a42003-01-01 20:07:49 +00004576
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004577
4578# The -arch flags for universal builds on OSX
4579UNIVERSAL_ARCH_FLAGS=
4580
4581
Skip Montanarodecc6a42003-01-01 20:07:49 +00004582# tweak BASECFLAGS based on compiler and platform
4583case $GCC in
4584yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004585 # Python violates C99 rules, by casting between incompatible
4586 # pointer types. GCC may generate bad code as a result of that,
4587 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004588 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4589echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004590 ac_save_cc="$CC"
4591 CC="$CC -fno-strict-aliasing"
4592 if test "$cross_compiling" = yes; then
4593 ac_cv_no_strict_aliasing_ok=no
4594else
4595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004596/* confdefs.h. */
4597_ACEOF
4598cat confdefs.h >>conftest.$ac_ext
4599cat >>conftest.$ac_ext <<_ACEOF
4600/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004601int main() { return 0; }
4602_ACEOF
4603rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004604if { (ac_try="$ac_link"
4605case "(($ac_try" in
4606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4607 *) ac_try_echo=$ac_try;;
4608esac
4609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4610 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004611 ac_status=$?
4612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4613 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004614 { (case "(($ac_try" in
4615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4616 *) ac_try_echo=$ac_try;;
4617esac
4618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4619 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004620 ac_status=$?
4621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4622 (exit $ac_status); }; }; then
4623 ac_cv_no_strict_aliasing_ok=yes
4624else
4625 echo "$as_me: program exited with status $ac_status" >&5
4626echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004627sed 's/^/| /' conftest.$ac_ext >&5
4628
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004629( exit $ac_status )
4630ac_cv_no_strict_aliasing_ok=no
4631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004632rm -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 +00004633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004634
4635
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004636 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004637 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4638echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004639 if test $ac_cv_no_strict_aliasing_ok = yes
4640 then
4641 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4642 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004643
4644 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4645 # support. Without this, treatment of subnormals doesn't follow
4646 # the standard.
4647 case $ac_sys_machine in
4648 alpha*)
4649 BASECFLAGS="$BASECFLAGS -mieee"
4650 ;;
4651 esac
4652
Skip Montanarodecc6a42003-01-01 20:07:49 +00004653 case $ac_sys_system in
4654 SCO_SV*)
4655 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4656 ;;
4657 # is there any other compiler on Darwin besides gcc?
4658 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004659 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4660 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00004661
4662
Ronald Oussoren988117f2006-04-29 11:31:35 +00004663 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004664 UNIVERSAL_ARCH_FLAGS=""
4665 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4666 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004667 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004668
4669 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4670 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4671
4672 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4673 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorena4cb4722008-08-12 12:29:13 +00004674 ARCH_RUN_32BIT="arch -i386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004675
4676 else
4677 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4678echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4679 { (exit 1); exit 1; }; }
4680
4681 fi
4682
4683
4684 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren5a849d42008-07-22 07:06:00 +00004685 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Benjamin Peterson4347c442008-07-17 15:59:24 +00004686 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4687 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4688 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00004689 fi
4690
Benjamin Peterson4347c442008-07-17 15:59:24 +00004691 # Calculate the right deployment target for this build.
4692 #
4693 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4694 if test ${cur_target} '>' 10.2; then
4695 cur_target=10.3
4696 fi
4697 if test "${UNIVERSAL_ARCHS}" = "all"; then
4698 # Ensure that the default platform for a 4-way
4699 # universal build is OSX 10.5, that's the first
4700 # OS release where 4-way builds make sense.
4701 cur_target='10.5'
4702 fi
4703 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4704
4705 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4706 # environment with a value that is the same as what we'll use
4707 # in the Makefile to ensure that we'll get the same compiler
4708 # environment during configure and build time.
4709 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4710 export MACOSX_DEPLOYMENT_TARGET
4711 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4712
Skip Montanarodecc6a42003-01-01 20:07:49 +00004713 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004714 OSF*)
4715 BASECFLAGS="$BASECFLAGS -mieee"
4716 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004717 esac
4718 ;;
4719
4720*)
4721 case $ac_sys_system in
4722 OpenUNIX*|UnixWare*)
4723 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4724 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004725 OSF*)
4726 BASECFLAGS="$BASECFLAGS -ieee -std"
4727 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004728 SCO_SV*)
4729 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4730 ;;
4731 esac
4732 ;;
4733esac
4734
Fred Drakee1ceaa02001-12-04 20:55:47 +00004735if test "$Py_DEBUG" = 'true'; then
4736 :
4737else
4738 OPT="-DNDEBUG $OPT"
4739fi
4740
Guido van Rossum563e7081996-09-10 18:20:48 +00004741if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004742then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004743 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004744fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004745
Neal Norwitz020c46a2006-01-07 21:39:28 +00004746# disable check for icc since it seems to pass, but generates a warning
4747if test "$CC" = icc
4748then
4749 ac_cv_opt_olimit_ok=no
4750fi
4751
Martin v. Löwiseba40652007-08-30 20:10:57 +00004752{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4753echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004754if test "${ac_cv_opt_olimit_ok+set}" = set; then
4755 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004756else
4757 ac_save_cc="$CC"
4758CC="$CC -OPT:Olimit=0"
4759if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004760 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004761else
Martin v. Löwis11437992002-04-12 09:54:03 +00004762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004763/* confdefs.h. */
4764_ACEOF
4765cat confdefs.h >>conftest.$ac_ext
4766cat >>conftest.$ac_ext <<_ACEOF
4767/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004768int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004769_ACEOF
4770rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004771if { (ac_try="$ac_link"
4772case "(($ac_try" in
4773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4774 *) ac_try_echo=$ac_try;;
4775esac
4776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4777 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004778 ac_status=$?
4779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4780 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004781 { (case "(($ac_try" in
4782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4783 *) ac_try_echo=$ac_try;;
4784esac
4785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4786 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004787 ac_status=$?
4788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4789 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004790 ac_cv_opt_olimit_ok=yes
4791else
Martin v. Löwis11437992002-04-12 09:54:03 +00004792 echo "$as_me: program exited with status $ac_status" >&5
4793echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004794sed 's/^/| /' conftest.$ac_ext >&5
4795
Martin v. Löwis11437992002-04-12 09:54:03 +00004796( exit $ac_status )
4797ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004799rm -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 +00004800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004801
4802
Guido van Rossum91922671997-10-09 20:24:13 +00004803CC="$ac_save_cc"
4804fi
4805
Martin v. Löwiseba40652007-08-30 20:10:57 +00004806{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4807echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004808if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004809 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004810 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4811 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4812 # environment?
4813 Darwin*)
4814 ;;
4815 *)
4816 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4817 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004818 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004819else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004820 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4821echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004822 if test "${ac_cv_olimit_ok+set}" = set; then
4823 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004824else
4825 ac_save_cc="$CC"
4826 CC="$CC -Olimit 1500"
4827 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004828 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004829else
Martin v. Löwis11437992002-04-12 09:54:03 +00004830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004831/* confdefs.h. */
4832_ACEOF
4833cat confdefs.h >>conftest.$ac_ext
4834cat >>conftest.$ac_ext <<_ACEOF
4835/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004836int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004837_ACEOF
4838rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004839if { (ac_try="$ac_link"
4840case "(($ac_try" in
4841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4842 *) ac_try_echo=$ac_try;;
4843esac
4844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4845 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004846 ac_status=$?
4847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4848 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004849 { (case "(($ac_try" in
4850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4851 *) ac_try_echo=$ac_try;;
4852esac
4853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4854 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004855 ac_status=$?
4856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4857 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004858 ac_cv_olimit_ok=yes
4859else
Martin v. Löwis11437992002-04-12 09:54:03 +00004860 echo "$as_me: program exited with status $ac_status" >&5
4861echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004862sed 's/^/| /' conftest.$ac_ext >&5
4863
Martin v. Löwis11437992002-04-12 09:54:03 +00004864( exit $ac_status )
4865ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004867rm -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 +00004868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004869
4870
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004871 CC="$ac_save_cc"
4872fi
4873
Martin v. Löwiseba40652007-08-30 20:10:57 +00004874 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4875echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004876 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004877 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004878 fi
4879fi
4880
Martin v. Löwisaac13162006-10-19 10:58:46 +00004881# Check whether GCC supports PyArg_ParseTuple format
4882if test "$GCC" = "yes"
4883then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004884 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4885echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004886 save_CFLAGS=$CFLAGS
4887 CFLAGS="$CFLAGS -Werror"
4888 cat >conftest.$ac_ext <<_ACEOF
4889/* confdefs.h. */
4890_ACEOF
4891cat confdefs.h >>conftest.$ac_ext
4892cat >>conftest.$ac_ext <<_ACEOF
4893/* end confdefs.h. */
4894
4895 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4896
4897int
4898main ()
4899{
4900
4901 ;
4902 return 0;
4903}
4904_ACEOF
4905rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004906if { (ac_try="$ac_compile"
4907case "(($ac_try" in
4908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4909 *) ac_try_echo=$ac_try;;
4910esac
4911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004913 ac_status=$?
4914 grep -v '^ *+' conftest.er1 >conftest.err
4915 rm -f conftest.er1
4916 cat conftest.err >&5
4917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004918 (exit $ac_status); } && {
4919 test -z "$ac_c_werror_flag" ||
4920 test ! -s conftest.err
4921 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004922
4923cat >>confdefs.h <<\_ACEOF
4924#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4925_ACEOF
4926
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927 { echo "$as_me:$LINENO: result: yes" >&5
4928echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004929else
4930 echo "$as_me: failed program was:" >&5
4931sed 's/^/| /' conftest.$ac_ext >&5
4932
Martin v. Löwiseba40652007-08-30 20:10:57 +00004933 { echo "$as_me:$LINENO: result: no" >&5
4934echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004935
4936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004937
4938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004939 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004940fi
4941
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004942# On some compilers, pthreads are available without further options
4943# (e.g. MacOS X). On some of these systems, the compiler will not
4944# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4945# So we have to see first whether pthreads are available without
4946# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004947{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4948echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004949if test "${ac_cv_pthread_is_default+set}" = set; then
4950 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004951else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004952 if test "$cross_compiling" = yes; then
4953 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004954else
Martin v. Löwis11437992002-04-12 09:54:03 +00004955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004956/* confdefs.h. */
4957_ACEOF
4958cat confdefs.h >>conftest.$ac_ext
4959cat >>conftest.$ac_ext <<_ACEOF
4960/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004961
Martin v. Löwis130fb172001-07-19 11:00:41 +00004962#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004963
4964void* routine(void* p){return NULL;}
4965
4966int main(){
4967 pthread_t p;
4968 if(pthread_create(&p,NULL,routine,NULL)!=0)
4969 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004970 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004971 return 0;
4972}
4973
Martin v. Löwis11437992002-04-12 09:54:03 +00004974_ACEOF
4975rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004976if { (ac_try="$ac_link"
4977case "(($ac_try" in
4978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4979 *) ac_try_echo=$ac_try;;
4980esac
4981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4982 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004983 ac_status=$?
4984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004986 { (case "(($ac_try" in
4987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4988 *) ac_try_echo=$ac_try;;
4989esac
4990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4991 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 ac_status=$?
4993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4994 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004995
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004996 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004997 ac_cv_kthread=no
4998 ac_cv_pthread=no
4999
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005000else
Martin v. Löwis11437992002-04-12 09:54:03 +00005001 echo "$as_me: program exited with status $ac_status" >&5
5002echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005003sed 's/^/| /' conftest.$ac_ext >&5
5004
Martin v. Löwis11437992002-04-12 09:54:03 +00005005( exit $ac_status )
5006ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005008rm -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 +00005009fi
5010
Martin v. Löwiseba40652007-08-30 20:10:57 +00005011
5012
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005013fi
5014
Martin v. Löwiseba40652007-08-30 20:10:57 +00005015{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5016echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005017
Michael W. Hudson54241132001-12-07 15:38:26 +00005018
Martin v. Löwis11437992002-04-12 09:54:03 +00005019if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005020then
5021 ac_cv_kpthread=no
5022else
5023# -Kpthread, if available, provides the right #defines
5024# and linker options to make pthread_create available
5025# Some compilers won't report that they do not support -Kpthread,
5026# so we need to run a program to see whether it really made the
5027# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005028{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5029echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005030if test "${ac_cv_kpthread+set}" = set; then
5031 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005032else
5033 ac_save_cc="$CC"
5034CC="$CC -Kpthread"
5035if test "$cross_compiling" = yes; then
5036 ac_cv_kpthread=no
5037else
Martin v. Löwis11437992002-04-12 09:54:03 +00005038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005039/* confdefs.h. */
5040_ACEOF
5041cat confdefs.h >>conftest.$ac_ext
5042cat >>conftest.$ac_ext <<_ACEOF
5043/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005044
5045#include <pthread.h>
5046
5047void* routine(void* p){return NULL;}
5048
5049int main(){
5050 pthread_t p;
5051 if(pthread_create(&p,NULL,routine,NULL)!=0)
5052 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005053 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005054 return 0;
5055}
5056
Martin v. Löwis11437992002-04-12 09:54:03 +00005057_ACEOF
5058rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005059if { (ac_try="$ac_link"
5060case "(($ac_try" in
5061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5062 *) ac_try_echo=$ac_try;;
5063esac
5064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5065 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005066 ac_status=$?
5067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005069 { (case "(($ac_try" in
5070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5071 *) ac_try_echo=$ac_try;;
5072esac
5073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5074 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005075 ac_status=$?
5076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5077 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005078 ac_cv_kpthread=yes
5079else
Martin v. Löwis11437992002-04-12 09:54:03 +00005080 echo "$as_me: program exited with status $ac_status" >&5
5081echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005082sed 's/^/| /' conftest.$ac_ext >&5
5083
Martin v. Löwis11437992002-04-12 09:54:03 +00005084( exit $ac_status )
5085ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005087rm -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 +00005088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005089
5090
Martin v. Löwis130fb172001-07-19 11:00:41 +00005091CC="$ac_save_cc"
5092fi
5093
Martin v. Löwiseba40652007-08-30 20:10:57 +00005094{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5095echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005096fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005097
Skip Montanarod8d39a02003-07-10 20:44:10 +00005098if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005099then
5100# -Kthread, if available, provides the right #defines
5101# and linker options to make pthread_create available
5102# Some compilers won't report that they do not support -Kthread,
5103# so we need to run a program to see whether it really made the
5104# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005105{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5106echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005107if test "${ac_cv_kthread+set}" = set; then
5108 echo $ECHO_N "(cached) $ECHO_C" >&6
5109else
5110 ac_save_cc="$CC"
5111CC="$CC -Kthread"
5112if test "$cross_compiling" = yes; then
5113 ac_cv_kthread=no
5114else
5115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005116/* confdefs.h. */
5117_ACEOF
5118cat confdefs.h >>conftest.$ac_ext
5119cat >>conftest.$ac_ext <<_ACEOF
5120/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005121
5122#include <pthread.h>
5123
5124void* routine(void* p){return NULL;}
5125
5126int main(){
5127 pthread_t p;
5128 if(pthread_create(&p,NULL,routine,NULL)!=0)
5129 return 1;
5130 (void)pthread_detach(p);
5131 return 0;
5132}
5133
5134_ACEOF
5135rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005136if { (ac_try="$ac_link"
5137case "(($ac_try" in
5138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5139 *) ac_try_echo=$ac_try;;
5140esac
5141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5142 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005143 ac_status=$?
5144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5145 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005146 { (case "(($ac_try" in
5147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5148 *) ac_try_echo=$ac_try;;
5149esac
5150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5151 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005152 ac_status=$?
5153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5154 (exit $ac_status); }; }; then
5155 ac_cv_kthread=yes
5156else
5157 echo "$as_me: program exited with status $ac_status" >&5
5158echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005159sed 's/^/| /' conftest.$ac_ext >&5
5160
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005161( exit $ac_status )
5162ac_cv_kthread=no
5163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005164rm -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 +00005165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005166
5167
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005168CC="$ac_save_cc"
5169fi
5170
Martin v. Löwiseba40652007-08-30 20:10:57 +00005171{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5172echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005173fi
5174
Skip Montanarod8d39a02003-07-10 20:44:10 +00005175if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005176then
5177# -pthread, if available, provides the right #defines
5178# and linker options to make pthread_create available
5179# Some compilers won't report that they do not support -pthread,
5180# so we need to run a program to see whether it really made the
5181# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005182{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5183echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005184if test "${ac_cv_thread+set}" = set; then
5185 echo $ECHO_N "(cached) $ECHO_C" >&6
5186else
5187 ac_save_cc="$CC"
5188CC="$CC -pthread"
5189if test "$cross_compiling" = yes; then
5190 ac_cv_pthread=no
5191else
5192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005193/* confdefs.h. */
5194_ACEOF
5195cat confdefs.h >>conftest.$ac_ext
5196cat >>conftest.$ac_ext <<_ACEOF
5197/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005198
5199#include <pthread.h>
5200
5201void* routine(void* p){return NULL;}
5202
5203int main(){
5204 pthread_t p;
5205 if(pthread_create(&p,NULL,routine,NULL)!=0)
5206 return 1;
5207 (void)pthread_detach(p);
5208 return 0;
5209}
5210
5211_ACEOF
5212rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005213if { (ac_try="$ac_link"
5214case "(($ac_try" in
5215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5216 *) ac_try_echo=$ac_try;;
5217esac
5218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5219 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005220 ac_status=$?
5221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005223 { (case "(($ac_try" in
5224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5225 *) ac_try_echo=$ac_try;;
5226esac
5227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5228 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005229 ac_status=$?
5230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5231 (exit $ac_status); }; }; then
5232 ac_cv_pthread=yes
5233else
5234 echo "$as_me: program exited with status $ac_status" >&5
5235echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005236sed 's/^/| /' conftest.$ac_ext >&5
5237
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005238( exit $ac_status )
5239ac_cv_pthread=no
5240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005241rm -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 +00005242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005243
5244
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005245CC="$ac_save_cc"
5246fi
5247
Martin v. Löwiseba40652007-08-30 20:10:57 +00005248{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5249echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005250fi
5251
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005252# If we have set a CC compiler flag for thread support then
5253# check if it works for CXX, too.
5254ac_cv_cxx_thread=no
5255if test ! -z "$CXX"
5256then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005257{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5258echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005259ac_save_cxx="$CXX"
5260
5261if test "$ac_cv_kpthread" = "yes"
5262then
5263 CXX="$CXX -Kpthread"
5264 ac_cv_cxx_thread=yes
5265elif test "$ac_cv_kthread" = "yes"
5266then
5267 CXX="$CXX -Kthread"
5268 ac_cv_cxx_thread=yes
5269elif test "$ac_cv_pthread" = "yes"
5270then
5271 CXX="$CXX -pthread"
5272 ac_cv_cxx_thread=yes
5273fi
5274
5275if test $ac_cv_cxx_thread = yes
5276then
5277 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5278 $CXX -c conftest.$ac_ext 2>&5
5279 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5280 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5281 then
5282 ac_cv_cxx_thread=yes
5283 else
5284 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005285 fi
5286 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005288{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5289echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005290fi
5291CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005292
Michael W. Hudson54241132001-12-07 15:38:26 +00005293
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005294# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005295{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5296echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005297if test "${ac_cv_header_stdc+set}" = set; then
5298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005299else
Martin v. Löwis11437992002-04-12 09:54:03 +00005300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005301/* confdefs.h. */
5302_ACEOF
5303cat confdefs.h >>conftest.$ac_ext
5304cat >>conftest.$ac_ext <<_ACEOF
5305/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005306#include <stdlib.h>
5307#include <stdarg.h>
5308#include <string.h>
5309#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005310
Skip Montanaro6dead952003-09-25 14:50:04 +00005311int
5312main ()
5313{
5314
5315 ;
5316 return 0;
5317}
Martin v. Löwis11437992002-04-12 09:54:03 +00005318_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005320if { (ac_try="$ac_compile"
5321case "(($ac_try" in
5322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5323 *) ac_try_echo=$ac_try;;
5324esac
5325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005328 grep -v '^ *+' conftest.er1 >conftest.err
5329 rm -f conftest.er1
5330 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005332 (exit $ac_status); } && {
5333 test -z "$ac_c_werror_flag" ||
5334 test ! -s conftest.err
5335 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005336 ac_cv_header_stdc=yes
5337else
Martin v. Löwis11437992002-04-12 09:54:03 +00005338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005339sed 's/^/| /' conftest.$ac_ext >&5
5340
Martin v. Löwiseba40652007-08-30 20:10:57 +00005341 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005343
5344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005345
5346if test $ac_cv_header_stdc = yes; then
5347 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005354#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005355
5356_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005358 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005359 :
5360else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005361 ac_cv_header_stdc=no
5362fi
5363rm -f conftest*
5364
5365fi
5366
5367if test $ac_cv_header_stdc = yes; then
5368 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005370/* confdefs.h. */
5371_ACEOF
5372cat confdefs.h >>conftest.$ac_ext
5373cat >>conftest.$ac_ext <<_ACEOF
5374/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005375#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005376
5377_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005379 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005380 :
5381else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005382 ac_cv_header_stdc=no
5383fi
5384rm -f conftest*
5385
5386fi
5387
5388if test $ac_cv_header_stdc = yes; then
5389 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005390 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005391 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005392else
Martin v. Löwis11437992002-04-12 09:54:03 +00005393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005394/* confdefs.h. */
5395_ACEOF
5396cat confdefs.h >>conftest.$ac_ext
5397cat >>conftest.$ac_ext <<_ACEOF
5398/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005399#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005400#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005401#if ((' ' & 0x0FF) == 0x020)
5402# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5403# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5404#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005405# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005406 (('a' <= (c) && (c) <= 'i') \
5407 || ('j' <= (c) && (c) <= 'r') \
5408 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005409# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5410#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005411
Martin v. Löwis11437992002-04-12 09:54:03 +00005412#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5413int
5414main ()
5415{
5416 int i;
5417 for (i = 0; i < 256; i++)
5418 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005419 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005420 return 2;
5421 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005422}
5423_ACEOF
5424rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005425if { (ac_try="$ac_link"
5426case "(($ac_try" in
5427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5428 *) ac_try_echo=$ac_try;;
5429esac
5430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5431 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005432 ac_status=$?
5433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005435 { (case "(($ac_try" in
5436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5437 *) ac_try_echo=$ac_try;;
5438esac
5439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5440 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005441 ac_status=$?
5442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5443 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005444 :
5445else
Martin v. Löwis11437992002-04-12 09:54:03 +00005446 echo "$as_me: program exited with status $ac_status" >&5
5447echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005448sed 's/^/| /' conftest.$ac_ext >&5
5449
Martin v. Löwis11437992002-04-12 09:54:03 +00005450( exit $ac_status )
5451ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5454fi
5455
5456
Michael W. Hudson54241132001-12-07 15:38:26 +00005457fi
5458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005459{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5460echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005461if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005462
5463cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005464#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005465_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005466
5467fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005468
Skip Montanarob9820a32004-01-17 00:16:12 +00005469# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005480 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005481do
5482as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005483{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5484echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5485if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005486 echo $ECHO_N "(cached) $ECHO_C" >&6
5487else
5488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005489/* confdefs.h. */
5490_ACEOF
5491cat confdefs.h >>conftest.$ac_ext
5492cat >>conftest.$ac_ext <<_ACEOF
5493/* end confdefs.h. */
5494$ac_includes_default
5495
5496#include <$ac_header>
5497_ACEOF
5498rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005499if { (ac_try="$ac_compile"
5500case "(($ac_try" in
5501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5502 *) ac_try_echo=$ac_try;;
5503esac
5504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5505 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005507 grep -v '^ *+' conftest.er1 >conftest.err
5508 rm -f conftest.er1
5509 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005511 (exit $ac_status); } && {
5512 test -z "$ac_c_werror_flag" ||
5513 test ! -s conftest.err
5514 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005515 eval "$as_ac_Header=yes"
5516else
5517 echo "$as_me: failed program was:" >&5
5518sed 's/^/| /' conftest.$ac_ext >&5
5519
Martin v. Löwiseba40652007-08-30 20:10:57 +00005520 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005522
5523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005525ac_res=`eval echo '${'$as_ac_Header'}'`
5526 { echo "$as_me:$LINENO: result: $ac_res" >&5
5527echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005528if test `eval echo '${'$as_ac_Header'}'` = yes; then
5529 cat >>confdefs.h <<_ACEOF
5530#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5531_ACEOF
5532
5533fi
5534
5535done
5536
5537
Martin v. Löwis11437992002-04-12 09:54:03 +00005538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
Anthony Baxter8a560de2004-10-13 15:30:56 +00005574
Martin v. Löwisc3001752005-01-23 09:27:24 +00005575
Martin v. Löwis11017b12006-01-14 18:12:57 +00005576
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005577
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005578
5579
5580
5581
5582
5583
5584
5585
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005586
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005587
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005588
5589
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005590
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005591
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005592for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5593fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005594ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005595shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005596unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005597sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5598sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005599sys/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 +00005600sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005601sys/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 +00005602sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005603bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005604do
Martin v. Löwis11437992002-04-12 09:54:03 +00005605as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005606if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5607 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5608echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5609if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005610 echo $ECHO_N "(cached) $ECHO_C" >&6
5611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005612ac_res=`eval echo '${'$as_ac_Header'}'`
5613 { echo "$as_me:$LINENO: result: $ac_res" >&5
5614echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005615else
Martin v. Löwis11437992002-04-12 09:54:03 +00005616 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005617{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5618echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005619cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005620/* confdefs.h. */
5621_ACEOF
5622cat confdefs.h >>conftest.$ac_ext
5623cat >>conftest.$ac_ext <<_ACEOF
5624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005625$ac_includes_default
5626#include <$ac_header>
5627_ACEOF
5628rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005629if { (ac_try="$ac_compile"
5630case "(($ac_try" in
5631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5632 *) ac_try_echo=$ac_try;;
5633esac
5634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005637 grep -v '^ *+' conftest.er1 >conftest.err
5638 rm -f conftest.er1
5639 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005641 (exit $ac_status); } && {
5642 test -z "$ac_c_werror_flag" ||
5643 test ! -s conftest.err
5644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005645 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005646else
Martin v. Löwis11437992002-04-12 09:54:03 +00005647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005648sed 's/^/| /' conftest.$ac_ext >&5
5649
Martin v. Löwiseba40652007-08-30 20:10:57 +00005650 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005652
5653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5654{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5655echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005656
5657# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005658{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5659echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005660cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005661/* confdefs.h. */
5662_ACEOF
5663cat confdefs.h >>conftest.$ac_ext
5664cat >>conftest.$ac_ext <<_ACEOF
5665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005666#include <$ac_header>
5667_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005668if { (ac_try="$ac_cpp conftest.$ac_ext"
5669case "(($ac_try" in
5670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5671 *) ac_try_echo=$ac_try;;
5672esac
5673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5674 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005675 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005676 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005677 rm -f conftest.er1
5678 cat conftest.err >&5
5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005680 (exit $ac_status); } >/dev/null && {
5681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5682 test ! -s conftest.err
5683 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 ac_header_preproc=yes
5685else
5686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005687sed 's/^/| /' conftest.$ac_ext >&5
5688
Martin v. Löwis11437992002-04-12 09:54:03 +00005689 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005691
Martin v. Löwis11437992002-04-12 09:54:03 +00005692rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005693{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5694echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005695
5696# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005697case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5698 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005699 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5700echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005701 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5702echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5703 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005704 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005705 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005706 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5707echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005708 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5709echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5710 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5711echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5712 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5713echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005714 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5715echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005716 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5717echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005718 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005719## ------------------------------------------------ ##
5720## Report this to http://www.python.org/python-bugs ##
5721## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005722_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005723 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005724 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005725esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005726{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5727echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5728if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005729 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005730else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005731 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005733ac_res=`eval echo '${'$as_ac_Header'}'`
5734 { echo "$as_me:$LINENO: result: $ac_res" >&5
5735echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005736
5737fi
5738if test `eval echo '${'$as_ac_Header'}'` = yes; then
5739 cat >>confdefs.h <<_ACEOF
5740#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5741_ACEOF
5742
5743fi
5744
Guido van Rossum627b2d71993-12-24 10:39:16 +00005745done
5746
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
5748
5749
5750
5751
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005753for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5754 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005755{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5756echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5757if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005759else
Martin v. Löwis11437992002-04-12 09:54:03 +00005760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005761/* confdefs.h. */
5762_ACEOF
5763cat confdefs.h >>conftest.$ac_ext
5764cat >>conftest.$ac_ext <<_ACEOF
5765/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005766#include <sys/types.h>
5767#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005768
Martin v. Löwis11437992002-04-12 09:54:03 +00005769int
5770main ()
5771{
5772if ((DIR *) 0)
5773return 0;
5774 ;
5775 return 0;
5776}
5777_ACEOF
5778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005779if { (ac_try="$ac_compile"
5780case "(($ac_try" in
5781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5782 *) ac_try_echo=$ac_try;;
5783esac
5784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005787 grep -v '^ *+' conftest.er1 >conftest.err
5788 rm -f conftest.er1
5789 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005791 (exit $ac_status); } && {
5792 test -z "$ac_c_werror_flag" ||
5793 test ! -s conftest.err
5794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005795 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005796else
Martin v. Löwis11437992002-04-12 09:54:03 +00005797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005798sed 's/^/| /' conftest.$ac_ext >&5
5799
Martin v. Löwiseba40652007-08-30 20:10:57 +00005800 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005802
5803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005805ac_res=`eval echo '${'$as_ac_Header'}'`
5806 { echo "$as_me:$LINENO: result: $ac_res" >&5
5807echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005808if test `eval echo '${'$as_ac_Header'}'` = yes; then
5809 cat >>confdefs.h <<_ACEOF
5810#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5811_ACEOF
5812
5813ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816done
5817# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5818if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005819 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5820echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005821if test "${ac_cv_search_opendir+set}" = set; then
5822 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005823else
Martin v. Löwis11437992002-04-12 09:54:03 +00005824 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005825cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005826/* confdefs.h. */
5827_ACEOF
5828cat confdefs.h >>conftest.$ac_ext
5829cat >>conftest.$ac_ext <<_ACEOF
5830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005831
Martin v. Löwiseba40652007-08-30 20:10:57 +00005832/* Override any GCC internal prototype to avoid an error.
5833 Use char because int might match the return type of a GCC
5834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005835#ifdef __cplusplus
5836extern "C"
5837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005838char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005839int
5840main ()
5841{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005842return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005843 ;
5844 return 0;
5845}
5846_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005847for ac_lib in '' dir; do
5848 if test -z "$ac_lib"; then
5849 ac_res="none required"
5850 else
5851 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005852 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005853 fi
5854 rm -f conftest.$ac_objext conftest$ac_exeext
5855if { (ac_try="$ac_link"
5856case "(($ac_try" in
5857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5858 *) ac_try_echo=$ac_try;;
5859esac
5860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5861 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005862 ac_status=$?
5863 grep -v '^ *+' conftest.er1 >conftest.err
5864 rm -f conftest.er1
5865 cat conftest.err >&5
5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005867 (exit $ac_status); } && {
5868 test -z "$ac_c_werror_flag" ||
5869 test ! -s conftest.err
5870 } && test -s conftest$ac_exeext &&
5871 $as_test_x conftest$ac_exeext; then
5872 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005873else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005874 echo "$as_me: failed program was:" >&5
5875sed 's/^/| /' conftest.$ac_ext >&5
5876
Martin v. Löwiseba40652007-08-30 20:10:57 +00005877
Brett Cannon19fab762007-06-02 03:02:29 +00005878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005879
5880rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5881 conftest$ac_exeext
5882 if test "${ac_cv_search_opendir+set}" = set; then
5883 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005885done
5886if test "${ac_cv_search_opendir+set}" = set; then
5887 :
5888else
5889 ac_cv_search_opendir=no
5890fi
5891rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005892LIBS=$ac_func_search_save_LIBS
5893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005894{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5895echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5896ac_res=$ac_cv_search_opendir
5897if test "$ac_res" != no; then
5898 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005899
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005901
Michael W. Hudson54241132001-12-07 15:38:26 +00005902else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005903 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5904echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005905if test "${ac_cv_search_opendir+set}" = set; then
5906 echo $ECHO_N "(cached) $ECHO_C" >&6
5907else
5908 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005910/* confdefs.h. */
5911_ACEOF
5912cat confdefs.h >>conftest.$ac_ext
5913cat >>conftest.$ac_ext <<_ACEOF
5914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005915
Martin v. Löwiseba40652007-08-30 20:10:57 +00005916/* Override any GCC internal prototype to avoid an error.
5917 Use char because int might match the return type of a GCC
5918 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005919#ifdef __cplusplus
5920extern "C"
5921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005922char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005923int
5924main ()
5925{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005926return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005927 ;
5928 return 0;
5929}
5930_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005931for ac_lib in '' x; do
5932 if test -z "$ac_lib"; then
5933 ac_res="none required"
5934 else
5935 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005936 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005937 fi
5938 rm -f conftest.$ac_objext conftest$ac_exeext
5939if { (ac_try="$ac_link"
5940case "(($ac_try" in
5941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5942 *) ac_try_echo=$ac_try;;
5943esac
5944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5945 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005946 ac_status=$?
5947 grep -v '^ *+' conftest.er1 >conftest.err
5948 rm -f conftest.er1
5949 cat conftest.err >&5
5950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005951 (exit $ac_status); } && {
5952 test -z "$ac_c_werror_flag" ||
5953 test ! -s conftest.err
5954 } && test -s conftest$ac_exeext &&
5955 $as_test_x conftest$ac_exeext; then
5956 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005957else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005958 echo "$as_me: failed program was:" >&5
5959sed 's/^/| /' conftest.$ac_ext >&5
5960
Martin v. Löwiseba40652007-08-30 20:10:57 +00005961
Brett Cannon19fab762007-06-02 03:02:29 +00005962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005963
5964rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5965 conftest$ac_exeext
5966 if test "${ac_cv_search_opendir+set}" = set; then
5967 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005969done
5970if test "${ac_cv_search_opendir+set}" = set; then
5971 :
5972else
5973 ac_cv_search_opendir=no
5974fi
5975rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005976LIBS=$ac_func_search_save_LIBS
5977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005978{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5979echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5980ac_res=$ac_cv_search_opendir
5981if test "$ac_res" != no; then
5982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005983
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005984fi
5985
5986fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005987
Martin v. Löwiseba40652007-08-30 20:10:57 +00005988{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5989echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005990if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5991 echo $ECHO_N "(cached) $ECHO_C" >&6
5992else
5993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005994/* confdefs.h. */
5995_ACEOF
5996cat confdefs.h >>conftest.$ac_ext
5997cat >>conftest.$ac_ext <<_ACEOF
5998/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005999#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006000int
6001main ()
6002{
6003return makedev(0, 0);
6004 ;
6005 return 0;
6006}
6007_ACEOF
6008rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009if { (ac_try="$ac_link"
6010case "(($ac_try" in
6011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6012 *) ac_try_echo=$ac_try;;
6013esac
6014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6015 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006017 grep -v '^ *+' conftest.er1 >conftest.err
6018 rm -f conftest.er1
6019 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021 (exit $ac_status); } && {
6022 test -z "$ac_c_werror_flag" ||
6023 test ! -s conftest.err
6024 } && test -s conftest$ac_exeext &&
6025 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026 ac_cv_header_sys_types_h_makedev=yes
6027else
6028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006029sed 's/^/| /' conftest.$ac_ext >&5
6030
Martin v. Löwiseba40652007-08-30 20:10:57 +00006031 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006033
6034rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006035 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006036
6037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006038{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6039echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040
6041if test $ac_cv_header_sys_types_h_makedev = no; then
6042if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006043 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6044echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6046 echo $ECHO_N "(cached) $ECHO_C" >&6
6047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006048{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6049echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050else
6051 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006052{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6053echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006054cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006055/* confdefs.h. */
6056_ACEOF
6057cat confdefs.h >>conftest.$ac_ext
6058cat >>conftest.$ac_ext <<_ACEOF
6059/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060$ac_includes_default
6061#include <sys/mkdev.h>
6062_ACEOF
6063rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006064if { (ac_try="$ac_compile"
6065case "(($ac_try" in
6066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6067 *) ac_try_echo=$ac_try;;
6068esac
6069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6070 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006072 grep -v '^ *+' conftest.er1 >conftest.err
6073 rm -f conftest.er1
6074 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006076 (exit $ac_status); } && {
6077 test -z "$ac_c_werror_flag" ||
6078 test ! -s conftest.err
6079 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080 ac_header_compiler=yes
6081else
6082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006083sed 's/^/| /' conftest.$ac_ext >&5
6084
Martin v. Löwiseba40652007-08-30 20:10:57 +00006085 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006087
6088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6089{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6090echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091
6092# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006093{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6094echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006096/* confdefs.h. */
6097_ACEOF
6098cat confdefs.h >>conftest.$ac_ext
6099cat >>conftest.$ac_ext <<_ACEOF
6100/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006101#include <sys/mkdev.h>
6102_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006103if { (ac_try="$ac_cpp conftest.$ac_ext"
6104case "(($ac_try" in
6105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6106 *) ac_try_echo=$ac_try;;
6107esac
6108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6109 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006110 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006111 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112 rm -f conftest.er1
6113 cat conftest.err >&5
6114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006115 (exit $ac_status); } >/dev/null && {
6116 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6117 test ! -s conftest.err
6118 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119 ac_header_preproc=yes
6120else
6121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006122sed 's/^/| /' conftest.$ac_ext >&5
6123
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124 ac_header_preproc=no
6125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006126
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006127rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006128{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6129echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130
6131# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006132case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6133 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6135echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006136 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6137echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6138 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006139 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006140 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006141 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6142echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006143 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6144echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6145 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6146echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6147 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6148echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006149 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6150echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006151 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6152echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006153 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006154## ------------------------------------------------ ##
6155## Report this to http://www.python.org/python-bugs ##
6156## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006157_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006158 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006159 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006161{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6162echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6164 echo $ECHO_N "(cached) $ECHO_C" >&6
6165else
6166 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006168{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6169echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006170
6171fi
6172if test $ac_cv_header_sys_mkdev_h = yes; then
6173
6174cat >>confdefs.h <<\_ACEOF
6175#define MAJOR_IN_MKDEV 1
6176_ACEOF
6177
6178fi
6179
6180
6181
6182 if test $ac_cv_header_sys_mkdev_h = no; then
6183 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006184 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6185echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6187 echo $ECHO_N "(cached) $ECHO_C" >&6
6188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006189{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6190echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191else
6192 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006193{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6194echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006196/* confdefs.h. */
6197_ACEOF
6198cat confdefs.h >>conftest.$ac_ext
6199cat >>conftest.$ac_ext <<_ACEOF
6200/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201$ac_includes_default
6202#include <sys/sysmacros.h>
6203_ACEOF
6204rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006205if { (ac_try="$ac_compile"
6206case "(($ac_try" in
6207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6208 *) ac_try_echo=$ac_try;;
6209esac
6210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006213 grep -v '^ *+' conftest.er1 >conftest.err
6214 rm -f conftest.er1
6215 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006217 (exit $ac_status); } && {
6218 test -z "$ac_c_werror_flag" ||
6219 test ! -s conftest.err
6220 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221 ac_header_compiler=yes
6222else
6223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006224sed 's/^/| /' conftest.$ac_ext >&5
6225
Martin v. Löwiseba40652007-08-30 20:10:57 +00006226 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006228
6229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6230{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6231echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232
6233# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006234{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6235echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006237/* confdefs.h. */
6238_ACEOF
6239cat confdefs.h >>conftest.$ac_ext
6240cat >>conftest.$ac_ext <<_ACEOF
6241/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242#include <sys/sysmacros.h>
6243_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006244if { (ac_try="$ac_cpp conftest.$ac_ext"
6245case "(($ac_try" in
6246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6247 *) ac_try_echo=$ac_try;;
6248esac
6249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6250 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006252 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253 rm -f conftest.er1
6254 cat conftest.err >&5
6255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006256 (exit $ac_status); } >/dev/null && {
6257 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6258 test ! -s conftest.err
6259 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260 ac_header_preproc=yes
6261else
6262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006263sed 's/^/| /' conftest.$ac_ext >&5
6264
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265 ac_header_preproc=no
6266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006268rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006269{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6270echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271
6272# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006273case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6274 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6276echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006277 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6278echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6279 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006280 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006281 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006282 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6283echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006284 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6285echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6286 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6287echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6288 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6289echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006290 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6291echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006292 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6293echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006294 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006295## ------------------------------------------------ ##
6296## Report this to http://www.python.org/python-bugs ##
6297## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006298_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006299 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006300 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006302{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6303echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6305 echo $ECHO_N "(cached) $ECHO_C" >&6
6306else
6307 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006309{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6310echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006311
6312fi
6313if test $ac_cv_header_sys_sysmacros_h = yes; then
6314
6315cat >>confdefs.h <<\_ACEOF
6316#define MAJOR_IN_SYSMACROS 1
6317_ACEOF
6318
6319fi
6320
6321
6322 fi
6323fi
6324
Michael W. Hudson54241132001-12-07 15:38:26 +00006325
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006326# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006327
6328for ac_header in term.h
6329do
6330as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006331{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6332echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6333if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006334 echo $ECHO_N "(cached) $ECHO_C" >&6
6335else
6336 cat >conftest.$ac_ext <<_ACEOF
6337/* confdefs.h. */
6338_ACEOF
6339cat confdefs.h >>conftest.$ac_ext
6340cat >>conftest.$ac_ext <<_ACEOF
6341/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006342
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006343#ifdef HAVE_CURSES_H
6344#include <curses.h>
6345#endif
6346
6347
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006348#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006349_ACEOF
6350rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006351if { (ac_try="$ac_compile"
6352case "(($ac_try" in
6353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6354 *) ac_try_echo=$ac_try;;
6355esac
6356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358 ac_status=$?
6359 grep -v '^ *+' conftest.er1 >conftest.err
6360 rm -f conftest.er1
6361 cat conftest.err >&5
6362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006363 (exit $ac_status); } && {
6364 test -z "$ac_c_werror_flag" ||
6365 test ! -s conftest.err
6366 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006367 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006368else
6369 echo "$as_me: failed program was:" >&5
6370sed 's/^/| /' conftest.$ac_ext >&5
6371
Martin v. Löwiseba40652007-08-30 20:10:57 +00006372 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006374
6375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006377ac_res=`eval echo '${'$as_ac_Header'}'`
6378 { echo "$as_me:$LINENO: result: $ac_res" >&5
6379echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006380if test `eval echo '${'$as_ac_Header'}'` = yes; then
6381 cat >>confdefs.h <<_ACEOF
6382#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6383_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006384
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006385fi
6386
6387done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388
6389
Martin v. Löwis11017b12006-01-14 18:12:57 +00006390# On Linux, netlink.h requires asm/types.h
6391
6392for ac_header in linux/netlink.h
6393do
6394as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006395{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6396echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6397if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006398 echo $ECHO_N "(cached) $ECHO_C" >&6
6399else
6400 cat >conftest.$ac_ext <<_ACEOF
6401/* confdefs.h. */
6402_ACEOF
6403cat confdefs.h >>conftest.$ac_ext
6404cat >>conftest.$ac_ext <<_ACEOF
6405/* end confdefs.h. */
6406
6407#ifdef HAVE_ASM_TYPES_H
6408#include <asm/types.h>
6409#endif
6410#ifdef HAVE_SYS_SOCKET_H
6411#include <sys/socket.h>
6412#endif
6413
6414
6415#include <$ac_header>
6416_ACEOF
6417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006418if { (ac_try="$ac_compile"
6419case "(($ac_try" in
6420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6421 *) ac_try_echo=$ac_try;;
6422esac
6423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006425 ac_status=$?
6426 grep -v '^ *+' conftest.er1 >conftest.err
6427 rm -f conftest.er1
6428 cat conftest.err >&5
6429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006430 (exit $ac_status); } && {
6431 test -z "$ac_c_werror_flag" ||
6432 test ! -s conftest.err
6433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006434 eval "$as_ac_Header=yes"
6435else
6436 echo "$as_me: failed program was:" >&5
6437sed 's/^/| /' conftest.$ac_ext >&5
6438
Martin v. Löwiseba40652007-08-30 20:10:57 +00006439 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006441
6442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006444ac_res=`eval echo '${'$as_ac_Header'}'`
6445 { echo "$as_me:$LINENO: result: $ac_res" >&5
6446echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006447if test `eval echo '${'$as_ac_Header'}'` = yes; then
6448 cat >>confdefs.h <<_ACEOF
6449#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6450_ACEOF
6451
6452fi
6453
6454done
6455
6456
Guido van Rossum627b2d71993-12-24 10:39:16 +00006457# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006458was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006459{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6460echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006461cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006462/* confdefs.h. */
6463_ACEOF
6464cat confdefs.h >>conftest.$ac_ext
6465cat >>conftest.$ac_ext <<_ACEOF
6466/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006468
6469_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006471 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006472 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006473else
Martin v. Löwis11437992002-04-12 09:54:03 +00006474
6475
6476cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006477#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006478_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006479
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006480
Guido van Rossum627b2d71993-12-24 10:39:16 +00006481fi
6482rm -f conftest*
6483
Martin v. Löwiseba40652007-08-30 20:10:57 +00006484{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6485echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006486
Neal Norwitz11690112002-07-30 01:08:28 +00006487# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006488{ echo "$as_me:$LINENO: checking for makedev" >&5
6489echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006491/* confdefs.h. */
6492_ACEOF
6493cat confdefs.h >>conftest.$ac_ext
6494cat >>conftest.$ac_ext <<_ACEOF
6495/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006496#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006497int
6498main ()
6499{
6500 makedev(0, 0)
6501 ;
6502 return 0;
6503}
6504_ACEOF
6505rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006506if { (ac_try="$ac_link"
6507case "(($ac_try" in
6508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6509 *) ac_try_echo=$ac_try;;
6510esac
6511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6512 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006514 grep -v '^ *+' conftest.er1 >conftest.err
6515 rm -f conftest.er1
6516 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006518 (exit $ac_status); } && {
6519 test -z "$ac_c_werror_flag" ||
6520 test ! -s conftest.err
6521 } && test -s conftest$ac_exeext &&
6522 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006523 ac_cv_has_makedev=yes
6524else
6525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006526sed 's/^/| /' conftest.$ac_ext >&5
6527
Martin v. Löwiseba40652007-08-30 20:10:57 +00006528 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006530
6531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006532 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006533if test "$ac_cv_has_makedev" = "no"; then
6534 # we didn't link, try if _OSF_SOURCE will allow us to link
6535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006536/* confdefs.h. */
6537_ACEOF
6538cat confdefs.h >>conftest.$ac_ext
6539cat >>conftest.$ac_ext <<_ACEOF
6540/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006541
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006542#define _OSF_SOURCE 1
6543#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006544
Neal Norwitz11690112002-07-30 01:08:28 +00006545int
6546main ()
6547{
6548 makedev(0, 0)
6549 ;
6550 return 0;
6551}
6552_ACEOF
6553rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006554if { (ac_try="$ac_link"
6555case "(($ac_try" in
6556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6557 *) ac_try_echo=$ac_try;;
6558esac
6559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6560 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006562 grep -v '^ *+' conftest.er1 >conftest.err
6563 rm -f conftest.er1
6564 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566 (exit $ac_status); } && {
6567 test -z "$ac_c_werror_flag" ||
6568 test ! -s conftest.err
6569 } && test -s conftest$ac_exeext &&
6570 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006571 ac_cv_has_makedev=yes
6572else
6573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006574sed 's/^/| /' conftest.$ac_ext >&5
6575
Martin v. Löwiseba40652007-08-30 20:10:57 +00006576 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006578
6579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006580 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006581 if test "$ac_cv_has_makedev" = "yes"; then
6582
6583cat >>confdefs.h <<\_ACEOF
6584#define _OSF_SOURCE 1
6585_ACEOF
6586
6587 fi
6588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006589{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6590echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006591if test "$ac_cv_has_makedev" = "yes"; then
6592
6593cat >>confdefs.h <<\_ACEOF
6594#define HAVE_MAKEDEV 1
6595_ACEOF
6596
6597fi
6598
Martin v. Löwis399a6892002-10-04 10:22:02 +00006599# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6600# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6601# defined, but the compiler does not support pragma redefine_extname,
6602# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6603# structures (such as rlimit64) without declaring them. As a
6604# work-around, disable LFS on such configurations
6605
6606use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006607{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6608echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006610/* confdefs.h. */
6611_ACEOF
6612cat confdefs.h >>conftest.$ac_ext
6613cat >>conftest.$ac_ext <<_ACEOF
6614/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006615
6616#define _LARGEFILE_SOURCE 1
6617#define _FILE_OFFSET_BITS 64
6618#include <sys/resource.h>
6619
Martin v. Löwis399a6892002-10-04 10:22:02 +00006620int
6621main ()
6622{
6623struct rlimit foo;
6624 ;
6625 return 0;
6626}
6627_ACEOF
6628rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006629if { (ac_try="$ac_compile"
6630case "(($ac_try" in
6631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6632 *) ac_try_echo=$ac_try;;
6633esac
6634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006637 grep -v '^ *+' conftest.er1 >conftest.err
6638 rm -f conftest.er1
6639 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006641 (exit $ac_status); } && {
6642 test -z "$ac_c_werror_flag" ||
6643 test ! -s conftest.err
6644 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006645 sol_lfs_bug=no
6646else
6647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006648sed 's/^/| /' conftest.$ac_ext >&5
6649
Martin v. Löwiseba40652007-08-30 20:10:57 +00006650 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006652
6653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6654{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6655echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006656if test "$sol_lfs_bug" = "yes"; then
6657 use_lfs=no
6658fi
6659
6660if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006661# Two defines needed to enable largefile support on various platforms
6662# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006663
Martin v. Löwis11437992002-04-12 09:54:03 +00006664cat >>confdefs.h <<\_ACEOF
6665#define _LARGEFILE_SOURCE 1
6666_ACEOF
6667
6668
6669cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006670#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006671_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006672
Martin v. Löwis399a6892002-10-04 10:22:02 +00006673fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006674
Guido van Rossum84e7b241996-08-19 21:59:00 +00006675# Add some code to confdefs.h so that the test for off_t works on SCO
6676cat >> confdefs.h <<\EOF
6677#if defined(SCO_DS)
6678#undef _OFF_T
6679#endif
6680EOF
6681
Guido van Rossumef2255b2000-03-10 22:30:29 +00006682# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683{ echo "$as_me:$LINENO: checking for mode_t" >&5
6684echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006685if test "${ac_cv_type_mode_t+set}" = set; then
6686 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006687else
Martin v. Löwis11437992002-04-12 09:54:03 +00006688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006689/* confdefs.h. */
6690_ACEOF
6691cat confdefs.h >>conftest.$ac_ext
6692cat >>conftest.$ac_ext <<_ACEOF
6693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006694$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006695typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006696int
6697main ()
6698{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006699if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006700 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006701if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006702 return 0;
6703 ;
6704 return 0;
6705}
6706_ACEOF
6707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006708if { (ac_try="$ac_compile"
6709case "(($ac_try" in
6710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6711 *) ac_try_echo=$ac_try;;
6712esac
6713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006716 grep -v '^ *+' conftest.er1 >conftest.err
6717 rm -f conftest.er1
6718 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006720 (exit $ac_status); } && {
6721 test -z "$ac_c_werror_flag" ||
6722 test ! -s conftest.err
6723 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006724 ac_cv_type_mode_t=yes
6725else
Martin v. Löwis11437992002-04-12 09:54:03 +00006726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006727sed 's/^/| /' conftest.$ac_ext >&5
6728
Martin v. Löwiseba40652007-08-30 20:10:57 +00006729 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006731
6732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006734{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6735echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006736if test $ac_cv_type_mode_t = yes; then
6737 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006738else
Martin v. Löwis11437992002-04-12 09:54:03 +00006739
6740cat >>confdefs.h <<_ACEOF
6741#define mode_t int
6742_ACEOF
6743
6744fi
6745
Martin v. Löwiseba40652007-08-30 20:10:57 +00006746{ echo "$as_me:$LINENO: checking for off_t" >&5
6747echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006748if test "${ac_cv_type_off_t+set}" = set; then
6749 echo $ECHO_N "(cached) $ECHO_C" >&6
6750else
6751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006752/* confdefs.h. */
6753_ACEOF
6754cat confdefs.h >>conftest.$ac_ext
6755cat >>conftest.$ac_ext <<_ACEOF
6756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006757$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006758typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006759int
6760main ()
6761{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006762if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006763 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006764if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006765 return 0;
6766 ;
6767 return 0;
6768}
6769_ACEOF
6770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006771if { (ac_try="$ac_compile"
6772case "(($ac_try" in
6773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6774 *) ac_try_echo=$ac_try;;
6775esac
6776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006779 grep -v '^ *+' conftest.er1 >conftest.err
6780 rm -f conftest.er1
6781 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783 (exit $ac_status); } && {
6784 test -z "$ac_c_werror_flag" ||
6785 test ! -s conftest.err
6786 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006787 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006788else
Martin v. Löwis11437992002-04-12 09:54:03 +00006789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006790sed 's/^/| /' conftest.$ac_ext >&5
6791
Martin v. Löwiseba40652007-08-30 20:10:57 +00006792 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006794
6795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006797{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6798echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006799if test $ac_cv_type_off_t = yes; then
6800 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006801else
Martin v. Löwis11437992002-04-12 09:54:03 +00006802
6803cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006804#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006805_ACEOF
6806
6807fi
6808
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809{ echo "$as_me:$LINENO: checking for pid_t" >&5
6810echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006811if test "${ac_cv_type_pid_t+set}" = set; then
6812 echo $ECHO_N "(cached) $ECHO_C" >&6
6813else
6814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006815/* confdefs.h. */
6816_ACEOF
6817cat confdefs.h >>conftest.$ac_ext
6818cat >>conftest.$ac_ext <<_ACEOF
6819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006820$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006821typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006822int
6823main ()
6824{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006825if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006826 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006827if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006828 return 0;
6829 ;
6830 return 0;
6831}
6832_ACEOF
6833rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006834if { (ac_try="$ac_compile"
6835case "(($ac_try" in
6836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6837 *) ac_try_echo=$ac_try;;
6838esac
6839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006842 grep -v '^ *+' conftest.er1 >conftest.err
6843 rm -f conftest.er1
6844 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006846 (exit $ac_status); } && {
6847 test -z "$ac_c_werror_flag" ||
6848 test ! -s conftest.err
6849 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006850 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006851else
Martin v. Löwis11437992002-04-12 09:54:03 +00006852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006853sed 's/^/| /' conftest.$ac_ext >&5
6854
Martin v. Löwiseba40652007-08-30 20:10:57 +00006855 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006857
6858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006860{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6861echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006862if test $ac_cv_type_pid_t = yes; then
6863 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006864else
Martin v. Löwis11437992002-04-12 09:54:03 +00006865
6866cat >>confdefs.h <<_ACEOF
6867#define pid_t int
6868_ACEOF
6869
6870fi
6871
Martin v. Löwiseba40652007-08-30 20:10:57 +00006872{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6873echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006874if test "${ac_cv_type_signal+set}" = set; then
6875 echo $ECHO_N "(cached) $ECHO_C" >&6
6876else
6877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006878/* confdefs.h. */
6879_ACEOF
6880cat confdefs.h >>conftest.$ac_ext
6881cat >>conftest.$ac_ext <<_ACEOF
6882/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006883#include <sys/types.h>
6884#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006885
Martin v. Löwis11437992002-04-12 09:54:03 +00006886int
6887main ()
6888{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006889return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006890 ;
6891 return 0;
6892}
6893_ACEOF
6894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006895if { (ac_try="$ac_compile"
6896case "(($ac_try" in
6897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6898 *) ac_try_echo=$ac_try;;
6899esac
6900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006903 grep -v '^ *+' conftest.er1 >conftest.err
6904 rm -f conftest.er1
6905 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006907 (exit $ac_status); } && {
6908 test -z "$ac_c_werror_flag" ||
6909 test ! -s conftest.err
6910 } && test -s conftest.$ac_objext; then
6911 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006912else
Martin v. Löwis11437992002-04-12 09:54:03 +00006913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006914sed 's/^/| /' conftest.$ac_ext >&5
6915
Martin v. Löwiseba40652007-08-30 20:10:57 +00006916 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006918
6919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006921{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6922echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006923
Martin v. Löwis11437992002-04-12 09:54:03 +00006924cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006925#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006926_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006927
Michael W. Hudson54241132001-12-07 15:38:26 +00006928
Martin v. Löwiseba40652007-08-30 20:10:57 +00006929{ echo "$as_me:$LINENO: checking for size_t" >&5
6930echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006931if test "${ac_cv_type_size_t+set}" = set; then
6932 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006933else
Martin v. Löwis11437992002-04-12 09:54:03 +00006934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006935/* confdefs.h. */
6936_ACEOF
6937cat confdefs.h >>conftest.$ac_ext
6938cat >>conftest.$ac_ext <<_ACEOF
6939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006940$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006942int
6943main ()
6944{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006945if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006946 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006947if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006948 return 0;
6949 ;
6950 return 0;
6951}
6952_ACEOF
6953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006954if { (ac_try="$ac_compile"
6955case "(($ac_try" in
6956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6957 *) ac_try_echo=$ac_try;;
6958esac
6959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006962 grep -v '^ *+' conftest.er1 >conftest.err
6963 rm -f conftest.er1
6964 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966 (exit $ac_status); } && {
6967 test -z "$ac_c_werror_flag" ||
6968 test ! -s conftest.err
6969 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006970 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006971else
Martin v. Löwis11437992002-04-12 09:54:03 +00006972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006973sed 's/^/| /' conftest.$ac_ext >&5
6974
Martin v. Löwiseba40652007-08-30 20:10:57 +00006975 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006977
6978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006980{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6981echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006982if test $ac_cv_type_size_t = yes; then
6983 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006984else
Martin v. Löwis11437992002-04-12 09:54:03 +00006985
6986cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006987#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006988_ACEOF
6989
6990fi
6991
Martin v. Löwiseba40652007-08-30 20:10:57 +00006992{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6993echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006994if test "${ac_cv_type_uid_t+set}" = set; then
6995 echo $ECHO_N "(cached) $ECHO_C" >&6
6996else
6997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006998/* confdefs.h. */
6999_ACEOF
7000cat confdefs.h >>conftest.$ac_ext
7001cat >>conftest.$ac_ext <<_ACEOF
7002/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007004
7005_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007007 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007008 ac_cv_type_uid_t=yes
7009else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007010 ac_cv_type_uid_t=no
7011fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007012rm -f conftest*
7013
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007015{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7016echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007017if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007018
Martin v. Löwis11437992002-04-12 09:54:03 +00007019cat >>confdefs.h <<\_ACEOF
7020#define uid_t int
7021_ACEOF
7022
7023
7024cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007025#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007026_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007027
7028fi
7029
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007030
7031 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7032echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
7033if test "${ac_cv_c_uint32_t+set}" = set; then
7034 echo $ECHO_N "(cached) $ECHO_C" >&6
7035else
7036 ac_cv_c_uint32_t=no
7037 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7038 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7039 cat >conftest.$ac_ext <<_ACEOF
7040/* confdefs.h. */
7041_ACEOF
7042cat confdefs.h >>conftest.$ac_ext
7043cat >>conftest.$ac_ext <<_ACEOF
7044/* end confdefs.h. */
7045$ac_includes_default
7046int
7047main ()
7048{
7049static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7050test_array [0] = 0
7051
7052 ;
7053 return 0;
7054}
7055_ACEOF
7056rm -f conftest.$ac_objext
7057if { (ac_try="$ac_compile"
7058case "(($ac_try" in
7059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7060 *) ac_try_echo=$ac_try;;
7061esac
7062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7063 (eval "$ac_compile") 2>conftest.er1
7064 ac_status=$?
7065 grep -v '^ *+' conftest.er1 >conftest.err
7066 rm -f conftest.er1
7067 cat conftest.err >&5
7068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7069 (exit $ac_status); } && {
7070 test -z "$ac_c_werror_flag" ||
7071 test ! -s conftest.err
7072 } && test -s conftest.$ac_objext; then
7073 case $ac_type in
7074 uint32_t) ac_cv_c_uint32_t=yes ;;
7075 *) ac_cv_c_uint32_t=$ac_type ;;
7076esac
7077
7078else
7079 echo "$as_me: failed program was:" >&5
7080sed 's/^/| /' conftest.$ac_ext >&5
7081
7082
7083fi
7084
7085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7086 test "$ac_cv_c_uint32_t" != no && break
7087 done
7088fi
7089{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7090echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
7091 case $ac_cv_c_uint32_t in #(
7092 no|yes) ;; #(
7093 *)
7094
7095cat >>confdefs.h <<\_ACEOF
7096#define _UINT32_T 1
7097_ACEOF
7098
7099
7100cat >>confdefs.h <<_ACEOF
7101#define uint32_t $ac_cv_c_uint32_t
7102_ACEOF
7103;;
7104 esac
7105
7106
7107 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7108echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
7109if test "${ac_cv_c_uint64_t+set}" = set; then
7110 echo $ECHO_N "(cached) $ECHO_C" >&6
7111else
7112 ac_cv_c_uint64_t=no
7113 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7114 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7115 cat >conftest.$ac_ext <<_ACEOF
7116/* confdefs.h. */
7117_ACEOF
7118cat confdefs.h >>conftest.$ac_ext
7119cat >>conftest.$ac_ext <<_ACEOF
7120/* end confdefs.h. */
7121$ac_includes_default
7122int
7123main ()
7124{
7125static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7126test_array [0] = 0
7127
7128 ;
7129 return 0;
7130}
7131_ACEOF
7132rm -f conftest.$ac_objext
7133if { (ac_try="$ac_compile"
7134case "(($ac_try" in
7135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7136 *) ac_try_echo=$ac_try;;
7137esac
7138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7139 (eval "$ac_compile") 2>conftest.er1
7140 ac_status=$?
7141 grep -v '^ *+' conftest.er1 >conftest.err
7142 rm -f conftest.er1
7143 cat conftest.err >&5
7144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7145 (exit $ac_status); } && {
7146 test -z "$ac_c_werror_flag" ||
7147 test ! -s conftest.err
7148 } && test -s conftest.$ac_objext; then
7149 case $ac_type in
7150 uint64_t) ac_cv_c_uint64_t=yes ;;
7151 *) ac_cv_c_uint64_t=$ac_type ;;
7152esac
7153
7154else
7155 echo "$as_me: failed program was:" >&5
7156sed 's/^/| /' conftest.$ac_ext >&5
7157
7158
7159fi
7160
7161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7162 test "$ac_cv_c_uint64_t" != no && break
7163 done
7164fi
7165{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7166echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
7167 case $ac_cv_c_uint64_t in #(
7168 no|yes) ;; #(
7169 *)
7170
7171cat >>confdefs.h <<\_ACEOF
7172#define _UINT64_T 1
7173_ACEOF
7174
7175
7176cat >>confdefs.h <<_ACEOF
7177#define uint64_t $ac_cv_c_uint64_t
7178_ACEOF
7179;;
7180 esac
7181
7182
7183 { echo "$as_me:$LINENO: checking for int32_t" >&5
7184echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
7185if test "${ac_cv_c_int32_t+set}" = set; then
7186 echo $ECHO_N "(cached) $ECHO_C" >&6
7187else
7188 ac_cv_c_int32_t=no
7189 for ac_type in 'int32_t' 'int' 'long int' \
7190 'long long int' 'short int' 'signed char'; do
7191 cat >conftest.$ac_ext <<_ACEOF
7192/* confdefs.h. */
7193_ACEOF
7194cat confdefs.h >>conftest.$ac_ext
7195cat >>conftest.$ac_ext <<_ACEOF
7196/* end confdefs.h. */
7197$ac_includes_default
7198int
7199main ()
7200{
7201static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7202test_array [0] = 0
7203
7204 ;
7205 return 0;
7206}
7207_ACEOF
7208rm -f conftest.$ac_objext
7209if { (ac_try="$ac_compile"
7210case "(($ac_try" in
7211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7212 *) ac_try_echo=$ac_try;;
7213esac
7214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7215 (eval "$ac_compile") 2>conftest.er1
7216 ac_status=$?
7217 grep -v '^ *+' conftest.er1 >conftest.err
7218 rm -f conftest.er1
7219 cat conftest.err >&5
7220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7221 (exit $ac_status); } && {
7222 test -z "$ac_c_werror_flag" ||
7223 test ! -s conftest.err
7224 } && test -s conftest.$ac_objext; then
7225 cat >conftest.$ac_ext <<_ACEOF
7226/* confdefs.h. */
7227_ACEOF
7228cat confdefs.h >>conftest.$ac_ext
7229cat >>conftest.$ac_ext <<_ACEOF
7230/* end confdefs.h. */
7231$ac_includes_default
7232int
7233main ()
7234{
7235static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
7236 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
7237test_array [0] = 0
7238
7239 ;
7240 return 0;
7241}
7242_ACEOF
7243rm -f conftest.$ac_objext
7244if { (ac_try="$ac_compile"
7245case "(($ac_try" in
7246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7247 *) ac_try_echo=$ac_try;;
7248esac
7249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7250 (eval "$ac_compile") 2>conftest.er1
7251 ac_status=$?
7252 grep -v '^ *+' conftest.er1 >conftest.err
7253 rm -f conftest.er1
7254 cat conftest.err >&5
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); } && {
7257 test -z "$ac_c_werror_flag" ||
7258 test ! -s conftest.err
7259 } && test -s conftest.$ac_objext; then
7260 :
7261else
7262 echo "$as_me: failed program was:" >&5
7263sed 's/^/| /' conftest.$ac_ext >&5
7264
7265 case $ac_type in
7266 int32_t) ac_cv_c_int32_t=yes ;;
7267 *) ac_cv_c_int32_t=$ac_type ;;
7268esac
7269
7270fi
7271
7272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7273else
7274 echo "$as_me: failed program was:" >&5
7275sed 's/^/| /' conftest.$ac_ext >&5
7276
7277
7278fi
7279
7280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7281 test "$ac_cv_c_int32_t" != no && break
7282 done
7283fi
7284{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7285echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
7286 case $ac_cv_c_int32_t in #(
7287 no|yes) ;; #(
7288 *)
7289
7290cat >>confdefs.h <<_ACEOF
7291#define int32_t $ac_cv_c_int32_t
7292_ACEOF
7293;;
7294 esac
7295
7296
7297 { echo "$as_me:$LINENO: checking for int64_t" >&5
7298echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
7299if test "${ac_cv_c_int64_t+set}" = set; then
7300 echo $ECHO_N "(cached) $ECHO_C" >&6
7301else
7302 ac_cv_c_int64_t=no
7303 for ac_type in 'int64_t' 'int' 'long int' \
7304 'long long int' 'short int' 'signed char'; do
7305 cat >conftest.$ac_ext <<_ACEOF
7306/* confdefs.h. */
7307_ACEOF
7308cat confdefs.h >>conftest.$ac_ext
7309cat >>conftest.$ac_ext <<_ACEOF
7310/* end confdefs.h. */
7311$ac_includes_default
7312int
7313main ()
7314{
7315static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7316test_array [0] = 0
7317
7318 ;
7319 return 0;
7320}
7321_ACEOF
7322rm -f conftest.$ac_objext
7323if { (ac_try="$ac_compile"
7324case "(($ac_try" in
7325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7326 *) ac_try_echo=$ac_try;;
7327esac
7328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7329 (eval "$ac_compile") 2>conftest.er1
7330 ac_status=$?
7331 grep -v '^ *+' conftest.er1 >conftest.err
7332 rm -f conftest.er1
7333 cat conftest.err >&5
7334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7335 (exit $ac_status); } && {
7336 test -z "$ac_c_werror_flag" ||
7337 test ! -s conftest.err
7338 } && test -s conftest.$ac_objext; then
7339 cat >conftest.$ac_ext <<_ACEOF
7340/* confdefs.h. */
7341_ACEOF
7342cat confdefs.h >>conftest.$ac_ext
7343cat >>conftest.$ac_ext <<_ACEOF
7344/* end confdefs.h. */
7345$ac_includes_default
7346int
7347main ()
7348{
7349static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
7350 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
7351test_array [0] = 0
7352
7353 ;
7354 return 0;
7355}
7356_ACEOF
7357rm -f conftest.$ac_objext
7358if { (ac_try="$ac_compile"
7359case "(($ac_try" in
7360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7361 *) ac_try_echo=$ac_try;;
7362esac
7363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7364 (eval "$ac_compile") 2>conftest.er1
7365 ac_status=$?
7366 grep -v '^ *+' conftest.er1 >conftest.err
7367 rm -f conftest.er1
7368 cat conftest.err >&5
7369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7370 (exit $ac_status); } && {
7371 test -z "$ac_c_werror_flag" ||
7372 test ! -s conftest.err
7373 } && test -s conftest.$ac_objext; then
7374 :
7375else
7376 echo "$as_me: failed program was:" >&5
7377sed 's/^/| /' conftest.$ac_ext >&5
7378
7379 case $ac_type in
7380 int64_t) ac_cv_c_int64_t=yes ;;
7381 *) ac_cv_c_int64_t=$ac_type ;;
7382esac
7383
7384fi
7385
7386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7387else
7388 echo "$as_me: failed program was:" >&5
7389sed 's/^/| /' conftest.$ac_ext >&5
7390
7391
7392fi
7393
7394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7395 test "$ac_cv_c_int64_t" != no && break
7396 done
7397fi
7398{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7399echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
7400 case $ac_cv_c_int64_t in #(
7401 no|yes) ;; #(
7402 *)
7403
7404cat >>confdefs.h <<_ACEOF
7405#define int64_t $ac_cv_c_int64_t
7406_ACEOF
7407;;
7408 esac
7409
Martin v. Löwiseba40652007-08-30 20:10:57 +00007410{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7411echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007412if test "${ac_cv_type_ssize_t+set}" = set; then
7413 echo $ECHO_N "(cached) $ECHO_C" >&6
7414else
7415 cat >conftest.$ac_ext <<_ACEOF
7416/* confdefs.h. */
7417_ACEOF
7418cat confdefs.h >>conftest.$ac_ext
7419cat >>conftest.$ac_ext <<_ACEOF
7420/* end confdefs.h. */
7421$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007422typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007423int
7424main ()
7425{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007426if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007427 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007428if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007429 return 0;
7430 ;
7431 return 0;
7432}
7433_ACEOF
7434rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007435if { (ac_try="$ac_compile"
7436case "(($ac_try" in
7437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7438 *) ac_try_echo=$ac_try;;
7439esac
7440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007442 ac_status=$?
7443 grep -v '^ *+' conftest.er1 >conftest.err
7444 rm -f conftest.er1
7445 cat conftest.err >&5
7446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007447 (exit $ac_status); } && {
7448 test -z "$ac_c_werror_flag" ||
7449 test ! -s conftest.err
7450 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007451 ac_cv_type_ssize_t=yes
7452else
7453 echo "$as_me: failed program was:" >&5
7454sed 's/^/| /' conftest.$ac_ext >&5
7455
Martin v. Löwiseba40652007-08-30 20:10:57 +00007456 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007458
7459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007461{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7462echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007463if test $ac_cv_type_ssize_t = yes; then
7464
7465cat >>confdefs.h <<\_ACEOF
7466#define HAVE_SSIZE_T 1
7467_ACEOF
7468
7469fi
7470
Jack Jansendd19cf82001-12-06 22:36:17 +00007471
Michael W. Hudson54241132001-12-07 15:38:26 +00007472# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007473# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007474{ echo "$as_me:$LINENO: checking for int" >&5
7475echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007476if test "${ac_cv_type_int+set}" = set; then
7477 echo $ECHO_N "(cached) $ECHO_C" >&6
7478else
7479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007480/* confdefs.h. */
7481_ACEOF
7482cat confdefs.h >>conftest.$ac_ext
7483cat >>conftest.$ac_ext <<_ACEOF
7484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007485$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007486typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007487int
7488main ()
7489{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007490if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007491 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007492if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007493 return 0;
7494 ;
7495 return 0;
7496}
7497_ACEOF
7498rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007499if { (ac_try="$ac_compile"
7500case "(($ac_try" in
7501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7502 *) ac_try_echo=$ac_try;;
7503esac
7504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007507 grep -v '^ *+' conftest.er1 >conftest.err
7508 rm -f conftest.er1
7509 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007511 (exit $ac_status); } && {
7512 test -z "$ac_c_werror_flag" ||
7513 test ! -s conftest.err
7514 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007515 ac_cv_type_int=yes
7516else
7517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007518sed 's/^/| /' conftest.$ac_ext >&5
7519
Martin v. Löwiseba40652007-08-30 20:10:57 +00007520 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007521fi
Brett Cannon19fab762007-06-02 03:02:29 +00007522
Martin v. Löwiseba40652007-08-30 20:10:57 +00007523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7524fi
7525{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7526echo "${ECHO_T}$ac_cv_type_int" >&6; }
7527
7528# The cast to long int works around a bug in the HP C Compiler
7529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7531# This bug is HP SR number 8606223364.
7532{ echo "$as_me:$LINENO: checking size of int" >&5
7533echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007534if test "${ac_cv_sizeof_int+set}" = set; then
7535 echo $ECHO_N "(cached) $ECHO_C" >&6
7536else
Martin v. Löwis11437992002-04-12 09:54:03 +00007537 if test "$cross_compiling" = yes; then
7538 # Depending upon the size, compute the lo and hi bounds.
7539cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007540/* confdefs.h. */
7541_ACEOF
7542cat confdefs.h >>conftest.$ac_ext
7543cat >>conftest.$ac_ext <<_ACEOF
7544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007545$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007546 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007547int
7548main ()
7549{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007550static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007551test_array [0] = 0
7552
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_lo=0 ac_mid=0
7575 while :; do
7576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007577/* confdefs.h. */
7578_ACEOF
7579cat confdefs.h >>conftest.$ac_ext
7580cat >>conftest.$ac_ext <<_ACEOF
7581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007582$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007583 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007584int
7585main ()
7586{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007587static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007588test_array [0] = 0
7589
7590 ;
7591 return 0;
7592}
7593_ACEOF
7594rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595if { (ac_try="$ac_compile"
7596case "(($ac_try" in
7597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7598 *) ac_try_echo=$ac_try;;
7599esac
7600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007603 grep -v '^ *+' conftest.er1 >conftest.err
7604 rm -f conftest.er1
7605 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007607 (exit $ac_status); } && {
7608 test -z "$ac_c_werror_flag" ||
7609 test ! -s conftest.err
7610 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 ac_hi=$ac_mid; break
7612else
7613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007614sed 's/^/| /' conftest.$ac_ext >&5
7615
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616 ac_lo=`expr $ac_mid + 1`
7617 if test $ac_lo -le $ac_mid; then
7618 ac_lo= ac_hi=
7619 break
7620 fi
7621 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007623
7624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007625 done
7626else
7627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007628sed 's/^/| /' conftest.$ac_ext >&5
7629
Martin v. Löwiseba40652007-08-30 20:10:57 +00007630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007631/* confdefs.h. */
7632_ACEOF
7633cat confdefs.h >>conftest.$ac_ext
7634cat >>conftest.$ac_ext <<_ACEOF
7635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007636$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007637 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007638int
7639main ()
7640{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007641static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007642test_array [0] = 0
7643
7644 ;
7645 return 0;
7646}
7647_ACEOF
7648rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649if { (ac_try="$ac_compile"
7650case "(($ac_try" in
7651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7652 *) ac_try_echo=$ac_try;;
7653esac
7654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007657 grep -v '^ *+' conftest.er1 >conftest.err
7658 rm -f conftest.er1
7659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661 (exit $ac_status); } && {
7662 test -z "$ac_c_werror_flag" ||
7663 test ! -s conftest.err
7664 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 ac_hi=-1 ac_mid=-1
7666 while :; do
7667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007668/* confdefs.h. */
7669_ACEOF
7670cat confdefs.h >>conftest.$ac_ext
7671cat >>conftest.$ac_ext <<_ACEOF
7672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007673$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007674 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007675int
7676main ()
7677{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007679test_array [0] = 0
7680
7681 ;
7682 return 0;
7683}
7684_ACEOF
7685rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686if { (ac_try="$ac_compile"
7687case "(($ac_try" in
7688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7689 *) ac_try_echo=$ac_try;;
7690esac
7691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007694 grep -v '^ *+' conftest.er1 >conftest.err
7695 rm -f conftest.er1
7696 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007698 (exit $ac_status); } && {
7699 test -z "$ac_c_werror_flag" ||
7700 test ! -s conftest.err
7701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 ac_lo=$ac_mid; break
7703else
7704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007705sed 's/^/| /' conftest.$ac_ext >&5
7706
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707 ac_hi=`expr '(' $ac_mid ')' - 1`
7708 if test $ac_mid -le $ac_hi; then
7709 ac_lo= ac_hi=
7710 break
7711 fi
7712 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714
7715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 done
7717else
7718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007719sed 's/^/| /' conftest.$ac_ext >&5
7720
Martin v. Löwiseba40652007-08-30 20:10:57 +00007721 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723
7724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007726
7727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007728# Binary search between lo and hi bounds.
7729while test "x$ac_lo" != "x$ac_hi"; do
7730 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007732/* confdefs.h. */
7733_ACEOF
7734cat confdefs.h >>conftest.$ac_ext
7735cat >>conftest.$ac_ext <<_ACEOF
7736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007737$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007738 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007739int
7740main ()
7741{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007743test_array [0] = 0
7744
7745 ;
7746 return 0;
7747}
7748_ACEOF
7749rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007750if { (ac_try="$ac_compile"
7751case "(($ac_try" in
7752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7753 *) ac_try_echo=$ac_try;;
7754esac
7755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007758 grep -v '^ *+' conftest.er1 >conftest.err
7759 rm -f conftest.er1
7760 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762 (exit $ac_status); } && {
7763 test -z "$ac_c_werror_flag" ||
7764 test ! -s conftest.err
7765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 ac_hi=$ac_mid
7767else
7768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007769sed 's/^/| /' conftest.$ac_ext >&5
7770
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00007775done
7776case $ac_lo in
7777?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007778'') if test "$ac_cv_type_int" = yes; then
7779 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007780See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007781echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007782See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783 { (exit 77); exit 77; }; }
7784 else
7785 ac_cv_sizeof_int=0
7786 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007787esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007788else
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* confdefs.h. */
7791_ACEOF
7792cat confdefs.h >>conftest.$ac_ext
7793cat >>conftest.$ac_ext <<_ACEOF
7794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007795$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007796 typedef int ac__type_sizeof_;
7797static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7798static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007799#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007800#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007801int
7802main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007803{
Martin v. Löwis11437992002-04-12 09:54:03 +00007804
7805 FILE *f = fopen ("conftest.val", "w");
7806 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007807 return 1;
7808 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007810 long int i = longval ();
7811 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7812 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 fprintf (f, "%ld\n", i);
7814 }
7815 else
7816 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007817 unsigned long int i = ulongval ();
7818 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7819 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 fprintf (f, "%lu\n", i);
7821 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007822 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007823
7824 ;
7825 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007826}
Martin v. Löwis11437992002-04-12 09:54:03 +00007827_ACEOF
7828rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007829if { (ac_try="$ac_link"
7830case "(($ac_try" in
7831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7832 *) ac_try_echo=$ac_try;;
7833esac
7834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7835 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007836 ac_status=$?
7837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7838 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007839 { (case "(($ac_try" in
7840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7841 *) ac_try_echo=$ac_try;;
7842esac
7843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7844 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 ac_status=$?
7846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7847 (exit $ac_status); }; }; then
7848 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007849else
Martin v. Löwis11437992002-04-12 09:54:03 +00007850 echo "$as_me: program exited with status $ac_status" >&5
7851echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007852sed 's/^/| /' conftest.$ac_ext >&5
7853
Martin v. Löwis11437992002-04-12 09:54:03 +00007854( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007855if test "$ac_cv_type_int" = yes; then
7856 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007857See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007858echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007859See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860 { (exit 77); exit 77; }; }
7861 else
7862 ac_cv_sizeof_int=0
7863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865rm -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 +00007866fi
7867rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7870echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7871
7872
7873
Martin v. Löwis11437992002-04-12 09:54:03 +00007874cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007875#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007876_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007877
7878
Martin v. Löwiseba40652007-08-30 20:10:57 +00007879{ echo "$as_me:$LINENO: checking for long" >&5
7880echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007881if test "${ac_cv_type_long+set}" = set; then
7882 echo $ECHO_N "(cached) $ECHO_C" >&6
7883else
7884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007885/* confdefs.h. */
7886_ACEOF
7887cat confdefs.h >>conftest.$ac_ext
7888cat >>conftest.$ac_ext <<_ACEOF
7889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007891typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007892int
7893main ()
7894{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007895if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007896 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 return 0;
7899 ;
7900 return 0;
7901}
7902_ACEOF
7903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007904if { (ac_try="$ac_compile"
7905case "(($ac_try" in
7906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7907 *) ac_try_echo=$ac_try;;
7908esac
7909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007912 grep -v '^ *+' conftest.er1 >conftest.err
7913 rm -f conftest.er1
7914 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007916 (exit $ac_status); } && {
7917 test -z "$ac_c_werror_flag" ||
7918 test ! -s conftest.err
7919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007920 ac_cv_type_long=yes
7921else
7922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007923sed 's/^/| /' conftest.$ac_ext >&5
7924
Martin v. Löwiseba40652007-08-30 20:10:57 +00007925 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007926fi
Brett Cannon19fab762007-06-02 03:02:29 +00007927
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7929fi
7930{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7931echo "${ECHO_T}$ac_cv_type_long" >&6; }
7932
7933# The cast to long int works around a bug in the HP C Compiler
7934# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7935# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7936# This bug is HP SR number 8606223364.
7937{ echo "$as_me:$LINENO: checking size of long" >&5
7938echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007939if test "${ac_cv_sizeof_long+set}" = set; then
7940 echo $ECHO_N "(cached) $ECHO_C" >&6
7941else
Martin v. Löwis11437992002-04-12 09:54:03 +00007942 if test "$cross_compiling" = yes; then
7943 # Depending upon the size, compute the lo and hi bounds.
7944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007945/* confdefs.h. */
7946_ACEOF
7947cat confdefs.h >>conftest.$ac_ext
7948cat >>conftest.$ac_ext <<_ACEOF
7949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007950$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007951 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007952int
7953main ()
7954{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007955static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007956test_array [0] = 0
7957
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_lo=0 ac_mid=0
7980 while :; do
7981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007982/* confdefs.h. */
7983_ACEOF
7984cat confdefs.h >>conftest.$ac_ext
7985cat >>conftest.$ac_ext <<_ACEOF
7986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007987$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007988 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007989int
7990main ()
7991{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007992static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007993test_array [0] = 0
7994
7995 ;
7996 return 0;
7997}
7998_ACEOF
7999rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000if { (ac_try="$ac_compile"
8001case "(($ac_try" in
8002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8003 *) ac_try_echo=$ac_try;;
8004esac
8005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008008 grep -v '^ *+' conftest.er1 >conftest.err
8009 rm -f conftest.er1
8010 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008012 (exit $ac_status); } && {
8013 test -z "$ac_c_werror_flag" ||
8014 test ! -s conftest.err
8015 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_hi=$ac_mid; break
8017else
8018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008019sed 's/^/| /' conftest.$ac_ext >&5
8020
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021 ac_lo=`expr $ac_mid + 1`
8022 if test $ac_lo -le $ac_mid; then
8023 ac_lo= ac_hi=
8024 break
8025 fi
8026 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008028
8029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 done
8031else
8032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008033sed 's/^/| /' conftest.$ac_ext >&5
8034
Martin v. Löwiseba40652007-08-30 20:10:57 +00008035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008036/* confdefs.h. */
8037_ACEOF
8038cat confdefs.h >>conftest.$ac_ext
8039cat >>conftest.$ac_ext <<_ACEOF
8040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008041$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008042 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008043int
8044main ()
8045{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008046static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008047test_array [0] = 0
8048
8049 ;
8050 return 0;
8051}
8052_ACEOF
8053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054if { (ac_try="$ac_compile"
8055case "(($ac_try" in
8056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8057 *) ac_try_echo=$ac_try;;
8058esac
8059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008062 grep -v '^ *+' conftest.er1 >conftest.err
8063 rm -f conftest.er1
8064 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066 (exit $ac_status); } && {
8067 test -z "$ac_c_werror_flag" ||
8068 test ! -s conftest.err
8069 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 ac_hi=-1 ac_mid=-1
8071 while :; do
8072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008073/* confdefs.h. */
8074_ACEOF
8075cat confdefs.h >>conftest.$ac_ext
8076cat >>conftest.$ac_ext <<_ACEOF
8077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008078$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008079 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008080int
8081main ()
8082{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008083static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008084test_array [0] = 0
8085
8086 ;
8087 return 0;
8088}
8089_ACEOF
8090rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008091if { (ac_try="$ac_compile"
8092case "(($ac_try" in
8093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8094 *) ac_try_echo=$ac_try;;
8095esac
8096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008099 grep -v '^ *+' conftest.er1 >conftest.err
8100 rm -f conftest.er1
8101 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008103 (exit $ac_status); } && {
8104 test -z "$ac_c_werror_flag" ||
8105 test ! -s conftest.err
8106 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 ac_lo=$ac_mid; break
8108else
8109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008110sed 's/^/| /' conftest.$ac_ext >&5
8111
Martin v. Löwiseba40652007-08-30 20:10:57 +00008112 ac_hi=`expr '(' $ac_mid ')' - 1`
8113 if test $ac_mid -le $ac_hi; then
8114 ac_lo= ac_hi=
8115 break
8116 fi
8117 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119
8120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 done
8122else
8123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008124sed 's/^/| /' conftest.$ac_ext >&5
8125
Martin v. Löwiseba40652007-08-30 20:10:57 +00008126 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008128
8129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008131
8132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008133# Binary search between lo and hi bounds.
8134while test "x$ac_lo" != "x$ac_hi"; do
8135 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008137/* confdefs.h. */
8138_ACEOF
8139cat confdefs.h >>conftest.$ac_ext
8140cat >>conftest.$ac_ext <<_ACEOF
8141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008142$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008144int
8145main ()
8146{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008148test_array [0] = 0
8149
8150 ;
8151 return 0;
8152}
8153_ACEOF
8154rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155if { (ac_try="$ac_compile"
8156case "(($ac_try" in
8157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8158 *) ac_try_echo=$ac_try;;
8159esac
8160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008163 grep -v '^ *+' conftest.er1 >conftest.err
8164 rm -f conftest.er1
8165 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167 (exit $ac_status); } && {
8168 test -z "$ac_c_werror_flag" ||
8169 test ! -s conftest.err
8170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 ac_hi=$ac_mid
8172else
8173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008174sed 's/^/| /' conftest.$ac_ext >&5
8175
Martin v. Löwiseba40652007-08-30 20:10:57 +00008176 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00008180done
8181case $ac_lo in
8182?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008183'') if test "$ac_cv_type_long" = yes; then
8184 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008185See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008186echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008187See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188 { (exit 77); exit 77; }; }
8189 else
8190 ac_cv_sizeof_long=0
8191 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008192esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008193else
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008195/* confdefs.h. */
8196_ACEOF
8197cat confdefs.h >>conftest.$ac_ext
8198cat >>conftest.$ac_ext <<_ACEOF
8199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008200$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008201 typedef long ac__type_sizeof_;
8202static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8203static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008204#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008205#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
8207main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008208{
Martin v. Löwis11437992002-04-12 09:54:03 +00008209
8210 FILE *f = fopen ("conftest.val", "w");
8211 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008212 return 1;
8213 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215 long int i = longval ();
8216 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8217 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 fprintf (f, "%ld\n", i);
8219 }
8220 else
8221 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008222 unsigned long int i = ulongval ();
8223 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8224 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 fprintf (f, "%lu\n", i);
8226 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008227 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
8229 ;
8230 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008231}
Martin v. Löwis11437992002-04-12 09:54:03 +00008232_ACEOF
8233rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008234if { (ac_try="$ac_link"
8235case "(($ac_try" in
8236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8237 *) ac_try_echo=$ac_try;;
8238esac
8239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8240 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008241 ac_status=$?
8242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8243 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008244 { (case "(($ac_try" in
8245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8246 *) ac_try_echo=$ac_try;;
8247esac
8248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8249 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008250 ac_status=$?
8251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8252 (exit $ac_status); }; }; then
8253 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008254else
Martin v. Löwis11437992002-04-12 09:54:03 +00008255 echo "$as_me: program exited with status $ac_status" >&5
8256echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008257sed 's/^/| /' conftest.$ac_ext >&5
8258
Martin v. Löwis11437992002-04-12 09:54:03 +00008259( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008260if test "$ac_cv_type_long" = yes; then
8261 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008262See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008263echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008264See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265 { (exit 77); exit 77; }; }
8266 else
8267 ac_cv_sizeof_long=0
8268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270rm -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 +00008271fi
8272rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8275echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
8276
8277
8278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008280#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008281_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008282
8283
Martin v. Löwiseba40652007-08-30 20:10:57 +00008284{ echo "$as_me:$LINENO: checking for void *" >&5
8285echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008286if test "${ac_cv_type_void_p+set}" = set; then
8287 echo $ECHO_N "(cached) $ECHO_C" >&6
8288else
8289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008290/* confdefs.h. */
8291_ACEOF
8292cat confdefs.h >>conftest.$ac_ext
8293cat >>conftest.$ac_ext <<_ACEOF
8294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008295$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008296typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008297int
8298main ()
8299{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008300if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008301 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008302if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 return 0;
8304 ;
8305 return 0;
8306}
8307_ACEOF
8308rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008309if { (ac_try="$ac_compile"
8310case "(($ac_try" in
8311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8312 *) ac_try_echo=$ac_try;;
8313esac
8314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8315 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008317 grep -v '^ *+' conftest.er1 >conftest.err
8318 rm -f conftest.er1
8319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008321 (exit $ac_status); } && {
8322 test -z "$ac_c_werror_flag" ||
8323 test ! -s conftest.err
8324 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008325 ac_cv_type_void_p=yes
8326else
8327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008328sed 's/^/| /' conftest.$ac_ext >&5
8329
Martin v. Löwiseba40652007-08-30 20:10:57 +00008330 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008331fi
Brett Cannon19fab762007-06-02 03:02:29 +00008332
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8334fi
8335{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8336echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8337
8338# The cast to long int works around a bug in the HP C Compiler
8339# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8340# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8341# This bug is HP SR number 8606223364.
8342{ echo "$as_me:$LINENO: checking size of void *" >&5
8343echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008344if test "${ac_cv_sizeof_void_p+set}" = set; then
8345 echo $ECHO_N "(cached) $ECHO_C" >&6
8346else
Martin v. Löwis11437992002-04-12 09:54:03 +00008347 if test "$cross_compiling" = yes; then
8348 # Depending upon the size, compute the lo and hi bounds.
8349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008350/* confdefs.h. */
8351_ACEOF
8352cat confdefs.h >>conftest.$ac_ext
8353cat >>conftest.$ac_ext <<_ACEOF
8354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008355$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008356 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008357int
8358main ()
8359{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008360static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008361test_array [0] = 0
8362
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_lo=0 ac_mid=0
8385 while :; do
8386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008387/* confdefs.h. */
8388_ACEOF
8389cat confdefs.h >>conftest.$ac_ext
8390cat >>conftest.$ac_ext <<_ACEOF
8391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008392$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008393 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008394int
8395main ()
8396{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008397static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008398test_array [0] = 0
8399
8400 ;
8401 return 0;
8402}
8403_ACEOF
8404rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008405if { (ac_try="$ac_compile"
8406case "(($ac_try" in
8407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8408 *) ac_try_echo=$ac_try;;
8409esac
8410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008413 grep -v '^ *+' conftest.er1 >conftest.err
8414 rm -f conftest.er1
8415 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008417 (exit $ac_status); } && {
8418 test -z "$ac_c_werror_flag" ||
8419 test ! -s conftest.err
8420 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 ac_hi=$ac_mid; break
8422else
8423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008424sed 's/^/| /' conftest.$ac_ext >&5
8425
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426 ac_lo=`expr $ac_mid + 1`
8427 if test $ac_lo -le $ac_mid; then
8428 ac_lo= ac_hi=
8429 break
8430 fi
8431 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008433
8434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 done
8436else
8437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008438sed 's/^/| /' conftest.$ac_ext >&5
8439
Martin v. Löwiseba40652007-08-30 20:10:57 +00008440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008441/* confdefs.h. */
8442_ACEOF
8443cat confdefs.h >>conftest.$ac_ext
8444cat >>conftest.$ac_ext <<_ACEOF
8445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008446$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008447 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008448int
8449main ()
8450{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008451static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008452test_array [0] = 0
8453
8454 ;
8455 return 0;
8456}
8457_ACEOF
8458rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459if { (ac_try="$ac_compile"
8460case "(($ac_try" in
8461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8462 *) ac_try_echo=$ac_try;;
8463esac
8464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008467 grep -v '^ *+' conftest.er1 >conftest.err
8468 rm -f conftest.er1
8469 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471 (exit $ac_status); } && {
8472 test -z "$ac_c_werror_flag" ||
8473 test ! -s conftest.err
8474 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_hi=-1 ac_mid=-1
8476 while :; do
8477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008478/* confdefs.h. */
8479_ACEOF
8480cat confdefs.h >>conftest.$ac_ext
8481cat >>conftest.$ac_ext <<_ACEOF
8482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008483$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008484 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008485int
8486main ()
8487{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008488static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008489test_array [0] = 0
8490
8491 ;
8492 return 0;
8493}
8494_ACEOF
8495rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008496if { (ac_try="$ac_compile"
8497case "(($ac_try" in
8498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8499 *) ac_try_echo=$ac_try;;
8500esac
8501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008504 grep -v '^ *+' conftest.er1 >conftest.err
8505 rm -f conftest.er1
8506 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008508 (exit $ac_status); } && {
8509 test -z "$ac_c_werror_flag" ||
8510 test ! -s conftest.err
8511 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ac_lo=$ac_mid; break
8513else
8514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008515sed 's/^/| /' conftest.$ac_ext >&5
8516
Martin v. Löwiseba40652007-08-30 20:10:57 +00008517 ac_hi=`expr '(' $ac_mid ')' - 1`
8518 if test $ac_mid -le $ac_hi; then
8519 ac_lo= ac_hi=
8520 break
8521 fi
8522 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524
8525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 done
8527else
8528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008529sed 's/^/| /' conftest.$ac_ext >&5
8530
Martin v. Löwiseba40652007-08-30 20:10:57 +00008531 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008533
8534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008536
8537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008538# Binary search between lo and hi bounds.
8539while test "x$ac_lo" != "x$ac_hi"; do
8540 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008542/* confdefs.h. */
8543_ACEOF
8544cat confdefs.h >>conftest.$ac_ext
8545cat >>conftest.$ac_ext <<_ACEOF
8546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008547$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008548 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008549int
8550main ()
8551{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008553test_array [0] = 0
8554
8555 ;
8556 return 0;
8557}
8558_ACEOF
8559rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008560if { (ac_try="$ac_compile"
8561case "(($ac_try" in
8562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8563 *) ac_try_echo=$ac_try;;
8564esac
8565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008568 grep -v '^ *+' conftest.er1 >conftest.err
8569 rm -f conftest.er1
8570 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572 (exit $ac_status); } && {
8573 test -z "$ac_c_werror_flag" ||
8574 test ! -s conftest.err
8575 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 ac_hi=$ac_mid
8577else
8578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008579sed 's/^/| /' conftest.$ac_ext >&5
8580
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00008585done
8586case $ac_lo in
8587?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008588'') if test "$ac_cv_type_void_p" = yes; then
8589 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008590See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008591echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008592See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593 { (exit 77); exit 77; }; }
8594 else
8595 ac_cv_sizeof_void_p=0
8596 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008597esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008598else
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008600/* confdefs.h. */
8601_ACEOF
8602cat confdefs.h >>conftest.$ac_ext
8603cat >>conftest.$ac_ext <<_ACEOF
8604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008605$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008606 typedef void * ac__type_sizeof_;
8607static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8608static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008609#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008610#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008611int
8612main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008613{
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
8615 FILE *f = fopen ("conftest.val", "w");
8616 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008617 return 1;
8618 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620 long int i = longval ();
8621 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8622 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 fprintf (f, "%ld\n", i);
8624 }
8625 else
8626 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008627 unsigned long int i = ulongval ();
8628 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8629 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 fprintf (f, "%lu\n", i);
8631 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008632 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008633
8634 ;
8635 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008636}
Martin v. Löwis11437992002-04-12 09:54:03 +00008637_ACEOF
8638rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008639if { (ac_try="$ac_link"
8640case "(($ac_try" in
8641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8642 *) ac_try_echo=$ac_try;;
8643esac
8644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8645 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 ac_status=$?
8647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8648 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008649 { (case "(($ac_try" in
8650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8651 *) ac_try_echo=$ac_try;;
8652esac
8653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8654 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 ac_status=$?
8656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8657 (exit $ac_status); }; }; then
8658 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008659else
Martin v. Löwis11437992002-04-12 09:54:03 +00008660 echo "$as_me: program exited with status $ac_status" >&5
8661echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008662sed 's/^/| /' conftest.$ac_ext >&5
8663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008665if test "$ac_cv_type_void_p" = yes; then
8666 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008667See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008668echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008669See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670 { (exit 77); exit 77; }; }
8671 else
8672 ac_cv_sizeof_void_p=0
8673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675rm -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 +00008676fi
8677rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8680echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8681
8682
8683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008685#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008686_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008687
8688
Martin v. Löwiseba40652007-08-30 20:10:57 +00008689{ echo "$as_me:$LINENO: checking for short" >&5
8690echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008691if test "${ac_cv_type_short+set}" = set; then
8692 echo $ECHO_N "(cached) $ECHO_C" >&6
8693else
8694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008695/* confdefs.h. */
8696_ACEOF
8697cat confdefs.h >>conftest.$ac_ext
8698cat >>conftest.$ac_ext <<_ACEOF
8699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008700$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008702int
8703main ()
8704{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008705if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008706 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 return 0;
8709 ;
8710 return 0;
8711}
8712_ACEOF
8713rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008714if { (ac_try="$ac_compile"
8715case "(($ac_try" in
8716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8717 *) ac_try_echo=$ac_try;;
8718esac
8719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8720 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008722 grep -v '^ *+' conftest.er1 >conftest.err
8723 rm -f conftest.er1
8724 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008726 (exit $ac_status); } && {
8727 test -z "$ac_c_werror_flag" ||
8728 test ! -s conftest.err
8729 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 ac_cv_type_short=yes
8731else
8732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008733sed 's/^/| /' conftest.$ac_ext >&5
8734
Martin v. Löwiseba40652007-08-30 20:10:57 +00008735 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008736fi
Brett Cannon19fab762007-06-02 03:02:29 +00008737
Martin v. Löwiseba40652007-08-30 20:10:57 +00008738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8739fi
8740{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8741echo "${ECHO_T}$ac_cv_type_short" >&6; }
8742
8743# The cast to long int works around a bug in the HP C Compiler
8744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8746# This bug is HP SR number 8606223364.
8747{ echo "$as_me:$LINENO: checking size of short" >&5
8748echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008749if test "${ac_cv_sizeof_short+set}" = set; then
8750 echo $ECHO_N "(cached) $ECHO_C" >&6
8751else
Martin v. Löwis11437992002-04-12 09:54:03 +00008752 if test "$cross_compiling" = yes; then
8753 # Depending upon the size, compute the lo and hi bounds.
8754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008755/* confdefs.h. */
8756_ACEOF
8757cat confdefs.h >>conftest.$ac_ext
8758cat >>conftest.$ac_ext <<_ACEOF
8759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008760$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008761 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008762int
8763main ()
8764{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008765static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008766test_array [0] = 0
8767
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_lo=0 ac_mid=0
8790 while :; do
8791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008792/* confdefs.h. */
8793_ACEOF
8794cat confdefs.h >>conftest.$ac_ext
8795cat >>conftest.$ac_ext <<_ACEOF
8796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008797$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008798 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008799int
8800main ()
8801{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008803test_array [0] = 0
8804
8805 ;
8806 return 0;
8807}
8808_ACEOF
8809rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810if { (ac_try="$ac_compile"
8811case "(($ac_try" in
8812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8813 *) ac_try_echo=$ac_try;;
8814esac
8815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008818 grep -v '^ *+' conftest.er1 >conftest.err
8819 rm -f conftest.er1
8820 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008822 (exit $ac_status); } && {
8823 test -z "$ac_c_werror_flag" ||
8824 test ! -s conftest.err
8825 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ac_hi=$ac_mid; break
8827else
8828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008829sed 's/^/| /' conftest.$ac_ext >&5
8830
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831 ac_lo=`expr $ac_mid + 1`
8832 if test $ac_lo -le $ac_mid; then
8833 ac_lo= ac_hi=
8834 break
8835 fi
8836 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008838
8839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008840 done
8841else
8842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008843sed 's/^/| /' conftest.$ac_ext >&5
8844
Martin v. Löwiseba40652007-08-30 20:10:57 +00008845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008846/* confdefs.h. */
8847_ACEOF
8848cat confdefs.h >>conftest.$ac_ext
8849cat >>conftest.$ac_ext <<_ACEOF
8850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008851$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008852 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008853int
8854main ()
8855{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008856static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008857test_array [0] = 0
8858
8859 ;
8860 return 0;
8861}
8862_ACEOF
8863rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008864if { (ac_try="$ac_compile"
8865case "(($ac_try" in
8866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8867 *) ac_try_echo=$ac_try;;
8868esac
8869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8870 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008872 grep -v '^ *+' conftest.er1 >conftest.err
8873 rm -f conftest.er1
8874 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876 (exit $ac_status); } && {
8877 test -z "$ac_c_werror_flag" ||
8878 test ! -s conftest.err
8879 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ac_hi=-1 ac_mid=-1
8881 while :; do
8882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008883/* confdefs.h. */
8884_ACEOF
8885cat confdefs.h >>conftest.$ac_ext
8886cat >>conftest.$ac_ext <<_ACEOF
8887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008889 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008890int
8891main ()
8892{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008894test_array [0] = 0
8895
8896 ;
8897 return 0;
8898}
8899_ACEOF
8900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008901if { (ac_try="$ac_compile"
8902case "(($ac_try" in
8903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8904 *) ac_try_echo=$ac_try;;
8905esac
8906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008909 grep -v '^ *+' conftest.er1 >conftest.err
8910 rm -f conftest.er1
8911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008913 (exit $ac_status); } && {
8914 test -z "$ac_c_werror_flag" ||
8915 test ! -s conftest.err
8916 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 ac_lo=$ac_mid; break
8918else
8919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008920sed 's/^/| /' conftest.$ac_ext >&5
8921
Martin v. Löwiseba40652007-08-30 20:10:57 +00008922 ac_hi=`expr '(' $ac_mid ')' - 1`
8923 if test $ac_mid -le $ac_hi; then
8924 ac_lo= ac_hi=
8925 break
8926 fi
8927 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929
8930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008931 done
8932else
8933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008934sed 's/^/| /' conftest.$ac_ext >&5
8935
Martin v. Löwiseba40652007-08-30 20:10:57 +00008936 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938
8939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008941
8942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008943# Binary search between lo and hi bounds.
8944while test "x$ac_lo" != "x$ac_hi"; do
8945 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008947/* confdefs.h. */
8948_ACEOF
8949cat confdefs.h >>conftest.$ac_ext
8950cat >>conftest.$ac_ext <<_ACEOF
8951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008952$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008954int
8955main ()
8956{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008958test_array [0] = 0
8959
8960 ;
8961 return 0;
8962}
8963_ACEOF
8964rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008965if { (ac_try="$ac_compile"
8966case "(($ac_try" in
8967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8968 *) ac_try_echo=$ac_try;;
8969esac
8970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008973 grep -v '^ *+' conftest.er1 >conftest.err
8974 rm -f conftest.er1
8975 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977 (exit $ac_status); } && {
8978 test -z "$ac_c_werror_flag" ||
8979 test ! -s conftest.err
8980 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ac_hi=$ac_mid
8982else
8983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008984sed 's/^/| /' conftest.$ac_ext >&5
8985
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00008990done
8991case $ac_lo in
8992?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008993'') if test "$ac_cv_type_short" = yes; then
8994 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008995See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008996echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008997See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998 { (exit 77); exit 77; }; }
8999 else
9000 ac_cv_sizeof_short=0
9001 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009002esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009003else
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009005/* confdefs.h. */
9006_ACEOF
9007cat confdefs.h >>conftest.$ac_ext
9008cat >>conftest.$ac_ext <<_ACEOF
9009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009010$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009011 typedef short ac__type_sizeof_;
9012static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9013static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009014#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009015#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009016int
9017main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009018{
Martin v. Löwis11437992002-04-12 09:54:03 +00009019
9020 FILE *f = fopen ("conftest.val", "w");
9021 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009022 return 1;
9023 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025 long int i = longval ();
9026 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9027 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 fprintf (f, "%ld\n", i);
9029 }
9030 else
9031 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009032 unsigned long int i = ulongval ();
9033 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9034 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 fprintf (f, "%lu\n", i);
9036 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009037 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009038
9039 ;
9040 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009041}
Martin v. Löwis11437992002-04-12 09:54:03 +00009042_ACEOF
9043rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009044if { (ac_try="$ac_link"
9045case "(($ac_try" in
9046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9047 *) ac_try_echo=$ac_try;;
9048esac
9049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9050 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009051 ac_status=$?
9052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009054 { (case "(($ac_try" in
9055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9056 *) ac_try_echo=$ac_try;;
9057esac
9058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9059 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 ac_status=$?
9061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9062 (exit $ac_status); }; }; then
9063 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009064else
Martin v. Löwis11437992002-04-12 09:54:03 +00009065 echo "$as_me: program exited with status $ac_status" >&5
9066echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009067sed 's/^/| /' conftest.$ac_ext >&5
9068
Martin v. Löwis11437992002-04-12 09:54:03 +00009069( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070if test "$ac_cv_type_short" = yes; then
9071 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009072See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009073echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009074See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075 { (exit 77); exit 77; }; }
9076 else
9077 ac_cv_sizeof_short=0
9078 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080rm -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 +00009081fi
9082rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9085echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
9086
9087
9088
Martin v. Löwis11437992002-04-12 09:54:03 +00009089cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009090#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009091_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009092
9093
Martin v. Löwiseba40652007-08-30 20:10:57 +00009094{ echo "$as_me:$LINENO: checking for float" >&5
9095echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009096if test "${ac_cv_type_float+set}" = set; then
9097 echo $ECHO_N "(cached) $ECHO_C" >&6
9098else
9099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009100/* confdefs.h. */
9101_ACEOF
9102cat confdefs.h >>conftest.$ac_ext
9103cat >>conftest.$ac_ext <<_ACEOF
9104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009105$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009106typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009107int
9108main ()
9109{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009110if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009111 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 return 0;
9114 ;
9115 return 0;
9116}
9117_ACEOF
9118rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009119if { (ac_try="$ac_compile"
9120case "(($ac_try" in
9121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9122 *) ac_try_echo=$ac_try;;
9123esac
9124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9125 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009127 grep -v '^ *+' conftest.er1 >conftest.err
9128 rm -f conftest.er1
9129 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009131 (exit $ac_status); } && {
9132 test -z "$ac_c_werror_flag" ||
9133 test ! -s conftest.err
9134 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009135 ac_cv_type_float=yes
9136else
9137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009138sed 's/^/| /' conftest.$ac_ext >&5
9139
Martin v. Löwiseba40652007-08-30 20:10:57 +00009140 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009141fi
Brett Cannon19fab762007-06-02 03:02:29 +00009142
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9144fi
9145{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9146echo "${ECHO_T}$ac_cv_type_float" >&6; }
9147
9148# The cast to long int works around a bug in the HP C Compiler
9149# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9150# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9151# This bug is HP SR number 8606223364.
9152{ echo "$as_me:$LINENO: checking size of float" >&5
9153echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009154if test "${ac_cv_sizeof_float+set}" = set; then
9155 echo $ECHO_N "(cached) $ECHO_C" >&6
9156else
Martin v. Löwis11437992002-04-12 09:54:03 +00009157 if test "$cross_compiling" = yes; then
9158 # Depending upon the size, compute the lo and hi bounds.
9159cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009160/* confdefs.h. */
9161_ACEOF
9162cat confdefs.h >>conftest.$ac_ext
9163cat >>conftest.$ac_ext <<_ACEOF
9164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009165$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009166 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009167int
9168main ()
9169{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009170static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009171test_array [0] = 0
9172
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_lo=0 ac_mid=0
9195 while :; do
9196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009197/* confdefs.h. */
9198_ACEOF
9199cat confdefs.h >>conftest.$ac_ext
9200cat >>conftest.$ac_ext <<_ACEOF
9201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009202$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009203 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009204int
9205main ()
9206{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009207static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009208test_array [0] = 0
9209
9210 ;
9211 return 0;
9212}
9213_ACEOF
9214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215if { (ac_try="$ac_compile"
9216case "(($ac_try" in
9217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9218 *) ac_try_echo=$ac_try;;
9219esac
9220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009223 grep -v '^ *+' conftest.er1 >conftest.err
9224 rm -f conftest.er1
9225 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009227 (exit $ac_status); } && {
9228 test -z "$ac_c_werror_flag" ||
9229 test ! -s conftest.err
9230 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 ac_hi=$ac_mid; break
9232else
9233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009234sed 's/^/| /' conftest.$ac_ext >&5
9235
Martin v. Löwiseba40652007-08-30 20:10:57 +00009236 ac_lo=`expr $ac_mid + 1`
9237 if test $ac_lo -le $ac_mid; then
9238 ac_lo= ac_hi=
9239 break
9240 fi
9241 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009243
9244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 done
9246else
9247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009248sed 's/^/| /' conftest.$ac_ext >&5
9249
Martin v. Löwiseba40652007-08-30 20:10:57 +00009250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009251/* confdefs.h. */
9252_ACEOF
9253cat confdefs.h >>conftest.$ac_ext
9254cat >>conftest.$ac_ext <<_ACEOF
9255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009256$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009257 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009258int
9259main ()
9260{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009262test_array [0] = 0
9263
9264 ;
9265 return 0;
9266}
9267_ACEOF
9268rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009269if { (ac_try="$ac_compile"
9270case "(($ac_try" in
9271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9272 *) ac_try_echo=$ac_try;;
9273esac
9274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009277 grep -v '^ *+' conftest.er1 >conftest.err
9278 rm -f conftest.er1
9279 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009281 (exit $ac_status); } && {
9282 test -z "$ac_c_werror_flag" ||
9283 test ! -s conftest.err
9284 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 ac_hi=-1 ac_mid=-1
9286 while :; do
9287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009288/* confdefs.h. */
9289_ACEOF
9290cat confdefs.h >>conftest.$ac_ext
9291cat >>conftest.$ac_ext <<_ACEOF
9292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009293$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009294 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009295int
9296main ()
9297{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009299test_array [0] = 0
9300
9301 ;
9302 return 0;
9303}
9304_ACEOF
9305rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306if { (ac_try="$ac_compile"
9307case "(($ac_try" in
9308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9309 *) ac_try_echo=$ac_try;;
9310esac
9311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009314 grep -v '^ *+' conftest.er1 >conftest.err
9315 rm -f conftest.er1
9316 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009318 (exit $ac_status); } && {
9319 test -z "$ac_c_werror_flag" ||
9320 test ! -s conftest.err
9321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 ac_lo=$ac_mid; break
9323else
9324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009325sed 's/^/| /' conftest.$ac_ext >&5
9326
Martin v. Löwiseba40652007-08-30 20:10:57 +00009327 ac_hi=`expr '(' $ac_mid ')' - 1`
9328 if test $ac_mid -le $ac_hi; then
9329 ac_lo= ac_hi=
9330 break
9331 fi
9332 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334
9335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009336 done
9337else
9338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009339sed 's/^/| /' conftest.$ac_ext >&5
9340
Martin v. Löwiseba40652007-08-30 20:10:57 +00009341 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343
9344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009346
9347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009348# Binary search between lo and hi bounds.
9349while test "x$ac_lo" != "x$ac_hi"; do
9350 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009352/* confdefs.h. */
9353_ACEOF
9354cat confdefs.h >>conftest.$ac_ext
9355cat >>conftest.$ac_ext <<_ACEOF
9356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009357$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009358 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009359int
9360main ()
9361{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009363test_array [0] = 0
9364
9365 ;
9366 return 0;
9367}
9368_ACEOF
9369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009370if { (ac_try="$ac_compile"
9371case "(($ac_try" in
9372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9373 *) ac_try_echo=$ac_try;;
9374esac
9375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009378 grep -v '^ *+' conftest.er1 >conftest.err
9379 rm -f conftest.er1
9380 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382 (exit $ac_status); } && {
9383 test -z "$ac_c_werror_flag" ||
9384 test ! -s conftest.err
9385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 ac_hi=$ac_mid
9387else
9388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009389sed 's/^/| /' conftest.$ac_ext >&5
9390
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00009395done
9396case $ac_lo in
9397?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398'') if test "$ac_cv_type_float" = yes; then
9399 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009400See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009401echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009402See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403 { (exit 77); exit 77; }; }
9404 else
9405 ac_cv_sizeof_float=0
9406 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009407esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009408else
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009410/* confdefs.h. */
9411_ACEOF
9412cat confdefs.h >>conftest.$ac_ext
9413cat >>conftest.$ac_ext <<_ACEOF
9414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009415$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009416 typedef float ac__type_sizeof_;
9417static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9418static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009419#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009420#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009421int
9422main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009423{
Martin v. Löwis11437992002-04-12 09:54:03 +00009424
9425 FILE *f = fopen ("conftest.val", "w");
9426 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009427 return 1;
9428 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430 long int i = longval ();
9431 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9432 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 fprintf (f, "%ld\n", i);
9434 }
9435 else
9436 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009437 unsigned long int i = ulongval ();
9438 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9439 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 fprintf (f, "%lu\n", i);
9441 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009442 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009443
9444 ;
9445 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009446}
Martin v. Löwis11437992002-04-12 09:54:03 +00009447_ACEOF
9448rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009449if { (ac_try="$ac_link"
9450case "(($ac_try" in
9451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9452 *) ac_try_echo=$ac_try;;
9453esac
9454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9455 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 ac_status=$?
9457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9458 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009459 { (case "(($ac_try" in
9460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9461 *) ac_try_echo=$ac_try;;
9462esac
9463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9464 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 ac_status=$?
9466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9467 (exit $ac_status); }; }; then
9468 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009469else
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 echo "$as_me: program exited with status $ac_status" >&5
9471echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009472sed 's/^/| /' conftest.$ac_ext >&5
9473
Martin v. Löwis11437992002-04-12 09:54:03 +00009474( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475if test "$ac_cv_type_float" = yes; then
9476 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009477See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009478echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009479See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480 { (exit 77); exit 77; }; }
9481 else
9482 ac_cv_sizeof_float=0
9483 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485rm -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 +00009486fi
9487rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9490echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9491
9492
9493
Martin v. Löwis11437992002-04-12 09:54:03 +00009494cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009495#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009496_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009497
9498
Martin v. Löwiseba40652007-08-30 20:10:57 +00009499{ echo "$as_me:$LINENO: checking for double" >&5
9500echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009501if test "${ac_cv_type_double+set}" = set; then
9502 echo $ECHO_N "(cached) $ECHO_C" >&6
9503else
9504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009505/* confdefs.h. */
9506_ACEOF
9507cat confdefs.h >>conftest.$ac_ext
9508cat >>conftest.$ac_ext <<_ACEOF
9509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009510$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009511typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009512int
9513main ()
9514{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009515if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 return 0;
9519 ;
9520 return 0;
9521}
9522_ACEOF
9523rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009524if { (ac_try="$ac_compile"
9525case "(($ac_try" in
9526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9527 *) ac_try_echo=$ac_try;;
9528esac
9529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9530 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009532 grep -v '^ *+' conftest.er1 >conftest.err
9533 rm -f conftest.er1
9534 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009536 (exit $ac_status); } && {
9537 test -z "$ac_c_werror_flag" ||
9538 test ! -s conftest.err
9539 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 ac_cv_type_double=yes
9541else
9542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009543sed 's/^/| /' conftest.$ac_ext >&5
9544
Martin v. Löwiseba40652007-08-30 20:10:57 +00009545 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009546fi
Brett Cannon19fab762007-06-02 03:02:29 +00009547
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9549fi
9550{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9551echo "${ECHO_T}$ac_cv_type_double" >&6; }
9552
9553# The cast to long int works around a bug in the HP C Compiler
9554# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9555# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9556# This bug is HP SR number 8606223364.
9557{ echo "$as_me:$LINENO: checking size of double" >&5
9558echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009559if test "${ac_cv_sizeof_double+set}" = set; then
9560 echo $ECHO_N "(cached) $ECHO_C" >&6
9561else
Martin v. Löwis11437992002-04-12 09:54:03 +00009562 if test "$cross_compiling" = yes; then
9563 # Depending upon the size, compute the lo and hi bounds.
9564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009565/* confdefs.h. */
9566_ACEOF
9567cat confdefs.h >>conftest.$ac_ext
9568cat >>conftest.$ac_ext <<_ACEOF
9569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009570$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009571 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009572int
9573main ()
9574{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009576test_array [0] = 0
9577
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_lo=0 ac_mid=0
9600 while :; do
9601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009602/* confdefs.h. */
9603_ACEOF
9604cat confdefs.h >>conftest.$ac_ext
9605cat >>conftest.$ac_ext <<_ACEOF
9606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009607$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009608 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009609int
9610main ()
9611{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009612static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009613test_array [0] = 0
9614
9615 ;
9616 return 0;
9617}
9618_ACEOF
9619rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620if { (ac_try="$ac_compile"
9621case "(($ac_try" in
9622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9623 *) ac_try_echo=$ac_try;;
9624esac
9625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9626 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009628 grep -v '^ *+' conftest.er1 >conftest.err
9629 rm -f conftest.er1
9630 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009632 (exit $ac_status); } && {
9633 test -z "$ac_c_werror_flag" ||
9634 test ! -s conftest.err
9635 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_hi=$ac_mid; break
9637else
9638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009639sed 's/^/| /' conftest.$ac_ext >&5
9640
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641 ac_lo=`expr $ac_mid + 1`
9642 if test $ac_lo -le $ac_mid; then
9643 ac_lo= ac_hi=
9644 break
9645 fi
9646 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009648
9649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 done
9651else
9652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009653sed 's/^/| /' conftest.$ac_ext >&5
9654
Martin v. Löwiseba40652007-08-30 20:10:57 +00009655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009656/* confdefs.h. */
9657_ACEOF
9658cat confdefs.h >>conftest.$ac_ext
9659cat >>conftest.$ac_ext <<_ACEOF
9660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009661$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009662 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009663int
9664main ()
9665{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009666static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009667test_array [0] = 0
9668
9669 ;
9670 return 0;
9671}
9672_ACEOF
9673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674if { (ac_try="$ac_compile"
9675case "(($ac_try" in
9676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9677 *) ac_try_echo=$ac_try;;
9678esac
9679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009682 grep -v '^ *+' conftest.er1 >conftest.err
9683 rm -f conftest.er1
9684 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009686 (exit $ac_status); } && {
9687 test -z "$ac_c_werror_flag" ||
9688 test ! -s conftest.err
9689 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ac_hi=-1 ac_mid=-1
9691 while :; do
9692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009693/* confdefs.h. */
9694_ACEOF
9695cat confdefs.h >>conftest.$ac_ext
9696cat >>conftest.$ac_ext <<_ACEOF
9697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009698$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009699 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009703static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009704test_array [0] = 0
9705
9706 ;
9707 return 0;
9708}
9709_ACEOF
9710rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009711if { (ac_try="$ac_compile"
9712case "(($ac_try" in
9713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9714 *) ac_try_echo=$ac_try;;
9715esac
9716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009719 grep -v '^ *+' conftest.er1 >conftest.err
9720 rm -f conftest.er1
9721 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009723 (exit $ac_status); } && {
9724 test -z "$ac_c_werror_flag" ||
9725 test ! -s conftest.err
9726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ac_lo=$ac_mid; break
9728else
9729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009730sed 's/^/| /' conftest.$ac_ext >&5
9731
Martin v. Löwiseba40652007-08-30 20:10:57 +00009732 ac_hi=`expr '(' $ac_mid ')' - 1`
9733 if test $ac_mid -le $ac_hi; then
9734 ac_lo= ac_hi=
9735 break
9736 fi
9737 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739
9740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 done
9742else
9743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009744sed 's/^/| /' conftest.$ac_ext >&5
9745
Martin v. Löwiseba40652007-08-30 20:10:57 +00009746 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009748
9749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009751
9752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009753# Binary search between lo and hi bounds.
9754while test "x$ac_lo" != "x$ac_hi"; do
9755 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009757/* confdefs.h. */
9758_ACEOF
9759cat confdefs.h >>conftest.$ac_ext
9760cat >>conftest.$ac_ext <<_ACEOF
9761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009762$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009763 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009764int
9765main ()
9766{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009767static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009768test_array [0] = 0
9769
9770 ;
9771 return 0;
9772}
9773_ACEOF
9774rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775if { (ac_try="$ac_compile"
9776case "(($ac_try" in
9777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9778 *) ac_try_echo=$ac_try;;
9779esac
9780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009783 grep -v '^ *+' conftest.er1 >conftest.err
9784 rm -f conftest.er1
9785 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009787 (exit $ac_status); } && {
9788 test -z "$ac_c_werror_flag" ||
9789 test ! -s conftest.err
9790 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 ac_hi=$ac_mid
9792else
9793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009794sed 's/^/| /' conftest.$ac_ext >&5
9795
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00009800done
9801case $ac_lo in
9802?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009803'') if test "$ac_cv_type_double" = yes; then
9804 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009805See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009806echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009807See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808 { (exit 77); exit 77; }; }
9809 else
9810 ac_cv_sizeof_double=0
9811 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009812esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009813else
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009815/* confdefs.h. */
9816_ACEOF
9817cat confdefs.h >>conftest.$ac_ext
9818cat >>conftest.$ac_ext <<_ACEOF
9819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009821 typedef double ac__type_sizeof_;
9822static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9823static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009824#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009825#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009826int
9827main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009828{
Martin v. Löwis11437992002-04-12 09:54:03 +00009829
9830 FILE *f = fopen ("conftest.val", "w");
9831 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009832 return 1;
9833 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835 long int i = longval ();
9836 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9837 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 fprintf (f, "%ld\n", i);
9839 }
9840 else
9841 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009842 unsigned long int i = ulongval ();
9843 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9844 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 fprintf (f, "%lu\n", i);
9846 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009848
9849 ;
9850 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009851}
Martin v. Löwis11437992002-04-12 09:54:03 +00009852_ACEOF
9853rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009854if { (ac_try="$ac_link"
9855case "(($ac_try" in
9856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9857 *) ac_try_echo=$ac_try;;
9858esac
9859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9860 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ac_status=$?
9862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9863 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009864 { (case "(($ac_try" in
9865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9866 *) ac_try_echo=$ac_try;;
9867esac
9868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9869 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ac_status=$?
9871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9872 (exit $ac_status); }; }; then
9873 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009874else
Martin v. Löwis11437992002-04-12 09:54:03 +00009875 echo "$as_me: program exited with status $ac_status" >&5
9876echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009877sed 's/^/| /' conftest.$ac_ext >&5
9878
Martin v. Löwis11437992002-04-12 09:54:03 +00009879( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009880if test "$ac_cv_type_double" = yes; then
9881 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009882See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009883echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009884See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885 { (exit 77); exit 77; }; }
9886 else
9887 ac_cv_sizeof_double=0
9888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890rm -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 +00009891fi
9892rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9895echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9896
9897
9898
Martin v. Löwis11437992002-04-12 09:54:03 +00009899cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009900#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009901_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009902
9903
Martin v. Löwiseba40652007-08-30 20:10:57 +00009904{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9905echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009906if test "${ac_cv_type_fpos_t+set}" = set; then
9907 echo $ECHO_N "(cached) $ECHO_C" >&6
9908else
9909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009910/* confdefs.h. */
9911_ACEOF
9912cat confdefs.h >>conftest.$ac_ext
9913cat >>conftest.$ac_ext <<_ACEOF
9914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009915$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009916typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009917int
9918main ()
9919{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009920if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 return 0;
9924 ;
9925 return 0;
9926}
9927_ACEOF
9928rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009929if { (ac_try="$ac_compile"
9930case "(($ac_try" in
9931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9932 *) ac_try_echo=$ac_try;;
9933esac
9934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009937 grep -v '^ *+' conftest.er1 >conftest.err
9938 rm -f conftest.er1
9939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009941 (exit $ac_status); } && {
9942 test -z "$ac_c_werror_flag" ||
9943 test ! -s conftest.err
9944 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 ac_cv_type_fpos_t=yes
9946else
9947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009948sed 's/^/| /' conftest.$ac_ext >&5
9949
Martin v. Löwiseba40652007-08-30 20:10:57 +00009950 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009951fi
Brett Cannon19fab762007-06-02 03:02:29 +00009952
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9954fi
9955{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9956echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9957
9958# The cast to long int works around a bug in the HP C Compiler
9959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9961# This bug is HP SR number 8606223364.
9962{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9963echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009964if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9965 echo $ECHO_N "(cached) $ECHO_C" >&6
9966else
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 if test "$cross_compiling" = yes; then
9968 # Depending upon the size, compute the lo and hi bounds.
9969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009970/* confdefs.h. */
9971_ACEOF
9972cat confdefs.h >>conftest.$ac_ext
9973cat >>conftest.$ac_ext <<_ACEOF
9974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009975$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009976 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009977int
9978main ()
9979{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009980static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009981test_array [0] = 0
9982
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öwis11437992002-04-12 09:54:03 +00009995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009996 grep -v '^ *+' conftest.er1 >conftest.err
9997 rm -f conftest.er1
9998 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 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öwis11437992002-04-12 09:54:03 +000010004 ac_lo=0 ac_mid=0
10005 while :; do
10006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010007/* confdefs.h. */
10008_ACEOF
10009cat confdefs.h >>conftest.$ac_ext
10010cat >>conftest.$ac_ext <<_ACEOF
10011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010012$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010013 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010014int
10015main ()
10016{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010017static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010018test_array [0] = 0
10019
10020 ;
10021 return 0;
10022}
10023_ACEOF
10024rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025if { (ac_try="$ac_compile"
10026case "(($ac_try" in
10027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10028 *) ac_try_echo=$ac_try;;
10029esac
10030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010033 grep -v '^ *+' conftest.er1 >conftest.err
10034 rm -f conftest.er1
10035 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010037 (exit $ac_status); } && {
10038 test -z "$ac_c_werror_flag" ||
10039 test ! -s conftest.err
10040 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 ac_hi=$ac_mid; break
10042else
10043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010044sed 's/^/| /' conftest.$ac_ext >&5
10045
Martin v. Löwiseba40652007-08-30 20:10:57 +000010046 ac_lo=`expr $ac_mid + 1`
10047 if test $ac_lo -le $ac_mid; then
10048 ac_lo= ac_hi=
10049 break
10050 fi
10051 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010053
10054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 done
10056else
10057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010058sed 's/^/| /' conftest.$ac_ext >&5
10059
Martin v. Löwiseba40652007-08-30 20:10:57 +000010060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010061/* confdefs.h. */
10062_ACEOF
10063cat confdefs.h >>conftest.$ac_ext
10064cat >>conftest.$ac_ext <<_ACEOF
10065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010066$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010067 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010068int
10069main ()
10070{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010071static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010072test_array [0] = 0
10073
10074 ;
10075 return 0;
10076}
10077_ACEOF
10078rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079if { (ac_try="$ac_compile"
10080case "(($ac_try" in
10081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10082 *) ac_try_echo=$ac_try;;
10083esac
10084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010087 grep -v '^ *+' conftest.er1 >conftest.err
10088 rm -f conftest.er1
10089 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091 (exit $ac_status); } && {
10092 test -z "$ac_c_werror_flag" ||
10093 test ! -s conftest.err
10094 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ac_hi=-1 ac_mid=-1
10096 while :; do
10097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010098/* confdefs.h. */
10099_ACEOF
10100cat confdefs.h >>conftest.$ac_ext
10101cat >>conftest.$ac_ext <<_ACEOF
10102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010103$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010104 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010105int
10106main ()
10107{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010108static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010109test_array [0] = 0
10110
10111 ;
10112 return 0;
10113}
10114_ACEOF
10115rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010116if { (ac_try="$ac_compile"
10117case "(($ac_try" in
10118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10119 *) ac_try_echo=$ac_try;;
10120esac
10121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010124 grep -v '^ *+' conftest.er1 >conftest.err
10125 rm -f conftest.er1
10126 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010128 (exit $ac_status); } && {
10129 test -z "$ac_c_werror_flag" ||
10130 test ! -s conftest.err
10131 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 ac_lo=$ac_mid; break
10133else
10134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010135sed 's/^/| /' conftest.$ac_ext >&5
10136
Martin v. Löwiseba40652007-08-30 20:10:57 +000010137 ac_hi=`expr '(' $ac_mid ')' - 1`
10138 if test $ac_mid -le $ac_hi; then
10139 ac_lo= ac_hi=
10140 break
10141 fi
10142 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144
10145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 done
10147else
10148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010149sed 's/^/| /' conftest.$ac_ext >&5
10150
Martin v. Löwiseba40652007-08-30 20:10:57 +000010151 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010153
10154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010156
10157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010158# Binary search between lo and hi bounds.
10159while test "x$ac_lo" != "x$ac_hi"; do
10160 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010162/* confdefs.h. */
10163_ACEOF
10164cat confdefs.h >>conftest.$ac_ext
10165cat >>conftest.$ac_ext <<_ACEOF
10166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010167$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010168 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010169int
10170main ()
10171{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010172static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010173test_array [0] = 0
10174
10175 ;
10176 return 0;
10177}
10178_ACEOF
10179rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010180if { (ac_try="$ac_compile"
10181case "(($ac_try" in
10182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10183 *) ac_try_echo=$ac_try;;
10184esac
10185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010188 grep -v '^ *+' conftest.er1 >conftest.err
10189 rm -f conftest.er1
10190 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010192 (exit $ac_status); } && {
10193 test -z "$ac_c_werror_flag" ||
10194 test ! -s conftest.err
10195 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 ac_hi=$ac_mid
10197else
10198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010199sed 's/^/| /' conftest.$ac_ext >&5
10200
Martin v. Löwiseba40652007-08-30 20:10:57 +000010201 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000010205done
10206case $ac_lo in
10207?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010208'') if test "$ac_cv_type_fpos_t" = yes; then
10209 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010210See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010211echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010212See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213 { (exit 77); exit 77; }; }
10214 else
10215 ac_cv_sizeof_fpos_t=0
10216 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010217esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010218else
Martin v. Löwis11437992002-04-12 09:54:03 +000010219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* confdefs.h. */
10221_ACEOF
10222cat confdefs.h >>conftest.$ac_ext
10223cat >>conftest.$ac_ext <<_ACEOF
10224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010225$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010226 typedef fpos_t ac__type_sizeof_;
10227static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10228static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010229#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010230#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010231int
10232main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010233{
Martin v. Löwis11437992002-04-12 09:54:03 +000010234
10235 FILE *f = fopen ("conftest.val", "w");
10236 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010237 return 1;
10238 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010240 long int i = longval ();
10241 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10242 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 fprintf (f, "%ld\n", i);
10244 }
10245 else
10246 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010247 unsigned long int i = ulongval ();
10248 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10249 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 fprintf (f, "%lu\n", i);
10251 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010252 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010253
10254 ;
10255 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010256}
Martin v. Löwis11437992002-04-12 09:54:03 +000010257_ACEOF
10258rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010259if { (ac_try="$ac_link"
10260case "(($ac_try" in
10261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10262 *) ac_try_echo=$ac_try;;
10263esac
10264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10265 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ac_status=$?
10267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010269 { (case "(($ac_try" in
10270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10271 *) ac_try_echo=$ac_try;;
10272esac
10273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10274 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 ac_status=$?
10276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10277 (exit $ac_status); }; }; then
10278 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010279else
Martin v. Löwis11437992002-04-12 09:54:03 +000010280 echo "$as_me: program exited with status $ac_status" >&5
10281echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010282sed 's/^/| /' conftest.$ac_ext >&5
10283
Martin v. Löwis11437992002-04-12 09:54:03 +000010284( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010285if test "$ac_cv_type_fpos_t" = yes; then
10286 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010287See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010288echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010289See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290 { (exit 77); exit 77; }; }
10291 else
10292 ac_cv_sizeof_fpos_t=0
10293 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295rm -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 +000010296fi
10297rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010299{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10300echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
10301
10302
10303
Martin v. Löwis11437992002-04-12 09:54:03 +000010304cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010305#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010306_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010307
Michael W. Hudson54241132001-12-07 15:38:26 +000010308
Martin v. Löwiseba40652007-08-30 20:10:57 +000010309{ echo "$as_me:$LINENO: checking for size_t" >&5
10310echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010311if test "${ac_cv_type_size_t+set}" = set; then
10312 echo $ECHO_N "(cached) $ECHO_C" >&6
10313else
10314 cat >conftest.$ac_ext <<_ACEOF
10315/* confdefs.h. */
10316_ACEOF
10317cat confdefs.h >>conftest.$ac_ext
10318cat >>conftest.$ac_ext <<_ACEOF
10319/* end confdefs.h. */
10320$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010321typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010322int
10323main ()
10324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010325if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010326 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010327if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +000010328 return 0;
10329 ;
10330 return 0;
10331}
10332_ACEOF
10333rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010334if { (ac_try="$ac_compile"
10335case "(($ac_try" in
10336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10337 *) ac_try_echo=$ac_try;;
10338esac
10339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010341 ac_status=$?
10342 grep -v '^ *+' conftest.er1 >conftest.err
10343 rm -f conftest.er1
10344 cat conftest.err >&5
10345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010346 (exit $ac_status); } && {
10347 test -z "$ac_c_werror_flag" ||
10348 test ! -s conftest.err
10349 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010350 ac_cv_type_size_t=yes
10351else
10352 echo "$as_me: failed program was:" >&5
10353sed 's/^/| /' conftest.$ac_ext >&5
10354
Martin v. Löwiseba40652007-08-30 20:10:57 +000010355 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +000010356fi
Brett Cannon19fab762007-06-02 03:02:29 +000010357
Martin v. Löwiseba40652007-08-30 20:10:57 +000010358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10359fi
10360{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10361echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10362
10363# The cast to long int works around a bug in the HP C Compiler
10364# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10365# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10366# This bug is HP SR number 8606223364.
10367{ echo "$as_me:$LINENO: checking size of size_t" >&5
10368echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010369if test "${ac_cv_sizeof_size_t+set}" = set; then
10370 echo $ECHO_N "(cached) $ECHO_C" >&6
10371else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010372 if test "$cross_compiling" = yes; then
10373 # Depending upon the size, compute the lo and hi bounds.
10374cat >conftest.$ac_ext <<_ACEOF
10375/* confdefs.h. */
10376_ACEOF
10377cat confdefs.h >>conftest.$ac_ext
10378cat >>conftest.$ac_ext <<_ACEOF
10379/* end confdefs.h. */
10380$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010381 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010382int
10383main ()
10384{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010385static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010386test_array [0] = 0
10387
10388 ;
10389 return 0;
10390}
10391_ACEOF
10392rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010393if { (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
Martin v. Löwis18e16552006-02-15 17:27:45 +000010400 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
Martin v. Löwiseba40652007-08-30 20:10:57 +000010405 (exit $ac_status); } && {
10406 test -z "$ac_c_werror_flag" ||
10407 test ! -s conftest.err
10408 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010409 ac_lo=0 ac_mid=0
10410 while :; do
10411 cat >conftest.$ac_ext <<_ACEOF
10412/* confdefs.h. */
10413_ACEOF
10414cat confdefs.h >>conftest.$ac_ext
10415cat >>conftest.$ac_ext <<_ACEOF
10416/* end confdefs.h. */
10417$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010418 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010419int
10420main ()
10421{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010422static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423test_array [0] = 0
10424
10425 ;
10426 return 0;
10427}
10428_ACEOF
10429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010430if { (ac_try="$ac_compile"
10431case "(($ac_try" in
10432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10433 *) ac_try_echo=$ac_try;;
10434esac
10435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010437 ac_status=$?
10438 grep -v '^ *+' conftest.er1 >conftest.err
10439 rm -f conftest.er1
10440 cat conftest.err >&5
10441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010442 (exit $ac_status); } && {
10443 test -z "$ac_c_werror_flag" ||
10444 test ! -s conftest.err
10445 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010446 ac_hi=$ac_mid; break
10447else
10448 echo "$as_me: failed program was:" >&5
10449sed 's/^/| /' conftest.$ac_ext >&5
10450
Martin v. Löwiseba40652007-08-30 20:10:57 +000010451 ac_lo=`expr $ac_mid + 1`
10452 if test $ac_lo -le $ac_mid; then
10453 ac_lo= ac_hi=
10454 break
10455 fi
10456 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010458
10459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010460 done
10461else
10462 echo "$as_me: failed program was:" >&5
10463sed 's/^/| /' conftest.$ac_ext >&5
10464
Martin v. Löwiseba40652007-08-30 20:10:57 +000010465 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010466/* confdefs.h. */
10467_ACEOF
10468cat confdefs.h >>conftest.$ac_ext
10469cat >>conftest.$ac_ext <<_ACEOF
10470/* end confdefs.h. */
10471$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010472 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010473int
10474main ()
10475{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010476static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477test_array [0] = 0
10478
10479 ;
10480 return 0;
10481}
10482_ACEOF
10483rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010484if { (ac_try="$ac_compile"
10485case "(($ac_try" in
10486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10487 *) ac_try_echo=$ac_try;;
10488esac
10489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491 ac_status=$?
10492 grep -v '^ *+' conftest.er1 >conftest.err
10493 rm -f conftest.er1
10494 cat conftest.err >&5
10495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010496 (exit $ac_status); } && {
10497 test -z "$ac_c_werror_flag" ||
10498 test ! -s conftest.err
10499 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500 ac_hi=-1 ac_mid=-1
10501 while :; do
10502 cat >conftest.$ac_ext <<_ACEOF
10503/* confdefs.h. */
10504_ACEOF
10505cat confdefs.h >>conftest.$ac_ext
10506cat >>conftest.$ac_ext <<_ACEOF
10507/* end confdefs.h. */
10508$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010509 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010510int
10511main ()
10512{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010513static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514test_array [0] = 0
10515
10516 ;
10517 return 0;
10518}
10519_ACEOF
10520rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010521if { (ac_try="$ac_compile"
10522case "(($ac_try" in
10523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10524 *) ac_try_echo=$ac_try;;
10525esac
10526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10527 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528 ac_status=$?
10529 grep -v '^ *+' conftest.er1 >conftest.err
10530 rm -f conftest.er1
10531 cat conftest.err >&5
10532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010533 (exit $ac_status); } && {
10534 test -z "$ac_c_werror_flag" ||
10535 test ! -s conftest.err
10536 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010537 ac_lo=$ac_mid; break
10538else
10539 echo "$as_me: failed program was:" >&5
10540sed 's/^/| /' conftest.$ac_ext >&5
10541
Martin v. Löwiseba40652007-08-30 20:10:57 +000010542 ac_hi=`expr '(' $ac_mid ')' - 1`
10543 if test $ac_mid -le $ac_hi; then
10544 ac_lo= ac_hi=
10545 break
10546 fi
10547 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010549
10550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010551 done
10552else
10553 echo "$as_me: failed program was:" >&5
10554sed 's/^/| /' conftest.$ac_ext >&5
10555
Martin v. Löwiseba40652007-08-30 20:10:57 +000010556 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010558
10559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010561
10562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010563# Binary search between lo and hi bounds.
10564while test "x$ac_lo" != "x$ac_hi"; do
10565 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10566 cat >conftest.$ac_ext <<_ACEOF
10567/* confdefs.h. */
10568_ACEOF
10569cat confdefs.h >>conftest.$ac_ext
10570cat >>conftest.$ac_ext <<_ACEOF
10571/* end confdefs.h. */
10572$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010573 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010574int
10575main ()
10576{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010577static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578test_array [0] = 0
10579
10580 ;
10581 return 0;
10582}
10583_ACEOF
10584rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010585if { (ac_try="$ac_compile"
10586case "(($ac_try" in
10587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10588 *) ac_try_echo=$ac_try;;
10589esac
10590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592 ac_status=$?
10593 grep -v '^ *+' conftest.er1 >conftest.err
10594 rm -f conftest.er1
10595 cat conftest.err >&5
10596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010597 (exit $ac_status); } && {
10598 test -z "$ac_c_werror_flag" ||
10599 test ! -s conftest.err
10600 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601 ac_hi=$ac_mid
10602else
10603 echo "$as_me: failed program was:" >&5
10604sed 's/^/| /' conftest.$ac_ext >&5
10605
Martin v. Löwiseba40652007-08-30 20:10:57 +000010606 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608
10609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610done
10611case $ac_lo in
10612?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010613'') if test "$ac_cv_type_size_t" = yes; then
10614 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010616echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010618 { (exit 77); exit 77; }; }
10619 else
10620 ac_cv_sizeof_size_t=0
10621 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622esac
10623else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624 cat >conftest.$ac_ext <<_ACEOF
10625/* confdefs.h. */
10626_ACEOF
10627cat confdefs.h >>conftest.$ac_ext
10628cat >>conftest.$ac_ext <<_ACEOF
10629/* end confdefs.h. */
10630$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010631 typedef size_t ac__type_sizeof_;
10632static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10633static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010634#include <stdio.h>
10635#include <stdlib.h>
10636int
10637main ()
10638{
10639
10640 FILE *f = fopen ("conftest.val", "w");
10641 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010642 return 1;
10643 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010645 long int i = longval ();
10646 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10647 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648 fprintf (f, "%ld\n", i);
10649 }
10650 else
10651 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010652 unsigned long int i = ulongval ();
10653 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10654 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655 fprintf (f, "%lu\n", i);
10656 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010657 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658
10659 ;
10660 return 0;
10661}
10662_ACEOF
10663rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010664if { (ac_try="$ac_link"
10665case "(($ac_try" in
10666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10667 *) ac_try_echo=$ac_try;;
10668esac
10669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10670 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671 ac_status=$?
10672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010674 { (case "(($ac_try" in
10675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10676 *) ac_try_echo=$ac_try;;
10677esac
10678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10679 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680 ac_status=$?
10681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10682 (exit $ac_status); }; }; then
10683 ac_cv_sizeof_size_t=`cat conftest.val`
10684else
10685 echo "$as_me: program exited with status $ac_status" >&5
10686echo "$as_me: failed program was:" >&5
10687sed 's/^/| /' conftest.$ac_ext >&5
10688
10689( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010690if test "$ac_cv_type_size_t" = yes; then
10691 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010693echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695 { (exit 77); exit 77; }; }
10696 else
10697 ac_cv_sizeof_size_t=0
10698 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700rm -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 +000010701fi
10702rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010704{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10705echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10706
10707
10708
Martin v. Löwis18e16552006-02-15 17:27:45 +000010709cat >>confdefs.h <<_ACEOF
10710#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10711_ACEOF
10712
10713
Christian Heimes951cc0f2008-01-31 23:08:23 +000010714{ echo "$as_me:$LINENO: checking for pid_t" >&5
10715echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10716if test "${ac_cv_type_pid_t+set}" = set; then
10717 echo $ECHO_N "(cached) $ECHO_C" >&6
10718else
10719 cat >conftest.$ac_ext <<_ACEOF
10720/* confdefs.h. */
10721_ACEOF
10722cat confdefs.h >>conftest.$ac_ext
10723cat >>conftest.$ac_ext <<_ACEOF
10724/* end confdefs.h. */
10725$ac_includes_default
10726typedef pid_t ac__type_new_;
10727int
10728main ()
10729{
10730if ((ac__type_new_ *) 0)
10731 return 0;
10732if (sizeof (ac__type_new_))
10733 return 0;
10734 ;
10735 return 0;
10736}
10737_ACEOF
10738rm -f conftest.$ac_objext
10739if { (ac_try="$ac_compile"
10740case "(($ac_try" in
10741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10742 *) ac_try_echo=$ac_try;;
10743esac
10744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10745 (eval "$ac_compile") 2>conftest.er1
10746 ac_status=$?
10747 grep -v '^ *+' conftest.er1 >conftest.err
10748 rm -f conftest.er1
10749 cat conftest.err >&5
10750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10751 (exit $ac_status); } && {
10752 test -z "$ac_c_werror_flag" ||
10753 test ! -s conftest.err
10754 } && test -s conftest.$ac_objext; then
10755 ac_cv_type_pid_t=yes
10756else
10757 echo "$as_me: failed program was:" >&5
10758sed 's/^/| /' conftest.$ac_ext >&5
10759
10760 ac_cv_type_pid_t=no
10761fi
10762
10763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10764fi
10765{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10766echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10767
10768# The cast to long int works around a bug in the HP C Compiler
10769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10771# This bug is HP SR number 8606223364.
10772{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10773echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10774if test "${ac_cv_sizeof_pid_t+set}" = set; then
10775 echo $ECHO_N "(cached) $ECHO_C" >&6
10776else
10777 if test "$cross_compiling" = yes; then
10778 # Depending upon the size, compute the lo and hi bounds.
10779cat >conftest.$ac_ext <<_ACEOF
10780/* confdefs.h. */
10781_ACEOF
10782cat confdefs.h >>conftest.$ac_ext
10783cat >>conftest.$ac_ext <<_ACEOF
10784/* end confdefs.h. */
10785$ac_includes_default
10786 typedef pid_t ac__type_sizeof_;
10787int
10788main ()
10789{
10790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10791test_array [0] = 0
10792
10793 ;
10794 return 0;
10795}
10796_ACEOF
10797rm -f conftest.$ac_objext
10798if { (ac_try="$ac_compile"
10799case "(($ac_try" in
10800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10801 *) ac_try_echo=$ac_try;;
10802esac
10803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10804 (eval "$ac_compile") 2>conftest.er1
10805 ac_status=$?
10806 grep -v '^ *+' conftest.er1 >conftest.err
10807 rm -f conftest.er1
10808 cat conftest.err >&5
10809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10810 (exit $ac_status); } && {
10811 test -z "$ac_c_werror_flag" ||
10812 test ! -s conftest.err
10813 } && test -s conftest.$ac_objext; then
10814 ac_lo=0 ac_mid=0
10815 while :; do
10816 cat >conftest.$ac_ext <<_ACEOF
10817/* confdefs.h. */
10818_ACEOF
10819cat confdefs.h >>conftest.$ac_ext
10820cat >>conftest.$ac_ext <<_ACEOF
10821/* end confdefs.h. */
10822$ac_includes_default
10823 typedef pid_t ac__type_sizeof_;
10824int
10825main ()
10826{
10827static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10828test_array [0] = 0
10829
10830 ;
10831 return 0;
10832}
10833_ACEOF
10834rm -f conftest.$ac_objext
10835if { (ac_try="$ac_compile"
10836case "(($ac_try" in
10837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10838 *) ac_try_echo=$ac_try;;
10839esac
10840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10841 (eval "$ac_compile") 2>conftest.er1
10842 ac_status=$?
10843 grep -v '^ *+' conftest.er1 >conftest.err
10844 rm -f conftest.er1
10845 cat conftest.err >&5
10846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10847 (exit $ac_status); } && {
10848 test -z "$ac_c_werror_flag" ||
10849 test ! -s conftest.err
10850 } && test -s conftest.$ac_objext; then
10851 ac_hi=$ac_mid; break
10852else
10853 echo "$as_me: failed program was:" >&5
10854sed 's/^/| /' conftest.$ac_ext >&5
10855
10856 ac_lo=`expr $ac_mid + 1`
10857 if test $ac_lo -le $ac_mid; then
10858 ac_lo= ac_hi=
10859 break
10860 fi
10861 ac_mid=`expr 2 '*' $ac_mid + 1`
10862fi
10863
10864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10865 done
10866else
10867 echo "$as_me: failed program was:" >&5
10868sed 's/^/| /' conftest.$ac_ext >&5
10869
10870 cat >conftest.$ac_ext <<_ACEOF
10871/* confdefs.h. */
10872_ACEOF
10873cat confdefs.h >>conftest.$ac_ext
10874cat >>conftest.$ac_ext <<_ACEOF
10875/* end confdefs.h. */
10876$ac_includes_default
10877 typedef pid_t ac__type_sizeof_;
10878int
10879main ()
10880{
10881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10882test_array [0] = 0
10883
10884 ;
10885 return 0;
10886}
10887_ACEOF
10888rm -f conftest.$ac_objext
10889if { (ac_try="$ac_compile"
10890case "(($ac_try" in
10891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10892 *) ac_try_echo=$ac_try;;
10893esac
10894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10895 (eval "$ac_compile") 2>conftest.er1
10896 ac_status=$?
10897 grep -v '^ *+' conftest.er1 >conftest.err
10898 rm -f conftest.er1
10899 cat conftest.err >&5
10900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10901 (exit $ac_status); } && {
10902 test -z "$ac_c_werror_flag" ||
10903 test ! -s conftest.err
10904 } && test -s conftest.$ac_objext; then
10905 ac_hi=-1 ac_mid=-1
10906 while :; do
10907 cat >conftest.$ac_ext <<_ACEOF
10908/* confdefs.h. */
10909_ACEOF
10910cat confdefs.h >>conftest.$ac_ext
10911cat >>conftest.$ac_ext <<_ACEOF
10912/* end confdefs.h. */
10913$ac_includes_default
10914 typedef pid_t ac__type_sizeof_;
10915int
10916main ()
10917{
10918static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10919test_array [0] = 0
10920
10921 ;
10922 return 0;
10923}
10924_ACEOF
10925rm -f conftest.$ac_objext
10926if { (ac_try="$ac_compile"
10927case "(($ac_try" in
10928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10929 *) ac_try_echo=$ac_try;;
10930esac
10931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10932 (eval "$ac_compile") 2>conftest.er1
10933 ac_status=$?
10934 grep -v '^ *+' conftest.er1 >conftest.err
10935 rm -f conftest.er1
10936 cat conftest.err >&5
10937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10938 (exit $ac_status); } && {
10939 test -z "$ac_c_werror_flag" ||
10940 test ! -s conftest.err
10941 } && test -s conftest.$ac_objext; then
10942 ac_lo=$ac_mid; break
10943else
10944 echo "$as_me: failed program was:" >&5
10945sed 's/^/| /' conftest.$ac_ext >&5
10946
10947 ac_hi=`expr '(' $ac_mid ')' - 1`
10948 if test $ac_mid -le $ac_hi; then
10949 ac_lo= ac_hi=
10950 break
10951 fi
10952 ac_mid=`expr 2 '*' $ac_mid`
10953fi
10954
10955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10956 done
10957else
10958 echo "$as_me: failed program was:" >&5
10959sed 's/^/| /' conftest.$ac_ext >&5
10960
10961 ac_lo= ac_hi=
10962fi
10963
10964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10965fi
10966
10967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10968# Binary search between lo and hi bounds.
10969while test "x$ac_lo" != "x$ac_hi"; do
10970 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10971 cat >conftest.$ac_ext <<_ACEOF
10972/* confdefs.h. */
10973_ACEOF
10974cat confdefs.h >>conftest.$ac_ext
10975cat >>conftest.$ac_ext <<_ACEOF
10976/* end confdefs.h. */
10977$ac_includes_default
10978 typedef pid_t ac__type_sizeof_;
10979int
10980main ()
10981{
10982static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10983test_array [0] = 0
10984
10985 ;
10986 return 0;
10987}
10988_ACEOF
10989rm -f conftest.$ac_objext
10990if { (ac_try="$ac_compile"
10991case "(($ac_try" in
10992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10993 *) ac_try_echo=$ac_try;;
10994esac
10995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10996 (eval "$ac_compile") 2>conftest.er1
10997 ac_status=$?
10998 grep -v '^ *+' conftest.er1 >conftest.err
10999 rm -f conftest.er1
11000 cat conftest.err >&5
11001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11002 (exit $ac_status); } && {
11003 test -z "$ac_c_werror_flag" ||
11004 test ! -s conftest.err
11005 } && test -s conftest.$ac_objext; then
11006 ac_hi=$ac_mid
11007else
11008 echo "$as_me: failed program was:" >&5
11009sed 's/^/| /' conftest.$ac_ext >&5
11010
11011 ac_lo=`expr '(' $ac_mid ')' + 1`
11012fi
11013
11014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11015done
11016case $ac_lo in
11017?*) ac_cv_sizeof_pid_t=$ac_lo;;
11018'') if test "$ac_cv_type_pid_t" = yes; then
11019 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11020See \`config.log' for more details." >&5
11021echo "$as_me: error: cannot compute sizeof (pid_t)
11022See \`config.log' for more details." >&2;}
11023 { (exit 77); exit 77; }; }
11024 else
11025 ac_cv_sizeof_pid_t=0
11026 fi ;;
11027esac
11028else
11029 cat >conftest.$ac_ext <<_ACEOF
11030/* confdefs.h. */
11031_ACEOF
11032cat confdefs.h >>conftest.$ac_ext
11033cat >>conftest.$ac_ext <<_ACEOF
11034/* end confdefs.h. */
11035$ac_includes_default
11036 typedef pid_t ac__type_sizeof_;
11037static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11038static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11039#include <stdio.h>
11040#include <stdlib.h>
11041int
11042main ()
11043{
11044
11045 FILE *f = fopen ("conftest.val", "w");
11046 if (! f)
11047 return 1;
11048 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11049 {
11050 long int i = longval ();
11051 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11052 return 1;
11053 fprintf (f, "%ld\n", i);
11054 }
11055 else
11056 {
11057 unsigned long int i = ulongval ();
11058 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11059 return 1;
11060 fprintf (f, "%lu\n", i);
11061 }
11062 return ferror (f) || fclose (f) != 0;
11063
11064 ;
11065 return 0;
11066}
11067_ACEOF
11068rm -f conftest$ac_exeext
11069if { (ac_try="$ac_link"
11070case "(($ac_try" in
11071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11072 *) ac_try_echo=$ac_try;;
11073esac
11074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11075 (eval "$ac_link") 2>&5
11076 ac_status=$?
11077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11078 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11079 { (case "(($ac_try" in
11080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11081 *) ac_try_echo=$ac_try;;
11082esac
11083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11084 (eval "$ac_try") 2>&5
11085 ac_status=$?
11086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11087 (exit $ac_status); }; }; then
11088 ac_cv_sizeof_pid_t=`cat conftest.val`
11089else
11090 echo "$as_me: program exited with status $ac_status" >&5
11091echo "$as_me: failed program was:" >&5
11092sed 's/^/| /' conftest.$ac_ext >&5
11093
11094( exit $ac_status )
11095if test "$ac_cv_type_pid_t" = yes; then
11096 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11097See \`config.log' for more details." >&5
11098echo "$as_me: error: cannot compute sizeof (pid_t)
11099See \`config.log' for more details." >&2;}
11100 { (exit 77); exit 77; }; }
11101 else
11102 ac_cv_sizeof_pid_t=0
11103 fi
11104fi
11105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11106fi
11107rm -f conftest.val
11108fi
11109{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11110echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
11111
11112
11113
11114cat >>confdefs.h <<_ACEOF
11115#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11116_ACEOF
11117
11118
Michael W. Hudson54241132001-12-07 15:38:26 +000011119
Martin v. Löwiseba40652007-08-30 20:10:57 +000011120{ echo "$as_me:$LINENO: checking for long long support" >&5
11121echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011122have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011124/* confdefs.h. */
11125_ACEOF
11126cat confdefs.h >>conftest.$ac_ext
11127cat >>conftest.$ac_ext <<_ACEOF
11128/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011129
Martin v. Löwis11437992002-04-12 09:54:03 +000011130int
11131main ()
11132{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011133long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 ;
11135 return 0;
11136}
11137_ACEOF
11138rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011139if { (ac_try="$ac_compile"
11140case "(($ac_try" in
11141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11142 *) ac_try_echo=$ac_try;;
11143esac
11144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011147 grep -v '^ *+' conftest.er1 >conftest.err
11148 rm -f conftest.er1
11149 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011151 (exit $ac_status); } && {
11152 test -z "$ac_c_werror_flag" ||
11153 test ! -s conftest.err
11154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011155
11156
11157cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011158#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011159_ACEOF
11160
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011161 have_long_long=yes
11162
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011163else
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011165sed 's/^/| /' conftest.$ac_ext >&5
11166
Martin v. Löwiseba40652007-08-30 20:10:57 +000011167
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011169
11170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11171{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11172echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011173if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011174{ echo "$as_me:$LINENO: checking for long long" >&5
11175echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011176if test "${ac_cv_type_long_long+set}" = set; then
11177 echo $ECHO_N "(cached) $ECHO_C" >&6
11178else
11179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011180/* confdefs.h. */
11181_ACEOF
11182cat confdefs.h >>conftest.$ac_ext
11183cat >>conftest.$ac_ext <<_ACEOF
11184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011185$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011186typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011187int
11188main ()
11189{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011190if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011192if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011193 return 0;
11194 ;
11195 return 0;
11196}
11197_ACEOF
11198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011199if { (ac_try="$ac_compile"
11200case "(($ac_try" in
11201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11202 *) ac_try_echo=$ac_try;;
11203esac
11204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011207 grep -v '^ *+' conftest.er1 >conftest.err
11208 rm -f conftest.er1
11209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011211 (exit $ac_status); } && {
11212 test -z "$ac_c_werror_flag" ||
11213 test ! -s conftest.err
11214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 ac_cv_type_long_long=yes
11216else
11217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011218sed 's/^/| /' conftest.$ac_ext >&5
11219
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011221fi
Brett Cannon19fab762007-06-02 03:02:29 +000011222
Martin v. Löwiseba40652007-08-30 20:10:57 +000011223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11224fi
11225{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11226echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11227
11228# The cast to long int works around a bug in the HP C Compiler
11229# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11230# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11231# This bug is HP SR number 8606223364.
11232{ echo "$as_me:$LINENO: checking size of long long" >&5
11233echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011234if test "${ac_cv_sizeof_long_long+set}" = set; then
11235 echo $ECHO_N "(cached) $ECHO_C" >&6
11236else
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 if test "$cross_compiling" = yes; then
11238 # Depending upon the size, compute the lo and hi bounds.
11239cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* confdefs.h. */
11241_ACEOF
11242cat confdefs.h >>conftest.$ac_ext
11243cat >>conftest.$ac_ext <<_ACEOF
11244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011245$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011246 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011247int
11248main ()
11249{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011251test_array [0] = 0
11252
11253 ;
11254 return 0;
11255}
11256_ACEOF
11257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011258if { (ac_try="$ac_compile"
11259case "(($ac_try" in
11260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11261 *) ac_try_echo=$ac_try;;
11262esac
11263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011266 grep -v '^ *+' conftest.er1 >conftest.err
11267 rm -f conftest.er1
11268 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011270 (exit $ac_status); } && {
11271 test -z "$ac_c_werror_flag" ||
11272 test ! -s conftest.err
11273 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 ac_lo=0 ac_mid=0
11275 while :; do
11276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011277/* confdefs.h. */
11278_ACEOF
11279cat confdefs.h >>conftest.$ac_ext
11280cat >>conftest.$ac_ext <<_ACEOF
11281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011282$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011283 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011284int
11285main ()
11286{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011288test_array [0] = 0
11289
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011295if { (ac_try="$ac_compile"
11296case "(($ac_try" in
11297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11298 *) ac_try_echo=$ac_try;;
11299esac
11300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11301 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011303 grep -v '^ *+' conftest.er1 >conftest.err
11304 rm -f conftest.er1
11305 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011307 (exit $ac_status); } && {
11308 test -z "$ac_c_werror_flag" ||
11309 test ! -s conftest.err
11310 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 ac_hi=$ac_mid; break
11312else
11313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011314sed 's/^/| /' conftest.$ac_ext >&5
11315
Martin v. Löwiseba40652007-08-30 20:10:57 +000011316 ac_lo=`expr $ac_mid + 1`
11317 if test $ac_lo -le $ac_mid; then
11318 ac_lo= ac_hi=
11319 break
11320 fi
11321 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011323
11324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 done
11326else
11327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011328sed 's/^/| /' conftest.$ac_ext >&5
11329
Martin v. Löwiseba40652007-08-30 20:10:57 +000011330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011331/* confdefs.h. */
11332_ACEOF
11333cat confdefs.h >>conftest.$ac_ext
11334cat >>conftest.$ac_ext <<_ACEOF
11335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011336$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011337 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011338int
11339main ()
11340{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011342test_array [0] = 0
11343
11344 ;
11345 return 0;
11346}
11347_ACEOF
11348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349if { (ac_try="$ac_compile"
11350case "(($ac_try" in
11351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11352 *) ac_try_echo=$ac_try;;
11353esac
11354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011357 grep -v '^ *+' conftest.er1 >conftest.err
11358 rm -f conftest.er1
11359 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011361 (exit $ac_status); } && {
11362 test -z "$ac_c_werror_flag" ||
11363 test ! -s conftest.err
11364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 ac_hi=-1 ac_mid=-1
11366 while :; do
11367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* confdefs.h. */
11369_ACEOF
11370cat confdefs.h >>conftest.$ac_ext
11371cat >>conftest.$ac_ext <<_ACEOF
11372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011373$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011374 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011375int
11376main ()
11377{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011378static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011379test_array [0] = 0
11380
11381 ;
11382 return 0;
11383}
11384_ACEOF
11385rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011386if { (ac_try="$ac_compile"
11387case "(($ac_try" in
11388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11389 *) ac_try_echo=$ac_try;;
11390esac
11391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011394 grep -v '^ *+' conftest.er1 >conftest.err
11395 rm -f conftest.er1
11396 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011398 (exit $ac_status); } && {
11399 test -z "$ac_c_werror_flag" ||
11400 test ! -s conftest.err
11401 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 ac_lo=$ac_mid; break
11403else
11404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011405sed 's/^/| /' conftest.$ac_ext >&5
11406
Martin v. Löwiseba40652007-08-30 20:10:57 +000011407 ac_hi=`expr '(' $ac_mid ')' - 1`
11408 if test $ac_mid -le $ac_hi; then
11409 ac_lo= ac_hi=
11410 break
11411 fi
11412 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414
11415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011416 done
11417else
11418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011419sed 's/^/| /' conftest.$ac_ext >&5
11420
Martin v. Löwiseba40652007-08-30 20:10:57 +000011421 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011423
11424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011426
11427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011428# Binary search between lo and hi bounds.
11429while test "x$ac_lo" != "x$ac_hi"; do
11430 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011432/* confdefs.h. */
11433_ACEOF
11434cat confdefs.h >>conftest.$ac_ext
11435cat >>conftest.$ac_ext <<_ACEOF
11436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011437$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011438 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011439int
11440main ()
11441{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011442static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011443test_array [0] = 0
11444
11445 ;
11446 return 0;
11447}
11448_ACEOF
11449rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011450if { (ac_try="$ac_compile"
11451case "(($ac_try" in
11452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11453 *) ac_try_echo=$ac_try;;
11454esac
11455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11456 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011458 grep -v '^ *+' conftest.er1 >conftest.err
11459 rm -f conftest.er1
11460 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011462 (exit $ac_status); } && {
11463 test -z "$ac_c_werror_flag" ||
11464 test ! -s conftest.err
11465 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 ac_hi=$ac_mid
11467else
11468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011469sed 's/^/| /' conftest.$ac_ext >&5
11470
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473
11474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011475done
11476case $ac_lo in
11477?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011478'') if test "$ac_cv_type_long_long" = yes; then
11479 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011480See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011481echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011482See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011483 { (exit 77); exit 77; }; }
11484 else
11485 ac_cv_sizeof_long_long=0
11486 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011487esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011488else
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011490/* confdefs.h. */
11491_ACEOF
11492cat confdefs.h >>conftest.$ac_ext
11493cat >>conftest.$ac_ext <<_ACEOF
11494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011495$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011496 typedef long long ac__type_sizeof_;
11497static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11498static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011499#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011500#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011501int
11502main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011503{
Martin v. Löwis11437992002-04-12 09:54:03 +000011504
11505 FILE *f = fopen ("conftest.val", "w");
11506 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011507 return 1;
11508 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510 long int i = longval ();
11511 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11512 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 fprintf (f, "%ld\n", i);
11514 }
11515 else
11516 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011517 unsigned long int i = ulongval ();
11518 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11519 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 fprintf (f, "%lu\n", i);
11521 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011522 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011523
11524 ;
11525 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011526}
Martin v. Löwis11437992002-04-12 09:54:03 +000011527_ACEOF
11528rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011529if { (ac_try="$ac_link"
11530case "(($ac_try" in
11531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11532 *) ac_try_echo=$ac_try;;
11533esac
11534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11535 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 ac_status=$?
11537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11538 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011539 { (case "(($ac_try" in
11540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11541 *) ac_try_echo=$ac_try;;
11542esac
11543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11544 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 ac_status=$?
11546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11547 (exit $ac_status); }; }; then
11548 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011549else
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 echo "$as_me: program exited with status $ac_status" >&5
11551echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011552sed 's/^/| /' conftest.$ac_ext >&5
11553
Martin v. Löwis11437992002-04-12 09:54:03 +000011554( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011555if test "$ac_cv_type_long_long" = yes; then
11556 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011557See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011558echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011559See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560 { (exit 77); exit 77; }; }
11561 else
11562 ac_cv_sizeof_long_long=0
11563 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565rm -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 +000011566fi
11567rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11570echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11571
11572
11573
Martin v. Löwis11437992002-04-12 09:54:03 +000011574cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011575#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011576_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011577
Michael W. Hudson54241132001-12-07 15:38:26 +000011578
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011579fi
11580
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011581{ echo "$as_me:$LINENO: checking for long double support" >&5
11582echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11583have_long_double=no
11584cat >conftest.$ac_ext <<_ACEOF
11585/* confdefs.h. */
11586_ACEOF
11587cat confdefs.h >>conftest.$ac_ext
11588cat >>conftest.$ac_ext <<_ACEOF
11589/* end confdefs.h. */
11590
11591int
11592main ()
11593{
11594long double x; x = (long double)0.;
11595 ;
11596 return 0;
11597}
11598_ACEOF
11599rm -f conftest.$ac_objext
11600if { (ac_try="$ac_compile"
11601case "(($ac_try" in
11602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11603 *) ac_try_echo=$ac_try;;
11604esac
11605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11606 (eval "$ac_compile") 2>conftest.er1
11607 ac_status=$?
11608 grep -v '^ *+' conftest.er1 >conftest.err
11609 rm -f conftest.er1
11610 cat conftest.err >&5
11611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11612 (exit $ac_status); } && {
11613 test -z "$ac_c_werror_flag" ||
11614 test ! -s conftest.err
11615 } && test -s conftest.$ac_objext; then
11616
11617
11618cat >>confdefs.h <<\_ACEOF
11619#define HAVE_LONG_DOUBLE 1
11620_ACEOF
11621
11622 have_long_double=yes
11623
11624else
11625 echo "$as_me: failed program was:" >&5
11626sed 's/^/| /' conftest.$ac_ext >&5
11627
11628
11629fi
11630
11631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11632{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11633echo "${ECHO_T}$have_long_double" >&6; }
11634if test "$have_long_double" = yes ; then
11635{ echo "$as_me:$LINENO: checking for long double" >&5
11636echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11637if test "${ac_cv_type_long_double+set}" = set; then
11638 echo $ECHO_N "(cached) $ECHO_C" >&6
11639else
11640 cat >conftest.$ac_ext <<_ACEOF
11641/* confdefs.h. */
11642_ACEOF
11643cat confdefs.h >>conftest.$ac_ext
11644cat >>conftest.$ac_ext <<_ACEOF
11645/* end confdefs.h. */
11646$ac_includes_default
11647typedef long double ac__type_new_;
11648int
11649main ()
11650{
11651if ((ac__type_new_ *) 0)
11652 return 0;
11653if (sizeof (ac__type_new_))
11654 return 0;
11655 ;
11656 return 0;
11657}
11658_ACEOF
11659rm -f conftest.$ac_objext
11660if { (ac_try="$ac_compile"
11661case "(($ac_try" in
11662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11663 *) ac_try_echo=$ac_try;;
11664esac
11665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11666 (eval "$ac_compile") 2>conftest.er1
11667 ac_status=$?
11668 grep -v '^ *+' conftest.er1 >conftest.err
11669 rm -f conftest.er1
11670 cat conftest.err >&5
11671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672 (exit $ac_status); } && {
11673 test -z "$ac_c_werror_flag" ||
11674 test ! -s conftest.err
11675 } && test -s conftest.$ac_objext; then
11676 ac_cv_type_long_double=yes
11677else
11678 echo "$as_me: failed program was:" >&5
11679sed 's/^/| /' conftest.$ac_ext >&5
11680
11681 ac_cv_type_long_double=no
11682fi
11683
11684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11685fi
11686{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11687echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11688
11689# The cast to long int works around a bug in the HP C Compiler
11690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11692# This bug is HP SR number 8606223364.
11693{ echo "$as_me:$LINENO: checking size of long double" >&5
11694echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11695if test "${ac_cv_sizeof_long_double+set}" = set; then
11696 echo $ECHO_N "(cached) $ECHO_C" >&6
11697else
11698 if test "$cross_compiling" = yes; then
11699 # Depending upon the size, compute the lo and hi bounds.
11700cat >conftest.$ac_ext <<_ACEOF
11701/* confdefs.h. */
11702_ACEOF
11703cat confdefs.h >>conftest.$ac_ext
11704cat >>conftest.$ac_ext <<_ACEOF
11705/* end confdefs.h. */
11706$ac_includes_default
11707 typedef long double ac__type_sizeof_;
11708int
11709main ()
11710{
11711static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11712test_array [0] = 0
11713
11714 ;
11715 return 0;
11716}
11717_ACEOF
11718rm -f conftest.$ac_objext
11719if { (ac_try="$ac_compile"
11720case "(($ac_try" in
11721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11722 *) ac_try_echo=$ac_try;;
11723esac
11724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11725 (eval "$ac_compile") 2>conftest.er1
11726 ac_status=$?
11727 grep -v '^ *+' conftest.er1 >conftest.err
11728 rm -f conftest.er1
11729 cat conftest.err >&5
11730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11731 (exit $ac_status); } && {
11732 test -z "$ac_c_werror_flag" ||
11733 test ! -s conftest.err
11734 } && test -s conftest.$ac_objext; then
11735 ac_lo=0 ac_mid=0
11736 while :; do
11737 cat >conftest.$ac_ext <<_ACEOF
11738/* confdefs.h. */
11739_ACEOF
11740cat confdefs.h >>conftest.$ac_ext
11741cat >>conftest.$ac_ext <<_ACEOF
11742/* end confdefs.h. */
11743$ac_includes_default
11744 typedef long double ac__type_sizeof_;
11745int
11746main ()
11747{
11748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11749test_array [0] = 0
11750
11751 ;
11752 return 0;
11753}
11754_ACEOF
11755rm -f conftest.$ac_objext
11756if { (ac_try="$ac_compile"
11757case "(($ac_try" in
11758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11759 *) ac_try_echo=$ac_try;;
11760esac
11761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11762 (eval "$ac_compile") 2>conftest.er1
11763 ac_status=$?
11764 grep -v '^ *+' conftest.er1 >conftest.err
11765 rm -f conftest.er1
11766 cat conftest.err >&5
11767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768 (exit $ac_status); } && {
11769 test -z "$ac_c_werror_flag" ||
11770 test ! -s conftest.err
11771 } && test -s conftest.$ac_objext; then
11772 ac_hi=$ac_mid; break
11773else
11774 echo "$as_me: failed program was:" >&5
11775sed 's/^/| /' conftest.$ac_ext >&5
11776
11777 ac_lo=`expr $ac_mid + 1`
11778 if test $ac_lo -le $ac_mid; then
11779 ac_lo= ac_hi=
11780 break
11781 fi
11782 ac_mid=`expr 2 '*' $ac_mid + 1`
11783fi
11784
11785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11786 done
11787else
11788 echo "$as_me: failed program was:" >&5
11789sed 's/^/| /' conftest.$ac_ext >&5
11790
11791 cat >conftest.$ac_ext <<_ACEOF
11792/* confdefs.h. */
11793_ACEOF
11794cat confdefs.h >>conftest.$ac_ext
11795cat >>conftest.$ac_ext <<_ACEOF
11796/* end confdefs.h. */
11797$ac_includes_default
11798 typedef long double ac__type_sizeof_;
11799int
11800main ()
11801{
11802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11803test_array [0] = 0
11804
11805 ;
11806 return 0;
11807}
11808_ACEOF
11809rm -f conftest.$ac_objext
11810if { (ac_try="$ac_compile"
11811case "(($ac_try" in
11812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11813 *) ac_try_echo=$ac_try;;
11814esac
11815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11816 (eval "$ac_compile") 2>conftest.er1
11817 ac_status=$?
11818 grep -v '^ *+' conftest.er1 >conftest.err
11819 rm -f conftest.er1
11820 cat conftest.err >&5
11821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11822 (exit $ac_status); } && {
11823 test -z "$ac_c_werror_flag" ||
11824 test ! -s conftest.err
11825 } && test -s conftest.$ac_objext; then
11826 ac_hi=-1 ac_mid=-1
11827 while :; do
11828 cat >conftest.$ac_ext <<_ACEOF
11829/* confdefs.h. */
11830_ACEOF
11831cat confdefs.h >>conftest.$ac_ext
11832cat >>conftest.$ac_ext <<_ACEOF
11833/* end confdefs.h. */
11834$ac_includes_default
11835 typedef long double ac__type_sizeof_;
11836int
11837main ()
11838{
11839static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11840test_array [0] = 0
11841
11842 ;
11843 return 0;
11844}
11845_ACEOF
11846rm -f conftest.$ac_objext
11847if { (ac_try="$ac_compile"
11848case "(($ac_try" in
11849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11850 *) ac_try_echo=$ac_try;;
11851esac
11852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11853 (eval "$ac_compile") 2>conftest.er1
11854 ac_status=$?
11855 grep -v '^ *+' conftest.er1 >conftest.err
11856 rm -f conftest.er1
11857 cat conftest.err >&5
11858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11859 (exit $ac_status); } && {
11860 test -z "$ac_c_werror_flag" ||
11861 test ! -s conftest.err
11862 } && test -s conftest.$ac_objext; then
11863 ac_lo=$ac_mid; break
11864else
11865 echo "$as_me: failed program was:" >&5
11866sed 's/^/| /' conftest.$ac_ext >&5
11867
11868 ac_hi=`expr '(' $ac_mid ')' - 1`
11869 if test $ac_mid -le $ac_hi; then
11870 ac_lo= ac_hi=
11871 break
11872 fi
11873 ac_mid=`expr 2 '*' $ac_mid`
11874fi
11875
11876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11877 done
11878else
11879 echo "$as_me: failed program was:" >&5
11880sed 's/^/| /' conftest.$ac_ext >&5
11881
11882 ac_lo= ac_hi=
11883fi
11884
11885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11886fi
11887
11888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11889# Binary search between lo and hi bounds.
11890while test "x$ac_lo" != "x$ac_hi"; do
11891 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11892 cat >conftest.$ac_ext <<_ACEOF
11893/* confdefs.h. */
11894_ACEOF
11895cat confdefs.h >>conftest.$ac_ext
11896cat >>conftest.$ac_ext <<_ACEOF
11897/* end confdefs.h. */
11898$ac_includes_default
11899 typedef long double ac__type_sizeof_;
11900int
11901main ()
11902{
11903static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11904test_array [0] = 0
11905
11906 ;
11907 return 0;
11908}
11909_ACEOF
11910rm -f conftest.$ac_objext
11911if { (ac_try="$ac_compile"
11912case "(($ac_try" in
11913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11914 *) ac_try_echo=$ac_try;;
11915esac
11916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11917 (eval "$ac_compile") 2>conftest.er1
11918 ac_status=$?
11919 grep -v '^ *+' conftest.er1 >conftest.err
11920 rm -f conftest.er1
11921 cat conftest.err >&5
11922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11923 (exit $ac_status); } && {
11924 test -z "$ac_c_werror_flag" ||
11925 test ! -s conftest.err
11926 } && test -s conftest.$ac_objext; then
11927 ac_hi=$ac_mid
11928else
11929 echo "$as_me: failed program was:" >&5
11930sed 's/^/| /' conftest.$ac_ext >&5
11931
11932 ac_lo=`expr '(' $ac_mid ')' + 1`
11933fi
11934
11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11936done
11937case $ac_lo in
11938?*) ac_cv_sizeof_long_double=$ac_lo;;
11939'') if test "$ac_cv_type_long_double" = yes; then
11940 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11941See \`config.log' for more details." >&5
11942echo "$as_me: error: cannot compute sizeof (long double)
11943See \`config.log' for more details." >&2;}
11944 { (exit 77); exit 77; }; }
11945 else
11946 ac_cv_sizeof_long_double=0
11947 fi ;;
11948esac
11949else
11950 cat >conftest.$ac_ext <<_ACEOF
11951/* confdefs.h. */
11952_ACEOF
11953cat confdefs.h >>conftest.$ac_ext
11954cat >>conftest.$ac_ext <<_ACEOF
11955/* end confdefs.h. */
11956$ac_includes_default
11957 typedef long double ac__type_sizeof_;
11958static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11959static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11960#include <stdio.h>
11961#include <stdlib.h>
11962int
11963main ()
11964{
11965
11966 FILE *f = fopen ("conftest.val", "w");
11967 if (! f)
11968 return 1;
11969 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11970 {
11971 long int i = longval ();
11972 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11973 return 1;
11974 fprintf (f, "%ld\n", i);
11975 }
11976 else
11977 {
11978 unsigned long int i = ulongval ();
11979 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11980 return 1;
11981 fprintf (f, "%lu\n", i);
11982 }
11983 return ferror (f) || fclose (f) != 0;
11984
11985 ;
11986 return 0;
11987}
11988_ACEOF
11989rm -f conftest$ac_exeext
11990if { (ac_try="$ac_link"
11991case "(($ac_try" in
11992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11993 *) ac_try_echo=$ac_try;;
11994esac
11995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11996 (eval "$ac_link") 2>&5
11997 ac_status=$?
11998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11999 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12000 { (case "(($ac_try" in
12001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12002 *) ac_try_echo=$ac_try;;
12003esac
12004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12005 (eval "$ac_try") 2>&5
12006 ac_status=$?
12007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12008 (exit $ac_status); }; }; then
12009 ac_cv_sizeof_long_double=`cat conftest.val`
12010else
12011 echo "$as_me: program exited with status $ac_status" >&5
12012echo "$as_me: failed program was:" >&5
12013sed 's/^/| /' conftest.$ac_ext >&5
12014
12015( exit $ac_status )
12016if test "$ac_cv_type_long_double" = yes; then
12017 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
12018See \`config.log' for more details." >&5
12019echo "$as_me: error: cannot compute sizeof (long double)
12020See \`config.log' for more details." >&2;}
12021 { (exit 77); exit 77; }; }
12022 else
12023 ac_cv_sizeof_long_double=0
12024 fi
12025fi
12026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12027fi
12028rm -f conftest.val
12029fi
12030{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12031echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
12032
12033
12034
12035cat >>confdefs.h <<_ACEOF
12036#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12037_ACEOF
12038
12039
12040fi
12041
Martin v. Löwiseba40652007-08-30 20:10:57 +000012042{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12043echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012044have_c99_bool=no
12045cat >conftest.$ac_ext <<_ACEOF
12046/* confdefs.h. */
12047_ACEOF
12048cat confdefs.h >>conftest.$ac_ext
12049cat >>conftest.$ac_ext <<_ACEOF
12050/* end confdefs.h. */
12051
12052int
12053main ()
12054{
12055_Bool x; x = (_Bool)0;
12056 ;
12057 return 0;
12058}
12059_ACEOF
12060rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012061if { (ac_try="$ac_compile"
12062case "(($ac_try" in
12063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12064 *) ac_try_echo=$ac_try;;
12065esac
12066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012068 ac_status=$?
12069 grep -v '^ *+' conftest.er1 >conftest.err
12070 rm -f conftest.er1
12071 cat conftest.err >&5
12072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012073 (exit $ac_status); } && {
12074 test -z "$ac_c_werror_flag" ||
12075 test ! -s conftest.err
12076 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012077
12078
12079cat >>confdefs.h <<\_ACEOF
12080#define HAVE_C99_BOOL 1
12081_ACEOF
12082
12083 have_c99_bool=yes
12084
12085else
12086 echo "$as_me: failed program was:" >&5
12087sed 's/^/| /' conftest.$ac_ext >&5
12088
Martin v. Löwiseba40652007-08-30 20:10:57 +000012089
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012091
12092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12093{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12094echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012095if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012096{ echo "$as_me:$LINENO: checking for _Bool" >&5
12097echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012098if test "${ac_cv_type__Bool+set}" = set; then
12099 echo $ECHO_N "(cached) $ECHO_C" >&6
12100else
12101 cat >conftest.$ac_ext <<_ACEOF
12102/* confdefs.h. */
12103_ACEOF
12104cat confdefs.h >>conftest.$ac_ext
12105cat >>conftest.$ac_ext <<_ACEOF
12106/* end confdefs.h. */
12107$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012108typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012109int
12110main ()
12111{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012112if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012113 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012114if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012115 return 0;
12116 ;
12117 return 0;
12118}
12119_ACEOF
12120rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012121if { (ac_try="$ac_compile"
12122case "(($ac_try" in
12123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12124 *) ac_try_echo=$ac_try;;
12125esac
12126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12127 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012128 ac_status=$?
12129 grep -v '^ *+' conftest.er1 >conftest.err
12130 rm -f conftest.er1
12131 cat conftest.err >&5
12132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012133 (exit $ac_status); } && {
12134 test -z "$ac_c_werror_flag" ||
12135 test ! -s conftest.err
12136 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012137 ac_cv_type__Bool=yes
12138else
12139 echo "$as_me: failed program was:" >&5
12140sed 's/^/| /' conftest.$ac_ext >&5
12141
Martin v. Löwiseba40652007-08-30 20:10:57 +000012142 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012143fi
Brett Cannon19fab762007-06-02 03:02:29 +000012144
Martin v. Löwiseba40652007-08-30 20:10:57 +000012145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12146fi
12147{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12148echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12149
12150# The cast to long int works around a bug in the HP C Compiler
12151# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12152# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12153# This bug is HP SR number 8606223364.
12154{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12155echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012156if test "${ac_cv_sizeof__Bool+set}" = set; then
12157 echo $ECHO_N "(cached) $ECHO_C" >&6
12158else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012159 if test "$cross_compiling" = yes; then
12160 # Depending upon the size, compute the lo and hi bounds.
12161cat >conftest.$ac_ext <<_ACEOF
12162/* confdefs.h. */
12163_ACEOF
12164cat confdefs.h >>conftest.$ac_ext
12165cat >>conftest.$ac_ext <<_ACEOF
12166/* end confdefs.h. */
12167$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012168 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012169int
12170main ()
12171{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012173test_array [0] = 0
12174
12175 ;
12176 return 0;
12177}
12178_ACEOF
12179rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012180if { (ac_try="$ac_compile"
12181case "(($ac_try" in
12182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12183 *) ac_try_echo=$ac_try;;
12184esac
12185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012187 ac_status=$?
12188 grep -v '^ *+' conftest.er1 >conftest.err
12189 rm -f conftest.er1
12190 cat conftest.err >&5
12191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012192 (exit $ac_status); } && {
12193 test -z "$ac_c_werror_flag" ||
12194 test ! -s conftest.err
12195 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012196 ac_lo=0 ac_mid=0
12197 while :; do
12198 cat >conftest.$ac_ext <<_ACEOF
12199/* confdefs.h. */
12200_ACEOF
12201cat confdefs.h >>conftest.$ac_ext
12202cat >>conftest.$ac_ext <<_ACEOF
12203/* end confdefs.h. */
12204$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012205 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012206int
12207main ()
12208{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012209static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012210test_array [0] = 0
12211
12212 ;
12213 return 0;
12214}
12215_ACEOF
12216rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012217if { (ac_try="$ac_compile"
12218case "(($ac_try" in
12219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12220 *) ac_try_echo=$ac_try;;
12221esac
12222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012224 ac_status=$?
12225 grep -v '^ *+' conftest.er1 >conftest.err
12226 rm -f conftest.er1
12227 cat conftest.err >&5
12228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012229 (exit $ac_status); } && {
12230 test -z "$ac_c_werror_flag" ||
12231 test ! -s conftest.err
12232 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012233 ac_hi=$ac_mid; break
12234else
12235 echo "$as_me: failed program was:" >&5
12236sed 's/^/| /' conftest.$ac_ext >&5
12237
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238 ac_lo=`expr $ac_mid + 1`
12239 if test $ac_lo -le $ac_mid; then
12240 ac_lo= ac_hi=
12241 break
12242 fi
12243 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012245
12246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012247 done
12248else
12249 echo "$as_me: failed program was:" >&5
12250sed 's/^/| /' conftest.$ac_ext >&5
12251
Martin v. Löwiseba40652007-08-30 20:10:57 +000012252 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012253/* confdefs.h. */
12254_ACEOF
12255cat confdefs.h >>conftest.$ac_ext
12256cat >>conftest.$ac_ext <<_ACEOF
12257/* end confdefs.h. */
12258$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012259 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012260int
12261main ()
12262{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012263static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012264test_array [0] = 0
12265
12266 ;
12267 return 0;
12268}
12269_ACEOF
12270rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012271if { (ac_try="$ac_compile"
12272case "(($ac_try" in
12273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12274 *) ac_try_echo=$ac_try;;
12275esac
12276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012278 ac_status=$?
12279 grep -v '^ *+' conftest.er1 >conftest.err
12280 rm -f conftest.er1
12281 cat conftest.err >&5
12282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012283 (exit $ac_status); } && {
12284 test -z "$ac_c_werror_flag" ||
12285 test ! -s conftest.err
12286 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012287 ac_hi=-1 ac_mid=-1
12288 while :; do
12289 cat >conftest.$ac_ext <<_ACEOF
12290/* confdefs.h. */
12291_ACEOF
12292cat confdefs.h >>conftest.$ac_ext
12293cat >>conftest.$ac_ext <<_ACEOF
12294/* end confdefs.h. */
12295$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012296 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012297int
12298main ()
12299{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012301test_array [0] = 0
12302
12303 ;
12304 return 0;
12305}
12306_ACEOF
12307rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012308if { (ac_try="$ac_compile"
12309case "(($ac_try" in
12310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12311 *) ac_try_echo=$ac_try;;
12312esac
12313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12314 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012315 ac_status=$?
12316 grep -v '^ *+' conftest.er1 >conftest.err
12317 rm -f conftest.er1
12318 cat conftest.err >&5
12319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012320 (exit $ac_status); } && {
12321 test -z "$ac_c_werror_flag" ||
12322 test ! -s conftest.err
12323 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012324 ac_lo=$ac_mid; break
12325else
12326 echo "$as_me: failed program was:" >&5
12327sed 's/^/| /' conftest.$ac_ext >&5
12328
Martin v. Löwiseba40652007-08-30 20:10:57 +000012329 ac_hi=`expr '(' $ac_mid ')' - 1`
12330 if test $ac_mid -le $ac_hi; then
12331 ac_lo= ac_hi=
12332 break
12333 fi
12334 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336
12337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012338 done
12339else
12340 echo "$as_me: failed program was:" >&5
12341sed 's/^/| /' conftest.$ac_ext >&5
12342
Martin v. Löwiseba40652007-08-30 20:10:57 +000012343 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012345
12346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012348
12349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012350# Binary search between lo and hi bounds.
12351while test "x$ac_lo" != "x$ac_hi"; do
12352 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12353 cat >conftest.$ac_ext <<_ACEOF
12354/* confdefs.h. */
12355_ACEOF
12356cat confdefs.h >>conftest.$ac_ext
12357cat >>conftest.$ac_ext <<_ACEOF
12358/* end confdefs.h. */
12359$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012360 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012361int
12362main ()
12363{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012365test_array [0] = 0
12366
12367 ;
12368 return 0;
12369}
12370_ACEOF
12371rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372if { (ac_try="$ac_compile"
12373case "(($ac_try" in
12374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12375 *) ac_try_echo=$ac_try;;
12376esac
12377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012379 ac_status=$?
12380 grep -v '^ *+' conftest.er1 >conftest.err
12381 rm -f conftest.er1
12382 cat conftest.err >&5
12383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012384 (exit $ac_status); } && {
12385 test -z "$ac_c_werror_flag" ||
12386 test ! -s conftest.err
12387 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012388 ac_hi=$ac_mid
12389else
12390 echo "$as_me: failed program was:" >&5
12391sed 's/^/| /' conftest.$ac_ext >&5
12392
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012395
12396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012397done
12398case $ac_lo in
12399?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012400'') if test "$ac_cv_type__Bool" = yes; then
12401 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012402See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012404See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012405 { (exit 77); exit 77; }; }
12406 else
12407 ac_cv_sizeof__Bool=0
12408 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012409esac
12410else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012411 cat >conftest.$ac_ext <<_ACEOF
12412/* confdefs.h. */
12413_ACEOF
12414cat confdefs.h >>conftest.$ac_ext
12415cat >>conftest.$ac_ext <<_ACEOF
12416/* end confdefs.h. */
12417$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012418 typedef _Bool ac__type_sizeof_;
12419static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12420static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012421#include <stdio.h>
12422#include <stdlib.h>
12423int
12424main ()
12425{
12426
12427 FILE *f = fopen ("conftest.val", "w");
12428 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012429 return 1;
12430 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012431 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432 long int i = longval ();
12433 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12434 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012435 fprintf (f, "%ld\n", i);
12436 }
12437 else
12438 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012439 unsigned long int i = ulongval ();
12440 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12441 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012442 fprintf (f, "%lu\n", i);
12443 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012444 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012445
12446 ;
12447 return 0;
12448}
12449_ACEOF
12450rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012451if { (ac_try="$ac_link"
12452case "(($ac_try" in
12453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12454 *) ac_try_echo=$ac_try;;
12455esac
12456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12457 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012458 ac_status=$?
12459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12460 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012461 { (case "(($ac_try" in
12462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12463 *) ac_try_echo=$ac_try;;
12464esac
12465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12466 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012467 ac_status=$?
12468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12469 (exit $ac_status); }; }; then
12470 ac_cv_sizeof__Bool=`cat conftest.val`
12471else
12472 echo "$as_me: program exited with status $ac_status" >&5
12473echo "$as_me: failed program was:" >&5
12474sed 's/^/| /' conftest.$ac_ext >&5
12475
12476( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012477if test "$ac_cv_type__Bool" = yes; then
12478 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012479See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012480echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012481See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482 { (exit 77); exit 77; }; }
12483 else
12484 ac_cv_sizeof__Bool=0
12485 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487rm -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 +000012488fi
12489rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012491{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12492echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12493
12494
12495
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012496cat >>confdefs.h <<_ACEOF
12497#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12498_ACEOF
12499
12500
12501fi
12502
Martin v. Löwiseba40652007-08-30 20:10:57 +000012503{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12504echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012505if test "${ac_cv_type_uintptr_t+set}" = set; then
12506 echo $ECHO_N "(cached) $ECHO_C" >&6
12507else
12508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012509/* confdefs.h. */
12510_ACEOF
12511cat confdefs.h >>conftest.$ac_ext
12512cat >>conftest.$ac_ext <<_ACEOF
12513/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012514#ifdef HAVE_STDINT_H
12515 #include <stdint.h>
12516 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012517
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012519int
12520main ()
12521{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012522if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012523 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012524if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012525 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 ;
12527 return 0;
12528}
12529_ACEOF
12530rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012531if { (ac_try="$ac_compile"
12532case "(($ac_try" in
12533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12534 *) ac_try_echo=$ac_try;;
12535esac
12536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012539 grep -v '^ *+' conftest.er1 >conftest.err
12540 rm -f conftest.er1
12541 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012543 (exit $ac_status); } && {
12544 test -z "$ac_c_werror_flag" ||
12545 test ! -s conftest.err
12546 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012547 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012548else
Martin v. Löwis11437992002-04-12 09:54:03 +000012549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012550sed 's/^/| /' conftest.$ac_ext >&5
12551
Martin v. Löwiseba40652007-08-30 20:10:57 +000012552 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012554
12555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012557{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12558echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012559if test $ac_cv_type_uintptr_t = yes; then
12560
12561cat >>confdefs.h <<_ACEOF
12562#define HAVE_UINTPTR_T 1
12563_ACEOF
12564
Martin v. Löwiseba40652007-08-30 20:10:57 +000012565{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12566echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012567if test "${ac_cv_type_uintptr_t+set}" = set; then
12568 echo $ECHO_N "(cached) $ECHO_C" >&6
12569else
12570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012571/* confdefs.h. */
12572_ACEOF
12573cat confdefs.h >>conftest.$ac_ext
12574cat >>conftest.$ac_ext <<_ACEOF
12575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012576$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012577typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012578int
12579main ()
12580{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012581if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012582 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012583if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 return 0;
12585 ;
12586 return 0;
12587}
12588_ACEOF
12589rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012590if { (ac_try="$ac_compile"
12591case "(($ac_try" in
12592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12593 *) ac_try_echo=$ac_try;;
12594esac
12595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12596 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012598 grep -v '^ *+' conftest.er1 >conftest.err
12599 rm -f conftest.er1
12600 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012602 (exit $ac_status); } && {
12603 test -z "$ac_c_werror_flag" ||
12604 test ! -s conftest.err
12605 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012606 ac_cv_type_uintptr_t=yes
12607else
12608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012609sed 's/^/| /' conftest.$ac_ext >&5
12610
Martin v. Löwiseba40652007-08-30 20:10:57 +000012611 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012612fi
Brett Cannon19fab762007-06-02 03:02:29 +000012613
Martin v. Löwiseba40652007-08-30 20:10:57 +000012614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12615fi
12616{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12617echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12618
12619# The cast to long int works around a bug in the HP C Compiler
12620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12622# This bug is HP SR number 8606223364.
12623{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12624echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012625if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12626 echo $ECHO_N "(cached) $ECHO_C" >&6
12627else
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 if test "$cross_compiling" = yes; then
12629 # Depending upon the size, compute the lo and hi bounds.
12630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012631/* confdefs.h. */
12632_ACEOF
12633cat confdefs.h >>conftest.$ac_ext
12634cat >>conftest.$ac_ext <<_ACEOF
12635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012636$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012637 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012638int
12639main ()
12640{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012641static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012642test_array [0] = 0
12643
12644 ;
12645 return 0;
12646}
12647_ACEOF
12648rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012649if { (ac_try="$ac_compile"
12650case "(($ac_try" in
12651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12652 *) ac_try_echo=$ac_try;;
12653esac
12654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012657 grep -v '^ *+' conftest.er1 >conftest.err
12658 rm -f conftest.er1
12659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012661 (exit $ac_status); } && {
12662 test -z "$ac_c_werror_flag" ||
12663 test ! -s conftest.err
12664 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 ac_lo=0 ac_mid=0
12666 while :; do
12667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012668/* confdefs.h. */
12669_ACEOF
12670cat confdefs.h >>conftest.$ac_ext
12671cat >>conftest.$ac_ext <<_ACEOF
12672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012673$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012674 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012675int
12676main ()
12677{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012679test_array [0] = 0
12680
12681 ;
12682 return 0;
12683}
12684_ACEOF
12685rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012686if { (ac_try="$ac_compile"
12687case "(($ac_try" in
12688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12689 *) ac_try_echo=$ac_try;;
12690esac
12691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012694 grep -v '^ *+' conftest.er1 >conftest.err
12695 rm -f conftest.er1
12696 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012698 (exit $ac_status); } && {
12699 test -z "$ac_c_werror_flag" ||
12700 test ! -s conftest.err
12701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 ac_hi=$ac_mid; break
12703else
12704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012705sed 's/^/| /' conftest.$ac_ext >&5
12706
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707 ac_lo=`expr $ac_mid + 1`
12708 if test $ac_lo -le $ac_mid; then
12709 ac_lo= ac_hi=
12710 break
12711 fi
12712 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012714
12715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012716 done
12717else
12718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012719sed 's/^/| /' conftest.$ac_ext >&5
12720
Martin v. Löwiseba40652007-08-30 20:10:57 +000012721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012722/* confdefs.h. */
12723_ACEOF
12724cat confdefs.h >>conftest.$ac_ext
12725cat >>conftest.$ac_ext <<_ACEOF
12726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012727$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012728 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012729int
12730main ()
12731{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012733test_array [0] = 0
12734
12735 ;
12736 return 0;
12737}
12738_ACEOF
12739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012740if { (ac_try="$ac_compile"
12741case "(($ac_try" in
12742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12743 *) ac_try_echo=$ac_try;;
12744esac
12745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012748 grep -v '^ *+' conftest.er1 >conftest.err
12749 rm -f conftest.er1
12750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012752 (exit $ac_status); } && {
12753 test -z "$ac_c_werror_flag" ||
12754 test ! -s conftest.err
12755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 ac_hi=-1 ac_mid=-1
12757 while :; do
12758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012759/* confdefs.h. */
12760_ACEOF
12761cat confdefs.h >>conftest.$ac_ext
12762cat >>conftest.$ac_ext <<_ACEOF
12763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012764$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012765 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012766int
12767main ()
12768{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012769static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012770test_array [0] = 0
12771
12772 ;
12773 return 0;
12774}
12775_ACEOF
12776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012777if { (ac_try="$ac_compile"
12778case "(($ac_try" in
12779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12780 *) ac_try_echo=$ac_try;;
12781esac
12782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12783 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012785 grep -v '^ *+' conftest.er1 >conftest.err
12786 rm -f conftest.er1
12787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012789 (exit $ac_status); } && {
12790 test -z "$ac_c_werror_flag" ||
12791 test ! -s conftest.err
12792 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 ac_lo=$ac_mid; break
12794else
12795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012796sed 's/^/| /' conftest.$ac_ext >&5
12797
Martin v. Löwiseba40652007-08-30 20:10:57 +000012798 ac_hi=`expr '(' $ac_mid ')' - 1`
12799 if test $ac_mid -le $ac_hi; then
12800 ac_lo= ac_hi=
12801 break
12802 fi
12803 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012805
12806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 done
12808else
12809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012810sed 's/^/| /' conftest.$ac_ext >&5
12811
Martin v. Löwiseba40652007-08-30 20:10:57 +000012812 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012814
12815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012817
12818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012819# Binary search between lo and hi bounds.
12820while test "x$ac_lo" != "x$ac_hi"; do
12821 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012823/* confdefs.h. */
12824_ACEOF
12825cat confdefs.h >>conftest.$ac_ext
12826cat >>conftest.$ac_ext <<_ACEOF
12827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012828$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012829 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012830int
12831main ()
12832{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012834test_array [0] = 0
12835
12836 ;
12837 return 0;
12838}
12839_ACEOF
12840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012841if { (ac_try="$ac_compile"
12842case "(($ac_try" in
12843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12844 *) ac_try_echo=$ac_try;;
12845esac
12846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012849 grep -v '^ *+' conftest.er1 >conftest.err
12850 rm -f conftest.er1
12851 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012853 (exit $ac_status); } && {
12854 test -z "$ac_c_werror_flag" ||
12855 test ! -s conftest.err
12856 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012857 ac_hi=$ac_mid
12858else
12859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012860sed 's/^/| /' conftest.$ac_ext >&5
12861
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864
12865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012866done
12867case $ac_lo in
12868?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012869'') if test "$ac_cv_type_uintptr_t" = yes; then
12870 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012871See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012872echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012873See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012874 { (exit 77); exit 77; }; }
12875 else
12876 ac_cv_sizeof_uintptr_t=0
12877 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012878esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012879else
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012881/* confdefs.h. */
12882_ACEOF
12883cat confdefs.h >>conftest.$ac_ext
12884cat >>conftest.$ac_ext <<_ACEOF
12885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012886$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012887 typedef uintptr_t ac__type_sizeof_;
12888static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12889static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012890#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012891#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012892int
12893main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012894{
Martin v. Löwis11437992002-04-12 09:54:03 +000012895
12896 FILE *f = fopen ("conftest.val", "w");
12897 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012898 return 1;
12899 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012900 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 long int i = longval ();
12902 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12903 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 fprintf (f, "%ld\n", i);
12905 }
12906 else
12907 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012908 unsigned long int i = ulongval ();
12909 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12910 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 fprintf (f, "%lu\n", i);
12912 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012913 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012914
12915 ;
12916 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012917}
Martin v. Löwis11437992002-04-12 09:54:03 +000012918_ACEOF
12919rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012920if { (ac_try="$ac_link"
12921case "(($ac_try" in
12922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12923 *) ac_try_echo=$ac_try;;
12924esac
12925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12926 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 ac_status=$?
12928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12929 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012930 { (case "(($ac_try" in
12931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12932 *) ac_try_echo=$ac_try;;
12933esac
12934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12935 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 ac_status=$?
12937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12938 (exit $ac_status); }; }; then
12939 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012940else
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 echo "$as_me: program exited with status $ac_status" >&5
12942echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012943sed 's/^/| /' conftest.$ac_ext >&5
12944
Martin v. Löwis11437992002-04-12 09:54:03 +000012945( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012946if test "$ac_cv_type_uintptr_t" = yes; then
12947 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012948See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012949echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012950See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951 { (exit 77); exit 77; }; }
12952 else
12953 ac_cv_sizeof_uintptr_t=0
12954 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956rm -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 +000012957fi
12958rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012960{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12961echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12962
12963
12964
Martin v. Löwis11437992002-04-12 09:54:03 +000012965cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012966#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012967_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012968
Michael W. Hudson54241132001-12-07 15:38:26 +000012969
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012970fi
12971
Martin v. Löwisebe26702006-10-02 14:55:51 +000012972
12973
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012974# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012975{ echo "$as_me:$LINENO: checking size of off_t" >&5
12976echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012977if test "${ac_cv_sizeof_off_t+set}" = set; then
12978 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012979else
12980 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012981 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012982else
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012984/* confdefs.h. */
12985_ACEOF
12986cat confdefs.h >>conftest.$ac_ext
12987cat >>conftest.$ac_ext <<_ACEOF
12988/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012989#include <stdio.h>
12990#include <sys/types.h>
12991main()
12992{
12993 FILE *f=fopen("conftestval", "w");
12994 if (!f) exit(1);
12995 fprintf(f, "%d\n", sizeof(off_t));
12996 exit(0);
12997}
Martin v. Löwis11437992002-04-12 09:54:03 +000012998_ACEOF
12999rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013000if { (ac_try="$ac_link"
13001case "(($ac_try" in
13002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13003 *) ac_try_echo=$ac_try;;
13004esac
13005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13006 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 ac_status=$?
13008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013010 { (case "(($ac_try" in
13011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13012 *) ac_try_echo=$ac_try;;
13013esac
13014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13015 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 ac_status=$?
13017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13018 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013019 ac_cv_sizeof_off_t=`cat conftestval`
13020else
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 echo "$as_me: program exited with status $ac_status" >&5
13022echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013023sed 's/^/| /' conftest.$ac_ext >&5
13024
Martin v. Löwis11437992002-04-12 09:54:03 +000013025( exit $ac_status )
13026ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013028rm -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 +000013029fi
13030
Martin v. Löwiseba40652007-08-30 20:10:57 +000013031
13032
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013033fi
13034
Martin v. Löwiseba40652007-08-30 20:10:57 +000013035{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13036echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013037
13038cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013039#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013040_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013041
Michael W. Hudson54241132001-12-07 15:38:26 +000013042
Martin v. Löwiseba40652007-08-30 20:10:57 +000013043{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13044echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013045if test "$have_long_long" = yes -a \
13046 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13047 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013048
Martin v. Löwis11437992002-04-12 09:54:03 +000013049cat >>confdefs.h <<\_ACEOF
13050#define HAVE_LARGEFILE_SUPPORT 1
13051_ACEOF
13052
Martin v. Löwiseba40652007-08-30 20:10:57 +000013053 { echo "$as_me:$LINENO: result: yes" >&5
13054echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013055else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013056 { echo "$as_me:$LINENO: result: no" >&5
13057echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013058fi
13059
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013060# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013061{ echo "$as_me:$LINENO: checking size of time_t" >&5
13062echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013063if test "${ac_cv_sizeof_time_t+set}" = set; then
13064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013065else
13066 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013067 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013068else
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013070/* confdefs.h. */
13071_ACEOF
13072cat confdefs.h >>conftest.$ac_ext
13073cat >>conftest.$ac_ext <<_ACEOF
13074/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013075#include <stdio.h>
13076#include <time.h>
13077main()
13078{
13079 FILE *f=fopen("conftestval", "w");
13080 if (!f) exit(1);
13081 fprintf(f, "%d\n", sizeof(time_t));
13082 exit(0);
13083}
Martin v. Löwis11437992002-04-12 09:54:03 +000013084_ACEOF
13085rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013086if { (ac_try="$ac_link"
13087case "(($ac_try" in
13088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13089 *) ac_try_echo=$ac_try;;
13090esac
13091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13092 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 ac_status=$?
13094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13095 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013096 { (case "(($ac_try" in
13097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13098 *) ac_try_echo=$ac_try;;
13099esac
13100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13101 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 ac_status=$?
13103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13104 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013105 ac_cv_sizeof_time_t=`cat conftestval`
13106else
Martin v. Löwis11437992002-04-12 09:54:03 +000013107 echo "$as_me: program exited with status $ac_status" >&5
13108echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013109sed 's/^/| /' conftest.$ac_ext >&5
13110
Martin v. Löwis11437992002-04-12 09:54:03 +000013111( exit $ac_status )
13112ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013114rm -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 +000013115fi
13116
Martin v. Löwiseba40652007-08-30 20:10:57 +000013117
13118
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013119fi
13120
Martin v. Löwiseba40652007-08-30 20:10:57 +000013121{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13122echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013123
13124cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013125#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013126_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013127
Michael W. Hudson54241132001-12-07 15:38:26 +000013128
13129
Trent Mick635f6fb2000-08-23 21:33:05 +000013130# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013131ac_save_cc="$CC"
13132if test "$ac_cv_kpthread" = "yes"
13133then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013134elif test "$ac_cv_kthread" = "yes"
13135then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013136elif test "$ac_cv_pthread" = "yes"
13137then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013139{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13140echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013141have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013143/* confdefs.h. */
13144_ACEOF
13145cat confdefs.h >>conftest.$ac_ext
13146cat >>conftest.$ac_ext <<_ACEOF
13147/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013148#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013149int
13150main ()
13151{
Guido van Rossum12580492000-09-24 16:47:19 +000013152pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 ;
13154 return 0;
13155}
13156_ACEOF
13157rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013158if { (ac_try="$ac_compile"
13159case "(($ac_try" in
13160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13161 *) ac_try_echo=$ac_try;;
13162esac
13163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013166 grep -v '^ *+' conftest.er1 >conftest.err
13167 rm -f conftest.er1
13168 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013170 (exit $ac_status); } && {
13171 test -z "$ac_c_werror_flag" ||
13172 test ! -s conftest.err
13173 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013174 have_pthread_t=yes
13175else
Martin v. Löwis11437992002-04-12 09:54:03 +000013176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013177sed 's/^/| /' conftest.$ac_ext >&5
13178
Martin v. Löwiseba40652007-08-30 20:10:57 +000013179
Trent Mick635f6fb2000-08-23 21:33:05 +000013180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013181
13182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13183{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13184echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013185if test "$have_pthread_t" = yes ; then
13186 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013187 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13188echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013189 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
13190 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013191else
13192 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013193 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013194else
Martin v. Löwis11437992002-04-12 09:54:03 +000013195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013196/* confdefs.h. */
13197_ACEOF
13198cat confdefs.h >>conftest.$ac_ext
13199cat >>conftest.$ac_ext <<_ACEOF
13200/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013201#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013202#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013203 main()
13204 {
13205 FILE *f=fopen("conftestval", "w");
13206 if (!f) exit(1);
13207 fprintf(f, "%d\n", sizeof(pthread_t));
13208 exit(0);
13209 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013210_ACEOF
13211rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013212if { (ac_try="$ac_link"
13213case "(($ac_try" in
13214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13215 *) ac_try_echo=$ac_try;;
13216esac
13217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13218 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 ac_status=$?
13220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013222 { (case "(($ac_try" in
13223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13224 *) ac_try_echo=$ac_try;;
13225esac
13226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13227 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 ac_status=$?
13229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13230 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013231 ac_cv_sizeof_pthread_t=`cat conftestval`
13232else
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 echo "$as_me: program exited with status $ac_status" >&5
13234echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013235sed 's/^/| /' conftest.$ac_ext >&5
13236
Martin v. Löwis11437992002-04-12 09:54:03 +000013237( exit $ac_status )
13238ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013240rm -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 +000013241fi
13242
Martin v. Löwiseba40652007-08-30 20:10:57 +000013243
13244
Trent Mick635f6fb2000-08-23 21:33:05 +000013245fi
13246
Martin v. Löwiseba40652007-08-30 20:10:57 +000013247 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13248echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013249
13250cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013251#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013252_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013253
13254fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013255CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013256
Martin v. Löwiseba40652007-08-30 20:10:57 +000013257{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
13258echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
13259# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000013260if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013261 enableval=$enable_toolbox_glue;
13262fi
Jack Jansene578a632001-08-15 01:27:14 +000013263
13264
13265if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000013266then
Jack Jansene578a632001-08-15 01:27:14 +000013267 case $ac_sys_system/$ac_sys_release in
13268 Darwin/*)
13269 enable_toolbox_glue="yes";;
13270 *)
13271 enable_toolbox_glue="no";;
13272 esac
13273fi
13274case "$enable_toolbox_glue" in
13275yes)
Jack Jansene578a632001-08-15 01:27:14 +000013276 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013277 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
13279cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013280#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013281_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013282
13283 ;;
13284*)
Jack Jansene578a632001-08-15 01:27:14 +000013285 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000013286 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000013287 ;;
13288esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013289{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
13290echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013291
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013292
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013293
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013294case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013295 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013296 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13297 ;;
13298 Darwin/*)
13299 OTHER_LIBTOOL_OPT=""
13300 ;;
13301esac
13302
13303
13304case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013305 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000013306 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13307 if test "${enable_universalsdk}"; then
13308 :
13309 else
13310 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
13311 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013312 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013313 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013314 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013315 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13316 if test ${gcc_version} '<' 4.0
13317 then
13318 LIBTOOL_CRUFT="-lcc_dynamic"
13319 else
13320 LIBTOOL_CRUFT=""
13321 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000013322 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000013323 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013324 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013325esac
13326
Martin v. Löwiseba40652007-08-30 20:10:57 +000013327{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13328echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013329if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013330then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013331 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013332 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013333 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013334
Martin v. Löwis11437992002-04-12 09:54:03 +000013335cat >>confdefs.h <<\_ACEOF
13336#define WITH_NEXT_FRAMEWORK 1
13337_ACEOF
13338
Martin v. Löwiseba40652007-08-30 20:10:57 +000013339 { echo "$as_me:$LINENO: result: yes" >&5
13340echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013341else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013342 { echo "$as_me:$LINENO: result: no" >&5
13343echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013344fi
13345
Martin v. Löwiseba40652007-08-30 20:10:57 +000013346{ echo "$as_me:$LINENO: checking for dyld" >&5
13347echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013348case $ac_sys_system/$ac_sys_release in
13349 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351cat >>confdefs.h <<\_ACEOF
13352#define WITH_DYLD 1
13353_ACEOF
13354
Martin v. Löwiseba40652007-08-30 20:10:57 +000013355 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13356echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013357 ;;
13358 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013359 { echo "$as_me:$LINENO: result: no" >&5
13360echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013361 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013362esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013363
Guido van Rossum0a516c91994-09-12 10:58:40 +000013364# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013365
Michael W. Hudson54241132001-12-07 15:38:26 +000013366
13367
13368
13369
Guido van Rossum0a516c91994-09-12 10:58:40 +000013370# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013371# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000013372{ echo "$as_me:$LINENO: checking SO" >&5
13373echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013374if test -z "$SO"
13375then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013376 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000013377 hp*|HP*)
13378 case `uname -m` in
13379 ia64) SO=.so;;
13380 *) SO=.sl;;
13381 esac
13382 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013383 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013384 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013385 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013386else
13387 # this might also be a termcap variable, see #610332
13388 echo
13389 echo '====================================================================='
13390 echo '+ +'
13391 echo '+ WARNING: You have set SO in your environment. +'
13392 echo '+ Do you really mean to change the extension for shared libraries? +'
13393 echo '+ Continuing in 10 seconds to let you to ponder. +'
13394 echo '+ +'
13395 echo '====================================================================='
13396 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013398{ echo "$as_me:$LINENO: result: $SO" >&5
13399echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013400
Ronald Oussoren79f90492009-01-02 10:44:46 +000013401
Neal Norwitz58e28882006-05-19 07:00:58 +000013402cat >>confdefs.h <<_ACEOF
13403#define SHLIB_EXT "$SO"
13404_ACEOF
13405
Guido van Rossum0a516c91994-09-12 10:58:40 +000013406# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013407# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013408# (Shared libraries in this instance are shared modules to be loaded into
13409# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013410{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13411echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013412if test -z "$LDSHARED"
13413then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013414 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013415 AIX*)
13416 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013417 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013418 ;;
13419 BeOS*)
13420 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013421 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013422 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013423 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013424 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013426 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013427 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013428 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013429 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013430 hp*|HP*)
13431 if test "$GCC" = "yes"
13432 then LDSHARED='$(CC) -shared'
13433 else LDSHARED='ld -b';
13434 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013435 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013436 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013437 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13438 if test "$enable_framework" ; then
13439 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013440 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13441 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013442 else
13443 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013444 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013445 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013446 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013447 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13448 if test "$enable_framework" ; then
13449 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013450 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13451 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013452 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013453 # No framework, use the Python app as bundle-loader
13454 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013455 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013456 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013457 Darwin/*)
13458 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13459 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013460
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013461 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013462 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013463 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013464 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013465 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013466 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13467 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013468 else
13469 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13470 if test "$enable_framework" ; then
13471 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013472 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13473 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013474 else
13475 # No framework, use the Python app as bundle-loader
13476 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13477 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13478 fi
13479 fi
13480 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013481 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013482 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013483 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013484 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013485 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013486 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013487 else
13488 LDSHARED="ld -Bshareable ${LDFLAGS}"
13489 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013490 OpenBSD*)
13491 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13492 then
13493 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13494 else
13495 case `uname -r` in
13496 [01].* | 2.[0-7] | 2.[0-7].*)
13497 LDSHARED="ld -Bshareable ${LDFLAGS}"
13498 ;;
13499 *)
13500 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13501 ;;
13502 esac
13503 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013504 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013505 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013506 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013507 then LDSHARED='$(CC) -shared'
13508 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013509 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013510 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013511 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013512 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013513 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013514 *) LDSHARED="ld";;
13515 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013517{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13518echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013519BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013520# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013521# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13523echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013524if test -z "$CCSHARED"
13525then
Guido van Rossum07397971997-04-29 21:49:50 +000013526 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013527 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013528 then CCSHARED="-fPIC";
13529 elif test `uname -p` = sparc;
13530 then CCSHARED="-xcode=pic32";
13531 else CCSHARED="-Kpic";
13532 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013533 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013534 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013535 else CCSHARED="+z";
13536 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013537 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013538 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013539 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013540 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013541 if test "$GCC" = "yes"
13542 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013543 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013544 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013545 SCO_SV*)
13546 if test "$GCC" = "yes"
13547 then CCSHARED="-fPIC"
13548 else CCSHARED="-Kpic -belf"
13549 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013550 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013551 IRIX*/6*) case $CC in
13552 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013553 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013554 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013555 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013556 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013558{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13559echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013560# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013561# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013562{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13563echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013564if test -z "$LINKFORSHARED"
13565then
Guido van Rossum07397971997-04-29 21:49:50 +000013566 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013567 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013568 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013569 LINKFORSHARED="-Wl,-E -Wl,+s";;
13570# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013571 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013572 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013573 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013574 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013575 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13576 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013577 # not used by the core itself but which needs to be in the core so
13578 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013579 # -prebind is no longer used, because it actually seems to give a
13580 # slowdown in stead of a speedup, maybe due to the large number of
13581 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013582
13583 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013584 if test "$enable_framework"
13585 then
Jack Jansenda49e192005-01-07 13:08:22 +000013586 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013587 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013588 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013589 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013590 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013591 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013592 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013593 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13594 then
13595 LINKFORSHARED="-Wl,--export-dynamic"
13596 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013597 SunOS/5*) case $CC in
13598 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013599 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013600 then
13601 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013602 fi;;
13603 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013604 CYGWIN*)
13605 if test $enable_shared = "no"
13606 then
13607 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13608 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013609 QNX*)
13610 # -Wl,-E causes the symbols to be added to the dynamic
13611 # symbol table so that they can be found when a module
13612 # is loaded. -N 2048K causes the stack size to be set
13613 # to 2048 kilobytes so that the stack doesn't overflow
13614 # when running test_compile.py.
13615 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013616 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013618{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13619echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013620
Michael W. Hudson54241132001-12-07 15:38:26 +000013621
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013622
Martin v. Löwiseba40652007-08-30 20:10:57 +000013623{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13624echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013625if test ! "$LIBRARY" = "$LDLIBRARY"
13626then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013627 case $ac_sys_system in
13628 CYGWIN*)
13629 # Cygwin needs CCSHARED when building extension DLLs
13630 # but not when building the interpreter DLL.
13631 CFLAGSFORSHARED='';;
13632 *)
13633 CFLAGSFORSHARED='$(CCSHARED)'
13634 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013636{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13637echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013638
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013639# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13640# library (with --enable-shared).
13641# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013642# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13643# if it is not required, since it creates a dependency of the shared library
13644# to LIBS. This, in turn, means that applications linking the shared libpython
13645# don't need to link LIBS explicitly. The default should be only changed
13646# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013647
Martin v. Löwiseba40652007-08-30 20:10:57 +000013648{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13649echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013650case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013651 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013652 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013653esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013654{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13655echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013656
13657
Guido van Rossum627b2d71993-12-24 10:39:16 +000013658# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
Martin v. Löwiseba40652007-08-30 20:10:57 +000013660{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13661echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013662if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013664else
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013666LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013668/* confdefs.h. */
13669_ACEOF
13670cat confdefs.h >>conftest.$ac_ext
13671cat >>conftest.$ac_ext <<_ACEOF
13672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013673
Martin v. Löwiseba40652007-08-30 20:10:57 +000013674/* Override any GCC internal prototype to avoid an error.
13675 Use char because int might match the return type of a GCC
13676 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013677#ifdef __cplusplus
13678extern "C"
13679#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013680char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013681int
13682main ()
13683{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013684return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013685 ;
13686 return 0;
13687}
13688_ACEOF
13689rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013690if { (ac_try="$ac_link"
13691case "(($ac_try" in
13692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13693 *) ac_try_echo=$ac_try;;
13694esac
13695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13696 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013698 grep -v '^ *+' conftest.er1 >conftest.err
13699 rm -f conftest.er1
13700 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013702 (exit $ac_status); } && {
13703 test -z "$ac_c_werror_flag" ||
13704 test ! -s conftest.err
13705 } && test -s conftest$ac_exeext &&
13706 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013708else
Martin v. Löwis11437992002-04-12 09:54:03 +000013709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013710sed 's/^/| /' conftest.$ac_ext >&5
13711
Martin v. Löwiseba40652007-08-30 20:10:57 +000013712 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013714
13715rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013716 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013717LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013719{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13720echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013721if test $ac_cv_lib_dl_dlopen = yes; then
13722 cat >>confdefs.h <<_ACEOF
13723#define HAVE_LIBDL 1
13724_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013725
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013726 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728fi
13729 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013730
Martin v. Löwiseba40652007-08-30 20:10:57 +000013731{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13732echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013733if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735else
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013737LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013739/* confdefs.h. */
13740_ACEOF
13741cat confdefs.h >>conftest.$ac_ext
13742cat >>conftest.$ac_ext <<_ACEOF
13743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013744
Martin v. Löwiseba40652007-08-30 20:10:57 +000013745/* Override any GCC internal prototype to avoid an error.
13746 Use char because int might match the return type of a GCC
13747 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013748#ifdef __cplusplus
13749extern "C"
13750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013751char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013752int
13753main ()
13754{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013755return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 ;
13757 return 0;
13758}
13759_ACEOF
13760rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013761if { (ac_try="$ac_link"
13762case "(($ac_try" in
13763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13764 *) ac_try_echo=$ac_try;;
13765esac
13766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13767 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013769 grep -v '^ *+' conftest.er1 >conftest.err
13770 rm -f conftest.er1
13771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013773 (exit $ac_status); } && {
13774 test -z "$ac_c_werror_flag" ||
13775 test ! -s conftest.err
13776 } && test -s conftest$ac_exeext &&
13777 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013779else
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013781sed 's/^/| /' conftest.$ac_ext >&5
13782
Martin v. Löwiseba40652007-08-30 20:10:57 +000013783 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013785
13786rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013788LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013790{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13791echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013792if test $ac_cv_lib_dld_shl_load = yes; then
13793 cat >>confdefs.h <<_ACEOF
13794#define HAVE_LIBDLD 1
13795_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013797 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013798
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799fi
13800 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013801
Ronald Oussoren79f90492009-01-02 10:44:46 +000013802# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013803if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013804 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13805echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013806if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013808else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013809 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013811/* confdefs.h. */
13812_ACEOF
13813cat confdefs.h >>conftest.$ac_ext
13814cat >>conftest.$ac_ext <<_ACEOF
13815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
Martin v. Löwiseba40652007-08-30 20:10:57 +000013817/* Override any GCC internal prototype to avoid an error.
13818 Use char because int might match the return type of a GCC
13819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013820#ifdef __cplusplus
13821extern "C"
13822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013823char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013824int
13825main ()
13826{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013827return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 ;
13829 return 0;
13830}
13831_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013832for ac_lib in '' pthread rt posix4; do
13833 if test -z "$ac_lib"; then
13834 ac_res="none required"
13835 else
13836 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013837 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013838 fi
13839 rm -f conftest.$ac_objext conftest$ac_exeext
13840if { (ac_try="$ac_link"
13841case "(($ac_try" in
13842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13843 *) ac_try_echo=$ac_try;;
13844esac
13845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13846 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013847 ac_status=$?
13848 grep -v '^ *+' conftest.er1 >conftest.err
13849 rm -f conftest.er1
13850 cat conftest.err >&5
13851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852 (exit $ac_status); } && {
13853 test -z "$ac_c_werror_flag" ||
13854 test ! -s conftest.err
13855 } && test -s conftest$ac_exeext &&
13856 $as_test_x conftest$ac_exeext; then
13857 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013858else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013859 echo "$as_me: failed program was:" >&5
13860sed 's/^/| /' conftest.$ac_ext >&5
13861
Martin v. Löwiseba40652007-08-30 20:10:57 +000013862
Brett Cannon19fab762007-06-02 03:02:29 +000013863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013864
13865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13866 conftest$ac_exeext
13867 if test "${ac_cv_search_sem_init+set}" = set; then
13868 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013870done
13871if test "${ac_cv_search_sem_init+set}" = set; then
13872 :
13873else
13874 ac_cv_search_sem_init=no
13875fi
13876rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013877LIBS=$ac_func_search_save_LIBS
13878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013879{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13880echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13881ac_res=$ac_cv_search_sem_init
13882if test "$ac_res" != no; then
13883 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013884
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013885fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013886 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013887 # posix4 on Solaris 2.6
13888 # pthread (first!) on Linux
13889fi
13890
Martin v. Löwis19d17342003-06-14 21:03:05 +000013891# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013892{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13893echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013894if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13895 echo $ECHO_N "(cached) $ECHO_C" >&6
13896else
13897 ac_check_lib_save_LIBS=$LIBS
13898LIBS="-lintl $LIBS"
13899cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013900/* confdefs.h. */
13901_ACEOF
13902cat confdefs.h >>conftest.$ac_ext
13903cat >>conftest.$ac_ext <<_ACEOF
13904/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013905
Martin v. Löwiseba40652007-08-30 20:10:57 +000013906/* Override any GCC internal prototype to avoid an error.
13907 Use char because int might match the return type of a GCC
13908 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013909#ifdef __cplusplus
13910extern "C"
13911#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013912char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013913int
13914main ()
13915{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013916return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013917 ;
13918 return 0;
13919}
13920_ACEOF
13921rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013922if { (ac_try="$ac_link"
13923case "(($ac_try" in
13924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13925 *) ac_try_echo=$ac_try;;
13926esac
13927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13928 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013930 grep -v '^ *+' conftest.er1 >conftest.err
13931 rm -f conftest.er1
13932 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013934 (exit $ac_status); } && {
13935 test -z "$ac_c_werror_flag" ||
13936 test ! -s conftest.err
13937 } && test -s conftest$ac_exeext &&
13938 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013939 ac_cv_lib_intl_textdomain=yes
13940else
13941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013942sed 's/^/| /' conftest.$ac_ext >&5
13943
Martin v. Löwiseba40652007-08-30 20:10:57 +000013944 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013946
13947rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013948 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013949LIBS=$ac_check_lib_save_LIBS
13950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013951{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13952echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013953if test $ac_cv_lib_intl_textdomain = yes; then
13954
13955cat >>confdefs.h <<\_ACEOF
13956#define WITH_LIBINTL 1
13957_ACEOF
13958
13959fi
13960
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013961
13962# checks for system dependent C++ extensions support
13963case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013964 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13965echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013967/* confdefs.h. */
13968_ACEOF
13969cat confdefs.h >>conftest.$ac_ext
13970cat >>conftest.$ac_ext <<_ACEOF
13971/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013972#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013973int
13974main ()
13975{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013976loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013977 ;
13978 return 0;
13979}
13980_ACEOF
13981rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013982if { (ac_try="$ac_link"
13983case "(($ac_try" in
13984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13985 *) ac_try_echo=$ac_try;;
13986esac
13987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13988 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013990 grep -v '^ *+' conftest.er1 >conftest.err
13991 rm -f conftest.er1
13992 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013994 (exit $ac_status); } && {
13995 test -z "$ac_c_werror_flag" ||
13996 test ! -s conftest.err
13997 } && test -s conftest$ac_exeext &&
13998 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013999
Martin v. Löwis11437992002-04-12 09:54:03 +000014000cat >>confdefs.h <<\_ACEOF
14001#define AIX_GENUINE_CPLUSPLUS 1
14002_ACEOF
14003
Martin v. Löwiseba40652007-08-30 20:10:57 +000014004 { echo "$as_me:$LINENO: result: yes" >&5
14005echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014006else
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014008sed 's/^/| /' conftest.$ac_ext >&5
14009
Martin v. Löwiseba40652007-08-30 20:10:57 +000014010 { echo "$as_me:$LINENO: result: no" >&5
14011echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014013
14014rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014015 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014016 *) ;;
14017esac
14018
Guido van Rossum70c7f481998-03-26 18:44:10 +000014019# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014020# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014021{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14022echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014023if test "${ac_cv_lib_nsl_t_open+set}" = set; then
14024 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014025else
Martin v. Löwis11437992002-04-12 09:54:03 +000014026 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014027LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014028cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014029/* confdefs.h. */
14030_ACEOF
14031cat confdefs.h >>conftest.$ac_ext
14032cat >>conftest.$ac_ext <<_ACEOF
14033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014034
Martin v. Löwiseba40652007-08-30 20:10:57 +000014035/* Override any GCC internal prototype to avoid an error.
14036 Use char because int might match the return type of a GCC
14037 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014038#ifdef __cplusplus
14039extern "C"
14040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014041char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014042int
14043main ()
14044{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014045return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014046 ;
14047 return 0;
14048}
14049_ACEOF
14050rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014051if { (ac_try="$ac_link"
14052case "(($ac_try" in
14053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14054 *) ac_try_echo=$ac_try;;
14055esac
14056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14057 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014059 grep -v '^ *+' conftest.er1 >conftest.err
14060 rm -f conftest.er1
14061 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014063 (exit $ac_status); } && {
14064 test -z "$ac_c_werror_flag" ||
14065 test ! -s conftest.err
14066 } && test -s conftest$ac_exeext &&
14067 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014069else
Martin v. Löwis11437992002-04-12 09:54:03 +000014070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014071sed 's/^/| /' conftest.$ac_ext >&5
14072
Martin v. Löwiseba40652007-08-30 20:10:57 +000014073 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014075
14076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014078LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014080{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14081echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014082if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014083 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014084fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014085 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000014086{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14087echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014088if test "${ac_cv_lib_socket_socket+set}" = set; then
14089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014090else
Martin v. Löwis11437992002-04-12 09:54:03 +000014091 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014092LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014094/* confdefs.h. */
14095_ACEOF
14096cat confdefs.h >>conftest.$ac_ext
14097cat >>conftest.$ac_ext <<_ACEOF
14098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014099
Martin v. Löwiseba40652007-08-30 20:10:57 +000014100/* Override any GCC internal prototype to avoid an error.
14101 Use char because int might match the return type of a GCC
14102 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014103#ifdef __cplusplus
14104extern "C"
14105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014106char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014107int
14108main ()
14109{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014110return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 ;
14112 return 0;
14113}
14114_ACEOF
14115rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014116if { (ac_try="$ac_link"
14117case "(($ac_try" in
14118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14119 *) ac_try_echo=$ac_try;;
14120esac
14121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14122 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014124 grep -v '^ *+' conftest.er1 >conftest.err
14125 rm -f conftest.er1
14126 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014128 (exit $ac_status); } && {
14129 test -z "$ac_c_werror_flag" ||
14130 test ! -s conftest.err
14131 } && test -s conftest$ac_exeext &&
14132 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014134else
Martin v. Löwis11437992002-04-12 09:54:03 +000014135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014136sed 's/^/| /' conftest.$ac_ext >&5
14137
Martin v. Löwiseba40652007-08-30 20:10:57 +000014138 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014140
14141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014143LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014145{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14146echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014147if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014148 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014149fi
14150 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014151
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000014152case "$ac_sys_system" in
14153BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014154{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
14155echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014156if test "${ac_cv_lib_net_socket+set}" = set; then
14157 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014158else
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014160LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014161cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014162/* confdefs.h. */
14163_ACEOF
14164cat confdefs.h >>conftest.$ac_ext
14165cat >>conftest.$ac_ext <<_ACEOF
14166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
Martin v. Löwiseba40652007-08-30 20:10:57 +000014168/* Override any GCC internal prototype to avoid an error.
14169 Use char because int might match the return type of a GCC
14170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014171#ifdef __cplusplus
14172extern "C"
14173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014174char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014175int
14176main ()
14177{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014178return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014179 ;
14180 return 0;
14181}
14182_ACEOF
14183rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014184if { (ac_try="$ac_link"
14185case "(($ac_try" in
14186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14187 *) ac_try_echo=$ac_try;;
14188esac
14189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14190 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014192 grep -v '^ *+' conftest.er1 >conftest.err
14193 rm -f conftest.er1
14194 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014196 (exit $ac_status); } && {
14197 test -z "$ac_c_werror_flag" ||
14198 test ! -s conftest.err
14199 } && test -s conftest$ac_exeext &&
14200 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014201 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014202else
Martin v. Löwis11437992002-04-12 09:54:03 +000014203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014204sed 's/^/| /' conftest.$ac_ext >&5
14205
Martin v. Löwiseba40652007-08-30 20:10:57 +000014206 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014208
14209rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014210 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014211LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014213{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
14214echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014215if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014216 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014217fi
14218 # BeOS
14219;;
14220esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000014221
Martin v. Löwiseba40652007-08-30 20:10:57 +000014222{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14223echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
Martin v. Löwiseba40652007-08-30 20:10:57 +000014225# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014226if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014227 withval=$with_libs;
14228{ echo "$as_me:$LINENO: result: $withval" >&5
14229echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014230LIBS="$withval $LIBS"
14231
14232else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014233 { echo "$as_me:$LINENO: result: no" >&5
14234echo "${ECHO_T}no" >&6; }
14235fi
14236
Guido van Rossum7f43da71994-08-01 12:15:30 +000014237
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014238# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14240echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014241
Martin v. Löwiseba40652007-08-30 20:10:57 +000014242# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014243if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014244 withval=$with_system_ffi;
14245fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014246
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014247
Martin v. Löwiseba40652007-08-30 20:10:57 +000014248{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14249echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014250
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014251# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014252
14253
Martin v. Löwiseba40652007-08-30 20:10:57 +000014254{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14255echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014256
Martin v. Löwiseba40652007-08-30 20:10:57 +000014257# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014258if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014259 withval=$with_signal_module;
14260fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014261
14262
14263if test -z "$with_signal_module"
14264then with_signal_module="yes"
14265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014266{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14267echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014268
14269if test "${with_signal_module}" = "yes"; then
14270 USE_SIGNAL_MODULE=""
14271 SIGNAL_OBJS=""
14272else
14273 USE_SIGNAL_MODULE="#"
14274 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14275fi
14276
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014277# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014278
Barry Warsawc0d24d82000-06-29 16:12:00 +000014279USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014280
Martin v. Löwiseba40652007-08-30 20:10:57 +000014281{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14282echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014283
Guido van Rossumec2f0731997-01-22 20:54:01 +000014284
Martin v. Löwiseba40652007-08-30 20:10:57 +000014285# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014286if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014287 withval=$with_dec_threads;
14288{ echo "$as_me:$LINENO: result: $withval" >&5
14289echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014290LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014291if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014292 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014293fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014294else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014295 { echo "$as_me:$LINENO: result: no" >&5
14296echo "${ECHO_T}no" >&6; }
14297fi
14298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299
14300# Templates for things AC_DEFINEd more than once.
14301# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014302
14303
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
14305
14306
14307
14308
Martin v. Löwiseba40652007-08-30 20:10:57 +000014309{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14310echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014311
Martin v. Löwiseba40652007-08-30 20:10:57 +000014312# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014313if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014314 withval=$with_threads;
14315fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014316
14317
Barry Warsawc0d24d82000-06-29 16:12:00 +000014318# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
Martin v. Löwiseba40652007-08-30 20:10:57 +000014320# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014321if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014322 withval=$with_thread; with_threads=$with_thread
14323fi
14324
Barry Warsawc0d24d82000-06-29 16:12:00 +000014325
14326if test -z "$with_threads"
14327then with_threads="yes"
14328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329{ echo "$as_me:$LINENO: result: $with_threads" >&5
14330echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000014331
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014332
Barry Warsawc0d24d82000-06-29 16:12:00 +000014333if test "$with_threads" = "no"
14334then
14335 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014336elif test "$ac_cv_pthread_is_default" = yes
14337then
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014339#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014340_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014341
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014342 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014344#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014345_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014346
14347 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014348 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014349elif test "$ac_cv_kpthread" = "yes"
14350then
14351 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014352 if test "$ac_cv_cxx_thread" = "yes"; then
14353 CXX="$CXX -Kpthread"
14354 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014356#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014357_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014358
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014359 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014360 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014361elif test "$ac_cv_kthread" = "yes"
14362then
14363 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014364 if test "$ac_cv_cxx_thread" = "yes"; then
14365 CXX="$CXX -Kthread"
14366 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014367 cat >>confdefs.h <<\_ACEOF
14368#define WITH_THREAD 1
14369_ACEOF
14370
14371 posix_threads=yes
14372 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014373elif test "$ac_cv_pthread" = "yes"
14374then
14375 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014376 if test "$ac_cv_cxx_thread" = "yes"; then
14377 CXX="$CXX -pthread"
14378 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014379 cat >>confdefs.h <<\_ACEOF
14380#define WITH_THREAD 1
14381_ACEOF
14382
14383 posix_threads=yes
14384 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014385else
14386 if test ! -z "$with_threads" -a -d "$with_threads"
14387 then LDFLAGS="$LDFLAGS -L$with_threads"
14388 fi
14389 if test ! -z "$withval" -a -d "$withval"
14390 then LDFLAGS="$LDFLAGS -L$withval"
14391 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014392
14393 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014394 # define _POSIX_THREADS in unistd.h. Some apparently don't
14395 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014396 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14397echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014399/* confdefs.h. */
14400_ACEOF
14401cat confdefs.h >>conftest.$ac_ext
14402cat >>conftest.$ac_ext <<_ACEOF
14403/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014404
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014405#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014406#ifdef _POSIX_THREADS
14407yes
14408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014409
14410_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014412 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014413 unistd_defines_pthreads=yes
14414else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014415 unistd_defines_pthreads=no
14416fi
14417rm -f conftest*
14418
Martin v. Löwiseba40652007-08-30 20:10:57 +000014419 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14420echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014421
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014423#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014424_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014425
Martin v. Löwis11437992002-04-12 09:54:03 +000014426 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014427 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14428echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014429if test "${ac_cv_header_cthreads_h+set}" = set; then
14430 echo $ECHO_N "(cached) $ECHO_C" >&6
14431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014432{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14433echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014434else
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014436{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14437echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014439/* confdefs.h. */
14440_ACEOF
14441cat confdefs.h >>conftest.$ac_ext
14442cat >>conftest.$ac_ext <<_ACEOF
14443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014444$ac_includes_default
14445#include <cthreads.h>
14446_ACEOF
14447rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014448if { (ac_try="$ac_compile"
14449case "(($ac_try" in
14450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14451 *) ac_try_echo=$ac_try;;
14452esac
14453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014456 grep -v '^ *+' conftest.er1 >conftest.err
14457 rm -f conftest.er1
14458 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014460 (exit $ac_status); } && {
14461 test -z "$ac_c_werror_flag" ||
14462 test ! -s conftest.err
14463 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014464 ac_header_compiler=yes
14465else
14466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014467sed 's/^/| /' conftest.$ac_ext >&5
14468
Martin v. Löwiseba40652007-08-30 20:10:57 +000014469 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471
14472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14473{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14474echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014475
14476# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014477{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14478echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014479cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014480/* confdefs.h. */
14481_ACEOF
14482cat confdefs.h >>conftest.$ac_ext
14483cat >>conftest.$ac_ext <<_ACEOF
14484/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014485#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014486_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014487if { (ac_try="$ac_cpp conftest.$ac_ext"
14488case "(($ac_try" in
14489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14490 *) ac_try_echo=$ac_try;;
14491esac
14492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14493 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014495 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014496 rm -f conftest.er1
14497 cat conftest.err >&5
14498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014499 (exit $ac_status); } >/dev/null && {
14500 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14501 test ! -s conftest.err
14502 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 ac_header_preproc=yes
14504else
14505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014506sed 's/^/| /' conftest.$ac_ext >&5
14507
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510
Martin v. Löwis11437992002-04-12 09:54:03 +000014511rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014512{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14513echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014514
14515# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014516case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14517 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014518 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14519echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014520 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14521echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14522 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014523 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014524 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014525 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14526echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014527 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14528echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14529 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14530echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14531 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14532echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014533 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14534echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014535 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14536echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014537 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014538## ------------------------------------------------ ##
14539## Report this to http://www.python.org/python-bugs ##
14540## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014541_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014542 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014543 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014544esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014545{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14546echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014547if test "${ac_cv_header_cthreads_h+set}" = set; then
14548 echo $ECHO_N "(cached) $ECHO_C" >&6
14549else
14550 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014552{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14553echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014554
14555fi
14556if test $ac_cv_header_cthreads_h = yes; then
14557 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014558#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014559_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014560
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014562#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014564
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
14566cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014567#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014568_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014569
14570 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014571 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014572else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014573
Martin v. Löwis11437992002-04-12 09:54:03 +000014574 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014575 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14576echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014577if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14578 echo $ECHO_N "(cached) $ECHO_C" >&6
14579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014580{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14581echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014582else
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014584{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14585echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014586cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014587/* confdefs.h. */
14588_ACEOF
14589cat confdefs.h >>conftest.$ac_ext
14590cat >>conftest.$ac_ext <<_ACEOF
14591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014592$ac_includes_default
14593#include <mach/cthreads.h>
14594_ACEOF
14595rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014596if { (ac_try="$ac_compile"
14597case "(($ac_try" in
14598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14599 *) ac_try_echo=$ac_try;;
14600esac
14601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014604 grep -v '^ *+' conftest.er1 >conftest.err
14605 rm -f conftest.er1
14606 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014608 (exit $ac_status); } && {
14609 test -z "$ac_c_werror_flag" ||
14610 test ! -s conftest.err
14611 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 ac_header_compiler=yes
14613else
14614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014615sed 's/^/| /' conftest.$ac_ext >&5
14616
Martin v. Löwiseba40652007-08-30 20:10:57 +000014617 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014619
14620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14621{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14622echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014623
14624# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014625{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14626echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014628/* confdefs.h. */
14629_ACEOF
14630cat confdefs.h >>conftest.$ac_ext
14631cat >>conftest.$ac_ext <<_ACEOF
14632/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014633#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014634_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014635if { (ac_try="$ac_cpp conftest.$ac_ext"
14636case "(($ac_try" in
14637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14638 *) ac_try_echo=$ac_try;;
14639esac
14640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14641 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014642 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014643 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014644 rm -f conftest.er1
14645 cat conftest.err >&5
14646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014647 (exit $ac_status); } >/dev/null && {
14648 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14649 test ! -s conftest.err
14650 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 ac_header_preproc=yes
14652else
14653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014654sed 's/^/| /' conftest.$ac_ext >&5
14655
Martin v. Löwis11437992002-04-12 09:54:03 +000014656 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014658
Martin v. Löwis11437992002-04-12 09:54:03 +000014659rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014660{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14661echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014662
14663# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014664case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14665 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014666 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14667echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014668 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14669echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14670 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014671 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014672 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014673 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14674echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014675 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14676echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14677 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14678echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14679 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14680echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014681 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14682echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014683 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14684echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014685 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014686## ------------------------------------------------ ##
14687## Report this to http://www.python.org/python-bugs ##
14688## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014689_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014690 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014691 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014692esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014693{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14694echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014695if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14696 echo $ECHO_N "(cached) $ECHO_C" >&6
14697else
14698 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014700{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14701echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014702
14703fi
14704if test $ac_cv_header_mach_cthreads_h = yes; then
14705 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014706#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014707_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014708
Martin v. Löwis11437992002-04-12 09:54:03 +000014709 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014710#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014711_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014712
Martin v. Löwis11437992002-04-12 09:54:03 +000014713
14714cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014715#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014716_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014717
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014718 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014719else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014720
Martin v. Löwiseba40652007-08-30 20:10:57 +000014721 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14722echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014723
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014725if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014726 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14727echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014728 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014729#define WITH_THREAD 1
14730_ACEOF
14731
14732
14733cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014734#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014735_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014736
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014737 LIBS="-lpth $LIBS"
14738 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014739else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014740 { echo "$as_me:$LINENO: result: no" >&5
14741echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014742
14743 # Just looking for pthread_create in libpthread is not enough:
14744 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14745 # So we really have to include pthread.h, and then link.
14746 _libs=$LIBS
14747 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014748 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14749echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014751/* confdefs.h. */
14752_ACEOF
14753cat confdefs.h >>conftest.$ac_ext
14754cat >>conftest.$ac_ext <<_ACEOF
14755/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014756#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014757
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014758void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014759int
14760main ()
14761{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014762
14763pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014764 ;
14765 return 0;
14766}
14767_ACEOF
14768rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014769if { (ac_try="$ac_link"
14770case "(($ac_try" in
14771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14772 *) ac_try_echo=$ac_try;;
14773esac
14774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14775 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014777 grep -v '^ *+' conftest.er1 >conftest.err
14778 rm -f conftest.er1
14779 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014781 (exit $ac_status); } && {
14782 test -z "$ac_c_werror_flag" ||
14783 test ! -s conftest.err
14784 } && test -s conftest$ac_exeext &&
14785 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014786
Martin v. Löwiseba40652007-08-30 20:10:57 +000014787 { echo "$as_me:$LINENO: result: yes" >&5
14788echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014790#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014791_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014792
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014793 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014794 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014795else
Martin v. Löwis11437992002-04-12 09:54:03 +000014796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014797sed 's/^/| /' conftest.$ac_ext >&5
14798
Martin v. Löwis11437992002-04-12 09:54:03 +000014799
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014800 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014801 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14802echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014803if test "${ac_cv_func_pthread_detach+set}" = set; then
14804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014805else
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014807/* confdefs.h. */
14808_ACEOF
14809cat confdefs.h >>conftest.$ac_ext
14810cat >>conftest.$ac_ext <<_ACEOF
14811/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014812/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14813 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14814#define pthread_detach innocuous_pthread_detach
14815
Guido van Rossumad678af1998-10-02 14:42:15 +000014816/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014817 which can conflict with char pthread_detach (); below.
14818 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014819 <limits.h> exists even on freestanding compilers. */
14820
14821#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014822# include <limits.h>
14823#else
14824# include <assert.h>
14825#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014826
14827#undef pthread_detach
14828
Martin v. Löwiseba40652007-08-30 20:10:57 +000014829/* Override any GCC internal prototype to avoid an error.
14830 Use char because int might match the return type of a GCC
14831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014832#ifdef __cplusplus
14833extern "C"
14834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014835char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014836/* The GNU C library defines this for functions which it implements
14837 to always fail with ENOSYS. Some functions are actually named
14838 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014839#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014840choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014841#endif
14842
Skip Montanaro6dead952003-09-25 14:50:04 +000014843int
14844main ()
14845{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014846return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014847 ;
14848 return 0;
14849}
14850_ACEOF
14851rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014852if { (ac_try="$ac_link"
14853case "(($ac_try" in
14854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14855 *) ac_try_echo=$ac_try;;
14856esac
14857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14858 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014860 grep -v '^ *+' conftest.er1 >conftest.err
14861 rm -f conftest.er1
14862 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014864 (exit $ac_status); } && {
14865 test -z "$ac_c_werror_flag" ||
14866 test ! -s conftest.err
14867 } && test -s conftest$ac_exeext &&
14868 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014870else
Martin v. Löwis11437992002-04-12 09:54:03 +000014871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014872sed 's/^/| /' conftest.$ac_ext >&5
14873
Martin v. Löwiseba40652007-08-30 20:10:57 +000014874 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014876
14877rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014878 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014880{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14881echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014882if test $ac_cv_func_pthread_detach = yes; then
14883 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014884#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014885_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014886
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014887 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014888 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014889else
Guido van Rossumad678af1998-10-02 14:42:15 +000014890
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014891 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014892 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14893echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014894if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14895 echo $ECHO_N "(cached) $ECHO_C" >&6
14896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014897{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14898echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014899else
14900 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014901{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14902echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014904/* confdefs.h. */
14905_ACEOF
14906cat confdefs.h >>conftest.$ac_ext
14907cat >>conftest.$ac_ext <<_ACEOF
14908/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014909$ac_includes_default
14910#include <atheos/threads.h>
14911_ACEOF
14912rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014913if { (ac_try="$ac_compile"
14914case "(($ac_try" in
14915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14916 *) ac_try_echo=$ac_try;;
14917esac
14918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14919 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014921 grep -v '^ *+' conftest.er1 >conftest.err
14922 rm -f conftest.er1
14923 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014925 (exit $ac_status); } && {
14926 test -z "$ac_c_werror_flag" ||
14927 test ! -s conftest.err
14928 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014929 ac_header_compiler=yes
14930else
14931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014932sed 's/^/| /' conftest.$ac_ext >&5
14933
Martin v. Löwiseba40652007-08-30 20:10:57 +000014934 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014936
14937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14938{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14939echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014940
14941# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014942{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14943echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014945/* confdefs.h. */
14946_ACEOF
14947cat confdefs.h >>conftest.$ac_ext
14948cat >>conftest.$ac_ext <<_ACEOF
14949/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014950#include <atheos/threads.h>
14951_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952if { (ac_try="$ac_cpp conftest.$ac_ext"
14953case "(($ac_try" in
14954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14955 *) ac_try_echo=$ac_try;;
14956esac
14957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14958 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014959 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014960 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014961 rm -f conftest.er1
14962 cat conftest.err >&5
14963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014964 (exit $ac_status); } >/dev/null && {
14965 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14966 test ! -s conftest.err
14967 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014968 ac_header_preproc=yes
14969else
14970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014971sed 's/^/| /' conftest.$ac_ext >&5
14972
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014973 ac_header_preproc=no
14974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014975
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014976rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14978echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014979
14980# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014981case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14982 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014983 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14984echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014985 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14986echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14987 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014988 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014989 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014990 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14991echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014992 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14993echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14994 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14995echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14996 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14997echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014998 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14999echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015000 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15001echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015002 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015003## ------------------------------------------------ ##
15004## Report this to http://www.python.org/python-bugs ##
15005## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015006_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015007 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015008 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015009esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015010{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15011echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015012if test "${ac_cv_header_atheos_threads_h+set}" = set; then
15013 echo $ECHO_N "(cached) $ECHO_C" >&6
15014else
15015 ac_cv_header_atheos_threads_h=$ac_header_preproc
15016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015017{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15018echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015019
15020fi
15021if test $ac_cv_header_atheos_threads_h = yes; then
15022 cat >>confdefs.h <<\_ACEOF
15023#define WITH_THREAD 1
15024_ACEOF
15025
15026
15027cat >>confdefs.h <<\_ACEOF
15028#define ATHEOS_THREADS 1
15029_ACEOF
15030
15031 THREADOBJ="Python/thread.o"
15032else
15033
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15036echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015037if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15038 echo $ECHO_N "(cached) $ECHO_C" >&6
15039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015040{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15041echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015042else
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015044{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
15045echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015046cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015047/* confdefs.h. */
15048_ACEOF
15049cat confdefs.h >>conftest.$ac_ext
15050cat >>conftest.$ac_ext <<_ACEOF
15051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015052$ac_includes_default
15053#include <kernel/OS.h>
15054_ACEOF
15055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015056if { (ac_try="$ac_compile"
15057case "(($ac_try" in
15058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15059 *) ac_try_echo=$ac_try;;
15060esac
15061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015064 grep -v '^ *+' conftest.er1 >conftest.err
15065 rm -f conftest.er1
15066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068 (exit $ac_status); } && {
15069 test -z "$ac_c_werror_flag" ||
15070 test ! -s conftest.err
15071 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015072 ac_header_compiler=yes
15073else
15074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015075sed 's/^/| /' conftest.$ac_ext >&5
15076
Martin v. Löwiseba40652007-08-30 20:10:57 +000015077 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015079
15080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15081{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15082echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015083
15084# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015085{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
15086echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015087cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015088/* confdefs.h. */
15089_ACEOF
15090cat confdefs.h >>conftest.$ac_ext
15091cat >>conftest.$ac_ext <<_ACEOF
15092/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015093#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015094_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015095if { (ac_try="$ac_cpp conftest.$ac_ext"
15096case "(($ac_try" in
15097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15098 *) ac_try_echo=$ac_try;;
15099esac
15100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15101 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015103 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 rm -f conftest.er1
15105 cat conftest.err >&5
15106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015107 (exit $ac_status); } >/dev/null && {
15108 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15109 test ! -s conftest.err
15110 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 ac_header_preproc=yes
15112else
15113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015114sed 's/^/| /' conftest.$ac_ext >&5
15115
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118
Martin v. Löwis11437992002-04-12 09:54:03 +000015119rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015120{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15121echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015122
Martin v. Löwis11437992002-04-12 09:54:03 +000015123# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015124case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15125 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
15127echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015128 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
15129echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
15130 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015131 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015132 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015133 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
15134echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015135 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
15136echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
15137 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
15138echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
15139 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
15140echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015141 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
15142echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015143 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
15144echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015145 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015146## ------------------------------------------------ ##
15147## Report this to http://www.python.org/python-bugs ##
15148## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015149_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015150 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015151 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015152esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015153{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15154echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015155if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15156 echo $ECHO_N "(cached) $ECHO_C" >&6
15157else
15158 ac_cv_header_kernel_OS_h=$ac_header_preproc
15159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015160{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15161echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015162
15163fi
15164if test $ac_cv_header_kernel_OS_h = yes; then
15165 cat >>confdefs.h <<\_ACEOF
15166#define WITH_THREAD 1
15167_ACEOF
15168
15169
15170cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015171#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015172_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015173
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015174 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015175else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015176
Martin v. Löwiseba40652007-08-30 20:10:57 +000015177 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15178echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015179if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
15180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015181else
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015183LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015185/* confdefs.h. */
15186_ACEOF
15187cat confdefs.h >>conftest.$ac_ext
15188cat >>conftest.$ac_ext <<_ACEOF
15189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015190
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191/* Override any GCC internal prototype to avoid an error.
15192 Use char because int might match the return type of a GCC
15193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015194#ifdef __cplusplus
15195extern "C"
15196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015197char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015198int
15199main ()
15200{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 ;
15203 return 0;
15204}
15205_ACEOF
15206rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015207if { (ac_try="$ac_link"
15208case "(($ac_try" in
15209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15210 *) ac_try_echo=$ac_try;;
15211esac
15212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15213 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015215 grep -v '^ *+' conftest.er1 >conftest.err
15216 rm -f conftest.er1
15217 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219 (exit $ac_status); } && {
15220 test -z "$ac_c_werror_flag" ||
15221 test ! -s conftest.err
15222 } && test -s conftest$ac_exeext &&
15223 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015225else
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015227sed 's/^/| /' conftest.$ac_ext >&5
15228
Martin v. Löwiseba40652007-08-30 20:10:57 +000015229 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015231
15232rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015234LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015236{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15237echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015238if test $ac_cv_lib_pthreads_pthread_create = yes; then
15239 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015240#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015241_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015242
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015243 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015244 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015245 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015246else
Greg Steinadf63d62000-07-05 10:38:09 +000015247
Martin v. Löwiseba40652007-08-30 20:10:57 +000015248 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15249echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015250if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
15251 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015252else
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015254LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015255cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015256/* confdefs.h. */
15257_ACEOF
15258cat confdefs.h >>conftest.$ac_ext
15259cat >>conftest.$ac_ext <<_ACEOF
15260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
Martin v. Löwiseba40652007-08-30 20:10:57 +000015262/* Override any GCC internal prototype to avoid an error.
15263 Use char because int might match the return type of a GCC
15264 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015265#ifdef __cplusplus
15266extern "C"
15267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015268char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015269int
15270main ()
15271{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015272return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 ;
15274 return 0;
15275}
15276_ACEOF
15277rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278if { (ac_try="$ac_link"
15279case "(($ac_try" in
15280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15281 *) ac_try_echo=$ac_try;;
15282esac
15283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15284 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015286 grep -v '^ *+' conftest.er1 >conftest.err
15287 rm -f conftest.er1
15288 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015290 (exit $ac_status); } && {
15291 test -z "$ac_c_werror_flag" ||
15292 test ! -s conftest.err
15293 } && test -s conftest$ac_exeext &&
15294 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015296else
Martin v. Löwis11437992002-04-12 09:54:03 +000015297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015298sed 's/^/| /' conftest.$ac_ext >&5
15299
Martin v. Löwiseba40652007-08-30 20:10:57 +000015300 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015302
15303rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015304 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015305LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15308echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015309if test $ac_cv_lib_c_r_pthread_create = yes; then
15310 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015311#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015312_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015313
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015314 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015315 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015316 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015317else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015318
Martin v. Löwiseba40652007-08-30 20:10:57 +000015319 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15320echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015321if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015323else
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015325LIBS="-lpthread $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 __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015340int
15341main ()
15342{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015343return __pthread_create_system ();
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_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +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_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +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 Rossum8d6e8af2000-10-30 17:45:07 +000015377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015378{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15379echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015380if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15381 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015382#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015383_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015384
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015385 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015386 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015387 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015388else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015389
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15391echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015392if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015394else
Martin v. Löwis11437992002-04-12 09:54:03 +000015395 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015396LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015398/* confdefs.h. */
15399_ACEOF
15400cat confdefs.h >>conftest.$ac_ext
15401cat >>conftest.$ac_ext <<_ACEOF
15402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015403
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404/* Override any GCC internal prototype to avoid an error.
15405 Use char because int might match the return type of a GCC
15406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015407#ifdef __cplusplus
15408extern "C"
15409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015410char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015411int
15412main ()
15413{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015414return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015415 ;
15416 return 0;
15417}
15418_ACEOF
15419rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420if { (ac_try="$ac_link"
15421case "(($ac_try" in
15422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15423 *) ac_try_echo=$ac_try;;
15424esac
15425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15426 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015428 grep -v '^ *+' conftest.er1 >conftest.err
15429 rm -f conftest.er1
15430 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015432 (exit $ac_status); } && {
15433 test -z "$ac_c_werror_flag" ||
15434 test ! -s conftest.err
15435 } && test -s conftest$ac_exeext &&
15436 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015438else
Martin v. Löwis11437992002-04-12 09:54:03 +000015439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015440sed 's/^/| /' conftest.$ac_ext >&5
15441
Martin v. Löwiseba40652007-08-30 20:10:57 +000015442 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015444
15445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015447LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015449{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15450echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015451if test $ac_cv_lib_cma_pthread_create = yes; then
15452 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015453#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015454_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015455
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015456 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015457 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015458 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015459else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015460
Martin v. Löwis130fb172001-07-19 11:00:41 +000015461 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015462fi
15463
Guido van Rossum627b2d71993-12-24 10:39:16 +000015464
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015465fi
15466
Guido van Rossum0be3e491997-05-22 20:33:33 +000015467fi
15468
Guido van Rossum49545951997-12-02 19:28:29 +000015469fi
15470
Guido van Rossumb93a8621998-05-07 13:27:32 +000015471fi
15472
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015473
Michael W. Hudson54241132001-12-07 15:38:26 +000015474fi
15475
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015476
15477fi
15478
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015480
15481rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483fi
15484
Martin v. Löwis11437992002-04-12 09:54:03 +000015485fi
15486
15487
15488fi
15489
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015490
Michael W. Hudson54241132001-12-07 15:38:26 +000015491
Martin v. Löwiseba40652007-08-30 20:10:57 +000015492 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15493echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015494if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15495 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015496else
Martin v. Löwis11437992002-04-12 09:54:03 +000015497 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015498LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015500/* confdefs.h. */
15501_ACEOF
15502cat confdefs.h >>conftest.$ac_ext
15503cat >>conftest.$ac_ext <<_ACEOF
15504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015505
Martin v. Löwiseba40652007-08-30 20:10:57 +000015506/* Override any GCC internal prototype to avoid an error.
15507 Use char because int might match the return type of a GCC
15508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015509#ifdef __cplusplus
15510extern "C"
15511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015512char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015513int
15514main ()
15515{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015516return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015517 ;
15518 return 0;
15519}
15520_ACEOF
15521rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015522if { (ac_try="$ac_link"
15523case "(($ac_try" in
15524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15525 *) ac_try_echo=$ac_try;;
15526esac
15527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015530 grep -v '^ *+' conftest.er1 >conftest.err
15531 rm -f conftest.er1
15532 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015534 (exit $ac_status); } && {
15535 test -z "$ac_c_werror_flag" ||
15536 test ! -s conftest.err
15537 } && test -s conftest$ac_exeext &&
15538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015539 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015540else
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015542sed 's/^/| /' conftest.$ac_ext >&5
15543
Martin v. Löwiseba40652007-08-30 20:10:57 +000015544 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015546
15547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015549LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015551{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15552echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015553if test $ac_cv_lib_mpc_usconfig = yes; then
15554 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015555#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015556_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015557
Martin v. Löwis130fb172001-07-19 11:00:41 +000015558 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015559 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015560 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015561fi
15562
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015563
Neal Norwitza978ab02002-11-02 16:58:05 +000015564 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15566echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015567if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15568 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015569else
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015571LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015573/* confdefs.h. */
15574_ACEOF
15575cat confdefs.h >>conftest.$ac_ext
15576cat >>conftest.$ac_ext <<_ACEOF
15577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015578
Martin v. Löwiseba40652007-08-30 20:10:57 +000015579/* Override any GCC internal prototype to avoid an error.
15580 Use char because int might match the return type of a GCC
15581 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015582#ifdef __cplusplus
15583extern "C"
15584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015585char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015586int
15587main ()
15588{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015589return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015590 ;
15591 return 0;
15592}
15593_ACEOF
15594rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015595if { (ac_try="$ac_link"
15596case "(($ac_try" in
15597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15598 *) ac_try_echo=$ac_try;;
15599esac
15600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15601 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015603 grep -v '^ *+' conftest.er1 >conftest.err
15604 rm -f conftest.er1
15605 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015607 (exit $ac_status); } && {
15608 test -z "$ac_c_werror_flag" ||
15609 test ! -s conftest.err
15610 } && test -s conftest$ac_exeext &&
15611 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015613else
Martin v. Löwis11437992002-04-12 09:54:03 +000015614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015615sed 's/^/| /' conftest.$ac_ext >&5
15616
Martin v. Löwiseba40652007-08-30 20:10:57 +000015617 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015619
15620rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015622LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015624{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15625echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015626if test $ac_cv_lib_thread_thr_create = yes; then
15627 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015628#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015629_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015630
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015631 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015632 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015633 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015634fi
15635
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015636 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015637
Martin v. Löwis130fb172001-07-19 11:00:41 +000015638 if test "$USE_THREAD_MODULE" != "#"
15639 then
15640 # If the above checks didn't disable threads, (at least) OSF1
15641 # needs this '-threads' argument during linking.
15642 case $ac_sys_system in
15643 OSF1) LDLAST=-threads;;
15644 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015645 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015646fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015647
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015648if test "$posix_threads" = "yes"; then
15649 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015650
15651cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015652#define _POSIX_THREADS 1
15653_ACEOF
15654
15655 fi
15656
15657 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15658 case $ac_sys_system/$ac_sys_release in
15659 SunOS/5.6)
15660cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015661#define HAVE_PTHREAD_DESTRUCTOR 1
15662_ACEOF
15663
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015664 ;;
15665 SunOS/5.8)
15666cat >>confdefs.h <<\_ACEOF
15667#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15668_ACEOF
15669
15670 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015671 AIX/5)
15672cat >>confdefs.h <<\_ACEOF
15673#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15674_ACEOF
15675
15676 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015677 esac
15678
Martin v. Löwiseba40652007-08-30 20:10:57 +000015679 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15680echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015681 if test "${ac_cv_pthread_system_supported+set}" = set; then
15682 echo $ECHO_N "(cached) $ECHO_C" >&6
15683else
15684 if test "$cross_compiling" = yes; then
15685 ac_cv_pthread_system_supported=no
15686else
15687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015688/* confdefs.h. */
15689_ACEOF
15690cat confdefs.h >>conftest.$ac_ext
15691cat >>conftest.$ac_ext <<_ACEOF
15692/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015693#include <pthread.h>
15694 void *foo(void *parm) {
15695 return NULL;
15696 }
15697 main() {
15698 pthread_attr_t attr;
15699 pthread_t id;
15700 if (pthread_attr_init(&attr)) exit(-1);
15701 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15702 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15703 exit(0);
15704 }
15705_ACEOF
15706rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015707if { (ac_try="$ac_link"
15708case "(($ac_try" in
15709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15710 *) ac_try_echo=$ac_try;;
15711esac
15712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15713 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015714 ac_status=$?
15715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15716 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015717 { (case "(($ac_try" in
15718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15719 *) ac_try_echo=$ac_try;;
15720esac
15721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15722 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015723 ac_status=$?
15724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15725 (exit $ac_status); }; }; then
15726 ac_cv_pthread_system_supported=yes
15727else
15728 echo "$as_me: program exited with status $ac_status" >&5
15729echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015730sed 's/^/| /' conftest.$ac_ext >&5
15731
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015732( exit $ac_status )
15733ac_cv_pthread_system_supported=no
15734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015735rm -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 +000015736fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015737
Martin v. Löwiseba40652007-08-30 20:10:57 +000015738
15739
Guido van Rossum627b2d71993-12-24 10:39:16 +000015740fi
15741
Martin v. Löwiseba40652007-08-30 20:10:57 +000015742 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15743echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015744 if test "$ac_cv_pthread_system_supported" = "yes"; then
15745
15746cat >>confdefs.h <<\_ACEOF
15747#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15748_ACEOF
15749
15750 fi
15751
15752for ac_func in pthread_sigmask
15753do
15754as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015755{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15756echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15757if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015758 echo $ECHO_N "(cached) $ECHO_C" >&6
15759else
15760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015761/* confdefs.h. */
15762_ACEOF
15763cat confdefs.h >>conftest.$ac_ext
15764cat >>conftest.$ac_ext <<_ACEOF
15765/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015766/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15767 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15768#define $ac_func innocuous_$ac_func
15769
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015770/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015771 which can conflict with char $ac_func (); below.
15772 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015773 <limits.h> exists even on freestanding compilers. */
15774
15775#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015776# include <limits.h>
15777#else
15778# include <assert.h>
15779#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015780
15781#undef $ac_func
15782
Martin v. Löwiseba40652007-08-30 20:10:57 +000015783/* Override any GCC internal prototype to avoid an error.
15784 Use char because int might match the return type of a GCC
15785 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015786#ifdef __cplusplus
15787extern "C"
15788#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015789char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015790/* The GNU C library defines this for functions which it implements
15791 to always fail with ENOSYS. Some functions are actually named
15792 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015793#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015794choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015795#endif
15796
Skip Montanaro6dead952003-09-25 14:50:04 +000015797int
15798main ()
15799{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015800return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015801 ;
15802 return 0;
15803}
15804_ACEOF
15805rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015806if { (ac_try="$ac_link"
15807case "(($ac_try" in
15808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15809 *) ac_try_echo=$ac_try;;
15810esac
15811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15812 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015814 grep -v '^ *+' conftest.er1 >conftest.err
15815 rm -f conftest.er1
15816 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818 (exit $ac_status); } && {
15819 test -z "$ac_c_werror_flag" ||
15820 test ! -s conftest.err
15821 } && test -s conftest$ac_exeext &&
15822 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015823 eval "$as_ac_var=yes"
15824else
15825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015826sed 's/^/| /' conftest.$ac_ext >&5
15827
Martin v. Löwiseba40652007-08-30 20:10:57 +000015828 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015830
15831rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015834ac_res=`eval echo '${'$as_ac_var'}'`
15835 { echo "$as_me:$LINENO: result: $ac_res" >&5
15836echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015837if test `eval echo '${'$as_ac_var'}'` = yes; then
15838 cat >>confdefs.h <<_ACEOF
15839#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15840_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015841 case $ac_sys_system in
15842 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015843
Jason Tishlerfac083d2003-07-22 15:20:49 +000015844cat >>confdefs.h <<\_ACEOF
15845#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15846_ACEOF
15847
15848 ;;
15849 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015850fi
15851done
15852
15853fi
15854
15855
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015856# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015857
15858
Martin v. Löwiseba40652007-08-30 20:10:57 +000015859{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15860echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15861# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015862if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015863 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015864 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865 { echo "$as_me:$LINENO: result: no" >&5
15866echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015867 ipv6=no
15868 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015869 *) { echo "$as_me:$LINENO: result: yes" >&5
15870echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015872#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015873_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015874
15875 ipv6=yes
15876 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015877 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015878else
Martin v. Löwis11437992002-04-12 09:54:03 +000015879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015880 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015881 { echo "$as_me:$LINENO: result: no" >&5
15882echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015883 ipv6=no
15884
15885else
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015887/* confdefs.h. */
15888_ACEOF
15889cat confdefs.h >>conftest.$ac_ext
15890cat >>conftest.$ac_ext <<_ACEOF
15891/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015892 /* AF_INET6 available check */
15893#include <sys/types.h>
15894#include <sys/socket.h>
15895main()
15896{
15897 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15898 exit(1);
15899 else
15900 exit(0);
15901}
15902
Martin v. Löwis11437992002-04-12 09:54:03 +000015903_ACEOF
15904rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905if { (ac_try="$ac_link"
15906case "(($ac_try" in
15907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15908 *) ac_try_echo=$ac_try;;
15909esac
15910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15911 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015912 ac_status=$?
15913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15914 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015915 { (case "(($ac_try" in
15916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15917 *) ac_try_echo=$ac_try;;
15918esac
15919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15920 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015921 ac_status=$?
15922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15923 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015924 { echo "$as_me:$LINENO: result: yes" >&5
15925echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015926 ipv6=yes
15927else
Martin v. Löwis11437992002-04-12 09:54:03 +000015928 echo "$as_me: program exited with status $ac_status" >&5
15929echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015930sed 's/^/| /' conftest.$ac_ext >&5
15931
Martin v. Löwis11437992002-04-12 09:54:03 +000015932( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015933{ echo "$as_me:$LINENO: result: no" >&5
15934echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015935 ipv6=no
15936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015937rm -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 +000015938fi
15939
Martin v. Löwiseba40652007-08-30 20:10:57 +000015940
15941
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015942if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15944echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015946/* confdefs.h. */
15947_ACEOF
15948cat confdefs.h >>conftest.$ac_ext
15949cat >>conftest.$ac_ext <<_ACEOF
15950/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015951#include <sys/types.h>
15952#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015953int
15954main ()
15955{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015956struct sockaddr_in6 x;
15957x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015958 ;
15959 return 0;
15960}
15961_ACEOF
15962rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015963if { (ac_try="$ac_compile"
15964case "(($ac_try" in
15965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15966 *) ac_try_echo=$ac_try;;
15967esac
15968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015971 grep -v '^ *+' conftest.er1 >conftest.err
15972 rm -f conftest.er1
15973 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015975 (exit $ac_status); } && {
15976 test -z "$ac_c_werror_flag" ||
15977 test ! -s conftest.err
15978 } && test -s conftest.$ac_objext; then
15979 { echo "$as_me:$LINENO: result: yes" >&5
15980echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015981 ipv6=yes
15982else
Martin v. Löwis11437992002-04-12 09:54:03 +000015983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015984sed 's/^/| /' conftest.$ac_ext >&5
15985
Martin v. Löwiseba40652007-08-30 20:10:57 +000015986 { echo "$as_me:$LINENO: result: no" >&5
15987echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015988 ipv6=no
15989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015990
15991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015992fi
15993
15994if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015995 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015996#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015997_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015998
15999fi
16000
Martin v. Löwiseba40652007-08-30 20:10:57 +000016001fi
16002
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016003
16004ipv6type=unknown
16005ipv6lib=none
16006ipv6trylibc=no
16007
16008if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016009 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16010echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016011 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16012 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016013 case $i in
16014 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016021
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016022#include <netinet/in.h>
16023#ifdef IPV6_INRIA_VERSION
16024yes
16025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016026_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016028 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016029 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016030fi
16031rm -f conftest*
16032
16033 ;;
16034 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016036/* confdefs.h. */
16037_ACEOF
16038cat confdefs.h >>conftest.$ac_ext
16039cat >>conftest.$ac_ext <<_ACEOF
16040/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016041
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016042#include <netinet/in.h>
16043#ifdef __KAME__
16044yes
16045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016046_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016048 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016049 ipv6type=$i;
16050 ipv6lib=inet6
16051 ipv6libdir=/usr/local/v6/lib
16052 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016053fi
16054rm -f conftest*
16055
16056 ;;
16057 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016059/* confdefs.h. */
16060_ACEOF
16061cat confdefs.h >>conftest.$ac_ext
16062cat >>conftest.$ac_ext <<_ACEOF
16063/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016064
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016065#include <features.h>
16066#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16067yes
16068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016069_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016070if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016071 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016072 ipv6type=$i;
16073 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016074fi
16075rm -f conftest*
16076
16077 ;;
16078 linux-inet6)
16079 if test -d /usr/inet6; then
16080 ipv6type=$i
16081 ipv6lib=inet6
16082 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016083 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016084 fi
16085 ;;
16086 solaris)
16087 if test -f /etc/netconfig; then
16088 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16089 ipv6type=$i
16090 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016091 fi
16092 fi
16093 ;;
16094 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016096/* confdefs.h. */
16097_ACEOF
16098cat confdefs.h >>conftest.$ac_ext
16099cat >>conftest.$ac_ext <<_ACEOF
16100/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016101
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016102#include <sys/param.h>
16103#ifdef _TOSHIBA_INET6
16104yes
16105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016106_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016108 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016109 ipv6type=$i;
16110 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016111 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016112fi
16113rm -f conftest*
16114
16115 ;;
16116 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016118/* confdefs.h. */
16119_ACEOF
16120cat confdefs.h >>conftest.$ac_ext
16121cat >>conftest.$ac_ext <<_ACEOF
16122/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016123
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016124#include </usr/local/v6/include/sys/v6config.h>
16125#ifdef __V6D__
16126yes
16127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016128_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016130 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016131 ipv6type=$i;
16132 ipv6lib=v6;
16133 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016134 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016135fi
16136rm -f conftest*
16137
16138 ;;
16139 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016141/* confdefs.h. */
16142_ACEOF
16143cat confdefs.h >>conftest.$ac_ext
16144cat >>conftest.$ac_ext <<_ACEOF
16145/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016146
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016147#include <sys/param.h>
16148#ifdef _ZETA_MINAMI_INET6
16149yes
16150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016151_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016153 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016154 ipv6type=$i;
16155 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016156 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016157fi
16158rm -f conftest*
16159
16160 ;;
16161 esac
16162 if test "$ipv6type" != "unknown"; then
16163 break
16164 fi
16165 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16167echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016168fi
16169
16170if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16171 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16172 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16173 echo "using lib$ipv6lib"
16174 else
16175 if test $ipv6trylibc = "yes"; then
16176 echo "using libc"
16177 else
16178 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16179 echo "You need to fetch lib$ipv6lib.a from appropriate"
16180 echo 'ipv6 kit and compile beforehand.'
16181 exit 1
16182 fi
16183 fi
16184fi
16185
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016186{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16187echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
16188cat >conftest.$ac_ext <<_ACEOF
16189/* confdefs.h. */
16190_ACEOF
16191cat confdefs.h >>conftest.$ac_ext
16192cat >>conftest.$ac_ext <<_ACEOF
16193/* end confdefs.h. */
16194#include <Carbon/Carbon.h>
16195int
16196main ()
16197{
16198FSIORefNum fRef = 0
16199 ;
16200 return 0;
16201}
16202_ACEOF
16203rm -f conftest.$ac_objext
16204if { (ac_try="$ac_compile"
16205case "(($ac_try" in
16206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16207 *) ac_try_echo=$ac_try;;
16208esac
16209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16210 (eval "$ac_compile") 2>conftest.er1
16211 ac_status=$?
16212 grep -v '^ *+' conftest.er1 >conftest.err
16213 rm -f conftest.er1
16214 cat conftest.err >&5
16215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216 (exit $ac_status); } && {
16217 test -z "$ac_c_werror_flag" ||
16218 test ! -s conftest.err
16219 } && test -s conftest.$ac_objext; then
16220
16221cat >>confdefs.h <<\_ACEOF
16222#define HAVE_OSX105_SDK 1
16223_ACEOF
16224
16225 { echo "$as_me:$LINENO: result: yes" >&5
16226echo "${ECHO_T}yes" >&6; }
16227else
16228 echo "$as_me: failed program was:" >&5
16229sed 's/^/| /' conftest.$ac_ext >&5
16230
16231 { echo "$as_me:$LINENO: result: no" >&5
16232echo "${ECHO_T}no" >&6; }
16233
16234fi
16235
16236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16237
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016238# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16240echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016241
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016243if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244 withval=$with_doc_strings;
16245fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016246
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016247
16248if test -z "$with_doc_strings"
16249then with_doc_strings="yes"
16250fi
16251if test "$with_doc_strings" != "no"
16252then
16253
16254cat >>confdefs.h <<\_ACEOF
16255#define WITH_DOC_STRINGS 1
16256_ACEOF
16257
16258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16260echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016261
Neil Schemenauera35c6882001-02-27 04:45:05 +000016262# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016263{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16264echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016265
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016267if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016268 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016269if test "$withval" != no
16270then
16271
16272cat >>confdefs.h <<\_ACEOF
16273#define WITH_TSC 1
16274_ACEOF
16275
Martin v. Löwiseba40652007-08-30 20:10:57 +000016276 { echo "$as_me:$LINENO: result: yes" >&5
16277echo "${ECHO_T}yes" >&6; }
16278else { echo "$as_me:$LINENO: result: no" >&5
16279echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016280fi
16281else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016282 { echo "$as_me:$LINENO: result: no" >&5
16283echo "${ECHO_T}no" >&6; }
16284fi
16285
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016286
16287# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016288{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16289echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016290
Martin v. Löwiseba40652007-08-30 20:10:57 +000016291# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016292if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016293 withval=$with_pymalloc;
16294fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016295
Neil Schemenauera35c6882001-02-27 04:45:05 +000016296
Neil Schemenauer16c22972002-03-22 15:34:49 +000016297if test -z "$with_pymalloc"
16298then with_pymalloc="yes"
16299fi
16300if test "$with_pymalloc" != "no"
16301then
Martin v. Löwis11437992002-04-12 09:54:03 +000016302
16303cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016304#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016305_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016306
16307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016308{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16309echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016310
Barry Warsawef82cd72000-06-30 16:21:01 +000016311# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000016312{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16313echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016314
Martin v. Löwiseba40652007-08-30 20:10:57 +000016315# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016316if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016317 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016318if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016319then
16320
16321cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016322#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016323_ACEOF
16324
Martin v. Löwiseba40652007-08-30 20:10:57 +000016325 { echo "$as_me:$LINENO: result: yes" >&5
16326echo "${ECHO_T}yes" >&6; }
16327else { echo "$as_me:$LINENO: result: no" >&5
16328echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016329fi
16330else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016331 { echo "$as_me:$LINENO: result: no" >&5
16332echo "${ECHO_T}no" >&6; }
16333fi
16334
Barry Warsawef82cd72000-06-30 16:21:01 +000016335
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016336# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016337
Guido van Rossum98935bf2001-09-05 19:13:16 +000016338DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016339
Guido van Rossume97ee181999-12-20 21:27:22 +000016340# the dlopen() function means we might want to use dynload_shlib.o. some
16341# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016342
Thomas Wouters3a584202000-08-05 23:28:51 +000016343for ac_func in dlopen
16344do
Martin v. Löwis11437992002-04-12 09:54:03 +000016345as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016346{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16347echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16348if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016350else
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016352/* confdefs.h. */
16353_ACEOF
16354cat confdefs.h >>conftest.$ac_ext
16355cat >>conftest.$ac_ext <<_ACEOF
16356/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016357/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16358 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16359#define $ac_func innocuous_$ac_func
16360
Guido van Rossume97ee181999-12-20 21:27:22 +000016361/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016362 which can conflict with char $ac_func (); below.
16363 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016364 <limits.h> exists even on freestanding compilers. */
16365
16366#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016367# include <limits.h>
16368#else
16369# include <assert.h>
16370#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016371
16372#undef $ac_func
16373
Martin v. Löwiseba40652007-08-30 20:10:57 +000016374/* Override any GCC internal prototype to avoid an error.
16375 Use char because int might match the return type of a GCC
16376 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016377#ifdef __cplusplus
16378extern "C"
16379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016380char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016381/* The GNU C library defines this for functions which it implements
16382 to always fail with ENOSYS. Some functions are actually named
16383 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016384#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016385choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016386#endif
16387
Skip Montanaro6dead952003-09-25 14:50:04 +000016388int
16389main ()
16390{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016391return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016392 ;
16393 return 0;
16394}
16395_ACEOF
16396rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016397if { (ac_try="$ac_link"
16398case "(($ac_try" in
16399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16400 *) ac_try_echo=$ac_try;;
16401esac
16402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16403 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016405 grep -v '^ *+' conftest.er1 >conftest.err
16406 rm -f conftest.er1
16407 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016409 (exit $ac_status); } && {
16410 test -z "$ac_c_werror_flag" ||
16411 test ! -s conftest.err
16412 } && test -s conftest$ac_exeext &&
16413 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016414 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016415else
Martin v. Löwis11437992002-04-12 09:54:03 +000016416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016417sed 's/^/| /' conftest.$ac_ext >&5
16418
Martin v. Löwiseba40652007-08-30 20:10:57 +000016419 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016421
16422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016423 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016425ac_res=`eval echo '${'$as_ac_var'}'`
16426 { echo "$as_me:$LINENO: result: $ac_res" >&5
16427echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016428if test `eval echo '${'$as_ac_var'}'` = yes; then
16429 cat >>confdefs.h <<_ACEOF
16430#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16431_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016432
Guido van Rossume97ee181999-12-20 21:27:22 +000016433fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016434done
Guido van Rossume97ee181999-12-20 21:27:22 +000016435
Michael W. Hudson54241132001-12-07 15:38:26 +000016436
Guido van Rossume97ee181999-12-20 21:27:22 +000016437# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16438# loading of modules.
16439
Martin v. Löwiseba40652007-08-30 20:10:57 +000016440{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16441echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016442if test -z "$DYNLOADFILE"
16443then
16444 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016445 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16446 if test "$ac_cv_func_dlopen" = yes
16447 then DYNLOADFILE="dynload_shlib.o"
16448 else DYNLOADFILE="dynload_aix.o"
16449 fi
16450 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016451 BeOS*) DYNLOADFILE="dynload_beos.o";;
16452 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016453 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16454 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016455 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016456 *)
16457 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16458 # out any dynamic loading
16459 if test "$ac_cv_func_dlopen" = yes
16460 then DYNLOADFILE="dynload_shlib.o"
16461 else DYNLOADFILE="dynload_stub.o"
16462 fi
16463 ;;
16464 esac
16465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016466{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16467echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016468if test "$DYNLOADFILE" != "dynload_stub.o"
16469then
Martin v. Löwis11437992002-04-12 09:54:03 +000016470
16471cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016472#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016473_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016474
16475fi
16476
Neil Schemenauer4e425612001-06-19 15:44:15 +000016477# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16478
Michael W. Hudson54241132001-12-07 15:38:26 +000016479
Martin v. Löwiseba40652007-08-30 20:10:57 +000016480{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16481echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016482if test -z "$MACHDEP_OBJS"
16483then
Jack Jansene578a632001-08-15 01:27:14 +000016484 MACHDEP_OBJS=$extra_machdep_objs
16485else
16486 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016488{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16489echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016490
Guido van Rossum627b2d71993-12-24 10:39:16 +000016491# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
Martin v. Löwisd6320502004-08-12 13:45:08 +000016563
Martin v. Löwisc3001752005-01-23 09:27:24 +000016564
16565
Neal Norwitz05a45592006-03-20 06:30:08 +000016566
16567
Martin v. Löwis382abef2007-02-19 10:55:19 +000016568
16569
Christian Heimes36281872007-11-30 21:11:28 +000016570
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016571
16572
Jesse Noller355b1262009-04-02 00:03:28 +000016573
16574
16575
16576
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016577for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16578 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016579 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016580 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016581 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016582 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016583 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000016584 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16585 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016586 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016587 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016588 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016589 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016590do
Martin v. Löwis11437992002-04-12 09:54:03 +000016591as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016592{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16593echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16594if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016595 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016596else
Martin v. Löwis11437992002-04-12 09:54:03 +000016597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016598/* confdefs.h. */
16599_ACEOF
16600cat confdefs.h >>conftest.$ac_ext
16601cat >>conftest.$ac_ext <<_ACEOF
16602/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016603/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16604 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16605#define $ac_func innocuous_$ac_func
16606
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016607/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016608 which can conflict with char $ac_func (); below.
16609 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016610 <limits.h> exists even on freestanding compilers. */
16611
16612#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016613# include <limits.h>
16614#else
16615# include <assert.h>
16616#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016617
16618#undef $ac_func
16619
Martin v. Löwiseba40652007-08-30 20:10:57 +000016620/* Override any GCC internal prototype to avoid an error.
16621 Use char because int might match the return type of a GCC
16622 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016623#ifdef __cplusplus
16624extern "C"
16625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016626char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016627/* The GNU C library defines this for functions which it implements
16628 to always fail with ENOSYS. Some functions are actually named
16629 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016630#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016631choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016632#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016633
Skip Montanaro6dead952003-09-25 14:50:04 +000016634int
16635main ()
16636{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016637return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016638 ;
16639 return 0;
16640}
16641_ACEOF
16642rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016643if { (ac_try="$ac_link"
16644case "(($ac_try" in
16645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16646 *) ac_try_echo=$ac_try;;
16647esac
16648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16649 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016651 grep -v '^ *+' conftest.er1 >conftest.err
16652 rm -f conftest.er1
16653 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016655 (exit $ac_status); } && {
16656 test -z "$ac_c_werror_flag" ||
16657 test ! -s conftest.err
16658 } && test -s conftest$ac_exeext &&
16659 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016660 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016661else
Martin v. Löwis11437992002-04-12 09:54:03 +000016662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016663sed 's/^/| /' conftest.$ac_ext >&5
16664
Martin v. Löwiseba40652007-08-30 20:10:57 +000016665 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016667
16668rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016669 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016671ac_res=`eval echo '${'$as_ac_var'}'`
16672 { echo "$as_me:$LINENO: result: $ac_res" >&5
16673echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016674if test `eval echo '${'$as_ac_var'}'` = yes; then
16675 cat >>confdefs.h <<_ACEOF
16676#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16677_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016678
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016679fi
16680done
16681
Michael W. Hudson54241132001-12-07 15:38:26 +000016682
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016683# For some functions, having a definition is not sufficient, since
16684# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016685{ echo "$as_me:$LINENO: checking for chroot" >&5
16686echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016687cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016688/* confdefs.h. */
16689_ACEOF
16690cat confdefs.h >>conftest.$ac_ext
16691cat >>conftest.$ac_ext <<_ACEOF
16692/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016693#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016694int
16695main ()
16696{
16697void *x=chroot
16698 ;
16699 return 0;
16700}
16701_ACEOF
16702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016703if { (ac_try="$ac_compile"
16704case "(($ac_try" in
16705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16706 *) ac_try_echo=$ac_try;;
16707esac
16708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016711 grep -v '^ *+' conftest.er1 >conftest.err
16712 rm -f conftest.er1
16713 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016715 (exit $ac_status); } && {
16716 test -z "$ac_c_werror_flag" ||
16717 test ! -s conftest.err
16718 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016719
16720cat >>confdefs.h <<\_ACEOF
16721#define HAVE_CHROOT 1
16722_ACEOF
16723
Martin v. Löwiseba40652007-08-30 20:10:57 +000016724 { echo "$as_me:$LINENO: result: yes" >&5
16725echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016726else
16727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016728sed 's/^/| /' conftest.$ac_ext >&5
16729
Martin v. Löwiseba40652007-08-30 20:10:57 +000016730 { echo "$as_me:$LINENO: result: no" >&5
16731echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016732
16733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016734
16735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16736{ echo "$as_me:$LINENO: checking for link" >&5
16737echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016739/* confdefs.h. */
16740_ACEOF
16741cat confdefs.h >>conftest.$ac_ext
16742cat >>conftest.$ac_ext <<_ACEOF
16743/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016744#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016745int
16746main ()
16747{
16748void *x=link
16749 ;
16750 return 0;
16751}
16752_ACEOF
16753rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016754if { (ac_try="$ac_compile"
16755case "(($ac_try" in
16756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16757 *) ac_try_echo=$ac_try;;
16758esac
16759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016762 grep -v '^ *+' conftest.er1 >conftest.err
16763 rm -f conftest.er1
16764 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016766 (exit $ac_status); } && {
16767 test -z "$ac_c_werror_flag" ||
16768 test ! -s conftest.err
16769 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016770
16771cat >>confdefs.h <<\_ACEOF
16772#define HAVE_LINK 1
16773_ACEOF
16774
Martin v. Löwiseba40652007-08-30 20:10:57 +000016775 { echo "$as_me:$LINENO: result: yes" >&5
16776echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016777else
16778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016779sed 's/^/| /' conftest.$ac_ext >&5
16780
Martin v. Löwiseba40652007-08-30 20:10:57 +000016781 { echo "$as_me:$LINENO: result: no" >&5
16782echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016783
16784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016785
16786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16787{ echo "$as_me:$LINENO: checking for symlink" >&5
16788echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016789cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016790/* confdefs.h. */
16791_ACEOF
16792cat confdefs.h >>conftest.$ac_ext
16793cat >>conftest.$ac_ext <<_ACEOF
16794/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016795#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016796int
16797main ()
16798{
16799void *x=symlink
16800 ;
16801 return 0;
16802}
16803_ACEOF
16804rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016805if { (ac_try="$ac_compile"
16806case "(($ac_try" in
16807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16808 *) ac_try_echo=$ac_try;;
16809esac
16810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016813 grep -v '^ *+' conftest.er1 >conftest.err
16814 rm -f conftest.er1
16815 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016817 (exit $ac_status); } && {
16818 test -z "$ac_c_werror_flag" ||
16819 test ! -s conftest.err
16820 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016821
16822cat >>confdefs.h <<\_ACEOF
16823#define HAVE_SYMLINK 1
16824_ACEOF
16825
Martin v. Löwiseba40652007-08-30 20:10:57 +000016826 { echo "$as_me:$LINENO: result: yes" >&5
16827echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016828else
16829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016830sed 's/^/| /' conftest.$ac_ext >&5
16831
Martin v. Löwiseba40652007-08-30 20:10:57 +000016832 { echo "$as_me:$LINENO: result: no" >&5
16833echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016834
16835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016836
16837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16838{ echo "$as_me:$LINENO: checking for fchdir" >&5
16839echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016840cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016841/* confdefs.h. */
16842_ACEOF
16843cat confdefs.h >>conftest.$ac_ext
16844cat >>conftest.$ac_ext <<_ACEOF
16845/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016846#include <unistd.h>
16847int
16848main ()
16849{
16850void *x=fchdir
16851 ;
16852 return 0;
16853}
16854_ACEOF
16855rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016856if { (ac_try="$ac_compile"
16857case "(($ac_try" in
16858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16859 *) ac_try_echo=$ac_try;;
16860esac
16861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16862 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016864 grep -v '^ *+' conftest.er1 >conftest.err
16865 rm -f conftest.er1
16866 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016868 (exit $ac_status); } && {
16869 test -z "$ac_c_werror_flag" ||
16870 test ! -s conftest.err
16871 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016872
16873cat >>confdefs.h <<\_ACEOF
16874#define HAVE_FCHDIR 1
16875_ACEOF
16876
Martin v. Löwiseba40652007-08-30 20:10:57 +000016877 { echo "$as_me:$LINENO: result: yes" >&5
16878echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016879else
16880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016881sed 's/^/| /' conftest.$ac_ext >&5
16882
Martin v. Löwiseba40652007-08-30 20:10:57 +000016883 { echo "$as_me:$LINENO: result: no" >&5
16884echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016885
16886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016887
16888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16889{ echo "$as_me:$LINENO: checking for fsync" >&5
16890echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016892/* confdefs.h. */
16893_ACEOF
16894cat confdefs.h >>conftest.$ac_ext
16895cat >>conftest.$ac_ext <<_ACEOF
16896/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016897#include <unistd.h>
16898int
16899main ()
16900{
16901void *x=fsync
16902 ;
16903 return 0;
16904}
16905_ACEOF
16906rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016907if { (ac_try="$ac_compile"
16908case "(($ac_try" in
16909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16910 *) ac_try_echo=$ac_try;;
16911esac
16912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016915 grep -v '^ *+' conftest.er1 >conftest.err
16916 rm -f conftest.er1
16917 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016919 (exit $ac_status); } && {
16920 test -z "$ac_c_werror_flag" ||
16921 test ! -s conftest.err
16922 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016923
16924cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016925#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016926_ACEOF
16927
Martin v. Löwiseba40652007-08-30 20:10:57 +000016928 { echo "$as_me:$LINENO: result: yes" >&5
16929echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016930else
16931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016932sed 's/^/| /' conftest.$ac_ext >&5
16933
Martin v. Löwiseba40652007-08-30 20:10:57 +000016934 { echo "$as_me:$LINENO: result: no" >&5
16935echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016936
16937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016938
16939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16940{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16941echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016942cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016943/* confdefs.h. */
16944_ACEOF
16945cat confdefs.h >>conftest.$ac_ext
16946cat >>conftest.$ac_ext <<_ACEOF
16947/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016948#include <unistd.h>
16949int
16950main ()
16951{
16952void *x=fdatasync
16953 ;
16954 return 0;
16955}
16956_ACEOF
16957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016958if { (ac_try="$ac_compile"
16959case "(($ac_try" in
16960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16961 *) ac_try_echo=$ac_try;;
16962esac
16963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016966 grep -v '^ *+' conftest.er1 >conftest.err
16967 rm -f conftest.er1
16968 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970 (exit $ac_status); } && {
16971 test -z "$ac_c_werror_flag" ||
16972 test ! -s conftest.err
16973 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016974
16975cat >>confdefs.h <<\_ACEOF
16976#define HAVE_FDATASYNC 1
16977_ACEOF
16978
Martin v. Löwiseba40652007-08-30 20:10:57 +000016979 { echo "$as_me:$LINENO: result: yes" >&5
16980echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016981else
16982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016983sed 's/^/| /' conftest.$ac_ext >&5
16984
Martin v. Löwiseba40652007-08-30 20:10:57 +000016985 { echo "$as_me:$LINENO: result: no" >&5
16986echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016987
16988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016989
16990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016991{ echo "$as_me:$LINENO: checking for epoll" >&5
16992echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16993cat >conftest.$ac_ext <<_ACEOF
16994/* confdefs.h. */
16995_ACEOF
16996cat confdefs.h >>conftest.$ac_ext
16997cat >>conftest.$ac_ext <<_ACEOF
16998/* end confdefs.h. */
16999#include <sys/epoll.h>
17000int
17001main ()
17002{
17003void *x=epoll_create
17004 ;
17005 return 0;
17006}
17007_ACEOF
17008rm -f conftest.$ac_objext
17009if { (ac_try="$ac_compile"
17010case "(($ac_try" in
17011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17012 *) ac_try_echo=$ac_try;;
17013esac
17014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17015 (eval "$ac_compile") 2>conftest.er1
17016 ac_status=$?
17017 grep -v '^ *+' conftest.er1 >conftest.err
17018 rm -f conftest.er1
17019 cat conftest.err >&5
17020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17021 (exit $ac_status); } && {
17022 test -z "$ac_c_werror_flag" ||
17023 test ! -s conftest.err
17024 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017025
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017026cat >>confdefs.h <<\_ACEOF
17027#define HAVE_EPOLL 1
17028_ACEOF
17029
17030 { echo "$as_me:$LINENO: result: yes" >&5
17031echo "${ECHO_T}yes" >&6; }
17032else
17033 echo "$as_me: failed program was:" >&5
17034sed 's/^/| /' conftest.$ac_ext >&5
17035
17036 { echo "$as_me:$LINENO: result: no" >&5
17037echo "${ECHO_T}no" >&6; }
17038
17039fi
17040
17041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17042{ echo "$as_me:$LINENO: checking for kqueue" >&5
17043echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
17044cat >conftest.$ac_ext <<_ACEOF
17045/* confdefs.h. */
17046_ACEOF
17047cat confdefs.h >>conftest.$ac_ext
17048cat >>conftest.$ac_ext <<_ACEOF
17049/* end confdefs.h. */
17050
17051#include <sys/types.h>
17052#include <sys/event.h>
17053
17054int
17055main ()
17056{
17057int x=kqueue()
17058 ;
17059 return 0;
17060}
17061_ACEOF
17062rm -f conftest.$ac_objext
17063if { (ac_try="$ac_compile"
17064case "(($ac_try" in
17065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17066 *) ac_try_echo=$ac_try;;
17067esac
17068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17069 (eval "$ac_compile") 2>conftest.er1
17070 ac_status=$?
17071 grep -v '^ *+' conftest.er1 >conftest.err
17072 rm -f conftest.er1
17073 cat conftest.err >&5
17074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17075 (exit $ac_status); } && {
17076 test -z "$ac_c_werror_flag" ||
17077 test ! -s conftest.err
17078 } && test -s conftest.$ac_objext; then
17079
17080cat >>confdefs.h <<\_ACEOF
17081#define HAVE_KQUEUE 1
17082_ACEOF
17083
17084 { echo "$as_me:$LINENO: result: yes" >&5
17085echo "${ECHO_T}yes" >&6; }
17086else
17087 echo "$as_me: failed program was:" >&5
17088sed 's/^/| /' conftest.$ac_ext >&5
17089
17090 { echo "$as_me:$LINENO: result: no" >&5
17091echo "${ECHO_T}no" >&6; }
17092
17093fi
17094
17095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017096# On some systems (eg. FreeBSD 5), we would find a definition of the
17097# functions ctermid_r, setgroups in the library, but no prototype
17098# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17099# address to avoid compiler warnings and potential miscompilations
17100# because of the missing prototypes.
17101
Martin v. Löwiseba40652007-08-30 20:10:57 +000017102{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17103echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017105/* confdefs.h. */
17106_ACEOF
17107cat confdefs.h >>conftest.$ac_ext
17108cat >>conftest.$ac_ext <<_ACEOF
17109/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017110
17111#include "confdefs.h"
17112#include <stdio.h>
17113
Martin v. Löwisd5843682002-11-21 20:41:28 +000017114int
17115main ()
17116{
17117void* p = ctermid_r
17118 ;
17119 return 0;
17120}
17121_ACEOF
17122rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017123if { (ac_try="$ac_compile"
17124case "(($ac_try" in
17125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17126 *) ac_try_echo=$ac_try;;
17127esac
17128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017131 grep -v '^ *+' conftest.er1 >conftest.err
17132 rm -f conftest.er1
17133 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017135 (exit $ac_status); } && {
17136 test -z "$ac_c_werror_flag" ||
17137 test ! -s conftest.err
17138 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017139
17140cat >>confdefs.h <<\_ACEOF
17141#define HAVE_CTERMID_R 1
17142_ACEOF
17143
Martin v. Löwiseba40652007-08-30 20:10:57 +000017144 { echo "$as_me:$LINENO: result: yes" >&5
17145echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017146else
17147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017148sed 's/^/| /' conftest.$ac_ext >&5
17149
Martin v. Löwiseba40652007-08-30 20:10:57 +000017150 { echo "$as_me:$LINENO: result: no" >&5
17151echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017152
17153fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000017154
Martin v. Löwiseba40652007-08-30 20:10:57 +000017155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17156
17157{ echo "$as_me:$LINENO: checking for flock" >&5
17158echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017159cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017160/* confdefs.h. */
17161_ACEOF
17162cat confdefs.h >>conftest.$ac_ext
17163cat >>conftest.$ac_ext <<_ACEOF
17164/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017165
17166#include "confdefs.h"
17167#include <sys/file.h>
17168
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017169int
17170main ()
17171{
17172void* p = flock
17173 ;
17174 return 0;
17175}
17176_ACEOF
17177rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017178if { (ac_try="$ac_compile"
17179case "(($ac_try" in
17180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17181 *) ac_try_echo=$ac_try;;
17182esac
17183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017186 grep -v '^ *+' conftest.er1 >conftest.err
17187 rm -f conftest.er1
17188 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017190 (exit $ac_status); } && {
17191 test -z "$ac_c_werror_flag" ||
17192 test ! -s conftest.err
17193 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017194
17195cat >>confdefs.h <<\_ACEOF
17196#define HAVE_FLOCK 1
17197_ACEOF
17198
Martin v. Löwiseba40652007-08-30 20:10:57 +000017199 { echo "$as_me:$LINENO: result: yes" >&5
17200echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017201else
17202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017203sed 's/^/| /' conftest.$ac_ext >&5
17204
Martin v. Löwiseba40652007-08-30 20:10:57 +000017205 { echo "$as_me:$LINENO: result: no" >&5
17206echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017207
17208fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017209
Martin v. Löwiseba40652007-08-30 20:10:57 +000017210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17211
17212{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17213echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017215/* confdefs.h. */
17216_ACEOF
17217cat confdefs.h >>conftest.$ac_ext
17218cat >>conftest.$ac_ext <<_ACEOF
17219/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017220
17221#include "confdefs.h"
17222#include <unistd.h>
17223
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017224int
17225main ()
17226{
17227void* p = getpagesize
17228 ;
17229 return 0;
17230}
17231_ACEOF
17232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017233if { (ac_try="$ac_compile"
17234case "(($ac_try" in
17235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17236 *) ac_try_echo=$ac_try;;
17237esac
17238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017241 grep -v '^ *+' conftest.er1 >conftest.err
17242 rm -f conftest.er1
17243 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017245 (exit $ac_status); } && {
17246 test -z "$ac_c_werror_flag" ||
17247 test ! -s conftest.err
17248 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017249
17250cat >>confdefs.h <<\_ACEOF
17251#define HAVE_GETPAGESIZE 1
17252_ACEOF
17253
Martin v. Löwiseba40652007-08-30 20:10:57 +000017254 { echo "$as_me:$LINENO: result: yes" >&5
17255echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017256else
17257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017258sed 's/^/| /' conftest.$ac_ext >&5
17259
Martin v. Löwiseba40652007-08-30 20:10:57 +000017260 { echo "$as_me:$LINENO: result: no" >&5
17261echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017262
17263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017264
17265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017266
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017267for ac_prog in true
17268do
17269 # Extract the first word of "$ac_prog", so it can be a program name with args.
17270set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000017271{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17272echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017273if test "${ac_cv_prog_TRUE+set}" = set; then
17274 echo $ECHO_N "(cached) $ECHO_C" >&6
17275else
17276 if test -n "$TRUE"; then
17277 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17278else
17279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17280for as_dir in $PATH
17281do
17282 IFS=$as_save_IFS
17283 test -z "$as_dir" && as_dir=.
17284 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000017285 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 +000017286 ac_cv_prog_TRUE="$ac_prog"
17287 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17288 break 2
17289 fi
17290done
17291done
Martin v. Löwiseba40652007-08-30 20:10:57 +000017292IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017293
17294fi
17295fi
17296TRUE=$ac_cv_prog_TRUE
17297if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017298 { echo "$as_me:$LINENO: result: $TRUE" >&5
17299echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017300else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017301 { echo "$as_me:$LINENO: result: no" >&5
17302echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017303fi
17304
Martin v. Löwiseba40652007-08-30 20:10:57 +000017305
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017306 test -n "$TRUE" && break
17307done
17308test -n "$TRUE" || TRUE="/bin/true"
17309
17310
Martin v. Löwiseba40652007-08-30 20:10:57 +000017311{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17312echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017313if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17314 echo $ECHO_N "(cached) $ECHO_C" >&6
17315else
17316 ac_check_lib_save_LIBS=$LIBS
17317LIBS="-lc $LIBS"
17318cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017319/* confdefs.h. */
17320_ACEOF
17321cat confdefs.h >>conftest.$ac_ext
17322cat >>conftest.$ac_ext <<_ACEOF
17323/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017324
Martin v. Löwiseba40652007-08-30 20:10:57 +000017325/* Override any GCC internal prototype to avoid an error.
17326 Use char because int might match the return type of a GCC
17327 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017328#ifdef __cplusplus
17329extern "C"
17330#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017331char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017332int
17333main ()
17334{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017335return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017336 ;
17337 return 0;
17338}
17339_ACEOF
17340rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017341if { (ac_try="$ac_link"
17342case "(($ac_try" in
17343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17344 *) ac_try_echo=$ac_try;;
17345esac
17346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17347 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017349 grep -v '^ *+' conftest.er1 >conftest.err
17350 rm -f conftest.er1
17351 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017353 (exit $ac_status); } && {
17354 test -z "$ac_c_werror_flag" ||
17355 test ! -s conftest.err
17356 } && test -s conftest$ac_exeext &&
17357 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017358 ac_cv_lib_c_inet_aton=yes
17359else
17360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017361sed 's/^/| /' conftest.$ac_ext >&5
17362
Martin v. Löwiseba40652007-08-30 20:10:57 +000017363 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017365
17366rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017367 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017368LIBS=$ac_check_lib_save_LIBS
17369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017370{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17371echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017372if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017373 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017374else
17375
Martin v. Löwiseba40652007-08-30 20:10:57 +000017376{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17377echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017378if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17379 echo $ECHO_N "(cached) $ECHO_C" >&6
17380else
17381 ac_check_lib_save_LIBS=$LIBS
17382LIBS="-lresolv $LIBS"
17383cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017384/* confdefs.h. */
17385_ACEOF
17386cat confdefs.h >>conftest.$ac_ext
17387cat >>conftest.$ac_ext <<_ACEOF
17388/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017389
Martin v. Löwiseba40652007-08-30 20:10:57 +000017390/* Override any GCC internal prototype to avoid an error.
17391 Use char because int might match the return type of a GCC
17392 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017393#ifdef __cplusplus
17394extern "C"
17395#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017396char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017397int
17398main ()
17399{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017400return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017401 ;
17402 return 0;
17403}
17404_ACEOF
17405rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017406if { (ac_try="$ac_link"
17407case "(($ac_try" in
17408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17409 *) ac_try_echo=$ac_try;;
17410esac
17411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17412 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017414 grep -v '^ *+' conftest.er1 >conftest.err
17415 rm -f conftest.er1
17416 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017418 (exit $ac_status); } && {
17419 test -z "$ac_c_werror_flag" ||
17420 test ! -s conftest.err
17421 } && test -s conftest$ac_exeext &&
17422 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017423 ac_cv_lib_resolv_inet_aton=yes
17424else
17425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017426sed 's/^/| /' conftest.$ac_ext >&5
17427
Martin v. Löwiseba40652007-08-30 20:10:57 +000017428 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017430
17431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017432 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017433LIBS=$ac_check_lib_save_LIBS
17434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017435{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17436echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017437if test $ac_cv_lib_resolv_inet_aton = yes; then
17438 cat >>confdefs.h <<_ACEOF
17439#define HAVE_LIBRESOLV 1
17440_ACEOF
17441
17442 LIBS="-lresolv $LIBS"
17443
17444fi
17445
17446
17447fi
17448
17449
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017450# On Tru64, chflags seems to be present, but calling it will
17451# exit Python
17452{ echo "$as_me:$LINENO: checking for chflags" >&5
17453echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17454if test "$cross_compiling" = yes; then
17455 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17456See \`config.log' for more details." >&5
17457echo "$as_me: error: cannot run test program while cross compiling
17458See \`config.log' for more details." >&2;}
17459 { (exit 1); exit 1; }; }
17460else
17461 cat >conftest.$ac_ext <<_ACEOF
17462/* confdefs.h. */
17463_ACEOF
17464cat confdefs.h >>conftest.$ac_ext
17465cat >>conftest.$ac_ext <<_ACEOF
17466/* end confdefs.h. */
17467
17468#include <sys/stat.h>
17469#include <unistd.h>
17470int main(int argc, char*argv[])
17471{
17472 if(chflags(argv[0], 0) != 0)
17473 return 1;
17474 return 0;
17475}
17476
17477_ACEOF
17478rm -f conftest$ac_exeext
17479if { (ac_try="$ac_link"
17480case "(($ac_try" in
17481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17482 *) ac_try_echo=$ac_try;;
17483esac
17484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17485 (eval "$ac_link") 2>&5
17486 ac_status=$?
17487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17488 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17489 { (case "(($ac_try" in
17490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17491 *) ac_try_echo=$ac_try;;
17492esac
17493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17494 (eval "$ac_try") 2>&5
17495 ac_status=$?
17496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17497 (exit $ac_status); }; }; then
17498
17499cat >>confdefs.h <<\_ACEOF
17500#define HAVE_CHFLAGS 1
17501_ACEOF
17502
17503 { echo "$as_me:$LINENO: result: yes" >&5
17504echo "${ECHO_T}yes" >&6; }
17505else
17506 echo "$as_me: program exited with status $ac_status" >&5
17507echo "$as_me: failed program was:" >&5
17508sed 's/^/| /' conftest.$ac_ext >&5
17509
17510( exit $ac_status )
17511{ echo "$as_me:$LINENO: result: no" >&5
17512echo "${ECHO_T}no" >&6; }
17513
17514fi
17515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17516fi
17517
17518
17519
17520{ echo "$as_me:$LINENO: checking for lchflags" >&5
17521echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17522if test "$cross_compiling" = yes; then
17523 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17524See \`config.log' for more details." >&5
17525echo "$as_me: error: cannot run test program while cross compiling
17526See \`config.log' for more details." >&2;}
17527 { (exit 1); exit 1; }; }
17528else
17529 cat >conftest.$ac_ext <<_ACEOF
17530/* confdefs.h. */
17531_ACEOF
17532cat confdefs.h >>conftest.$ac_ext
17533cat >>conftest.$ac_ext <<_ACEOF
17534/* end confdefs.h. */
17535
17536#include <sys/stat.h>
17537#include <unistd.h>
17538int main(int argc, char*argv[])
17539{
17540 if(lchflags(argv[0], 0) != 0)
17541 return 1;
17542 return 0;
17543}
17544
17545_ACEOF
17546rm -f conftest$ac_exeext
17547if { (ac_try="$ac_link"
17548case "(($ac_try" in
17549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17550 *) ac_try_echo=$ac_try;;
17551esac
17552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17553 (eval "$ac_link") 2>&5
17554 ac_status=$?
17555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17556 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17557 { (case "(($ac_try" in
17558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17559 *) ac_try_echo=$ac_try;;
17560esac
17561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17562 (eval "$ac_try") 2>&5
17563 ac_status=$?
17564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17565 (exit $ac_status); }; }; then
17566
17567cat >>confdefs.h <<\_ACEOF
17568#define HAVE_LCHFLAGS 1
17569_ACEOF
17570
17571 { echo "$as_me:$LINENO: result: yes" >&5
17572echo "${ECHO_T}yes" >&6; }
17573else
17574 echo "$as_me: program exited with status $ac_status" >&5
17575echo "$as_me: failed program was:" >&5
17576sed 's/^/| /' conftest.$ac_ext >&5
17577
17578( exit $ac_status )
17579{ echo "$as_me:$LINENO: result: no" >&5
17580echo "${ECHO_T}no" >&6; }
17581
17582fi
17583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17584fi
17585
17586
17587
Ronald Oussorenf8752642006-07-06 10:13:35 +000017588case $ac_sys_system/$ac_sys_release in
17589Darwin/*)
17590 _CUR_CFLAGS="${CFLAGS}"
17591 _CUR_LDFLAGS="${LDFLAGS}"
17592 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17593 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17594 ;;
17595esac
17596
Martin v. Löwiseba40652007-08-30 20:10:57 +000017597{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17598echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017599if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17600 echo $ECHO_N "(cached) $ECHO_C" >&6
17601else
17602 ac_check_lib_save_LIBS=$LIBS
17603LIBS="-lz $LIBS"
17604cat >conftest.$ac_ext <<_ACEOF
17605/* confdefs.h. */
17606_ACEOF
17607cat confdefs.h >>conftest.$ac_ext
17608cat >>conftest.$ac_ext <<_ACEOF
17609/* end confdefs.h. */
17610
Martin v. Löwiseba40652007-08-30 20:10:57 +000017611/* Override any GCC internal prototype to avoid an error.
17612 Use char because int might match the return type of a GCC
17613 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017614#ifdef __cplusplus
17615extern "C"
17616#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017617char inflateCopy ();
17618int
17619main ()
17620{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017621return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017622 ;
17623 return 0;
17624}
17625_ACEOF
17626rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017627if { (ac_try="$ac_link"
17628case "(($ac_try" in
17629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17630 *) ac_try_echo=$ac_try;;
17631esac
17632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17633 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017634 ac_status=$?
17635 grep -v '^ *+' conftest.er1 >conftest.err
17636 rm -f conftest.er1
17637 cat conftest.err >&5
17638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017639 (exit $ac_status); } && {
17640 test -z "$ac_c_werror_flag" ||
17641 test ! -s conftest.err
17642 } && test -s conftest$ac_exeext &&
17643 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017644 ac_cv_lib_z_inflateCopy=yes
17645else
17646 echo "$as_me: failed program was:" >&5
17647sed 's/^/| /' conftest.$ac_ext >&5
17648
Martin v. Löwiseba40652007-08-30 20:10:57 +000017649 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017651
17652rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017653 conftest$ac_exeext conftest.$ac_ext
17654LIBS=$ac_check_lib_save_LIBS
17655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017656{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17657echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017658if test $ac_cv_lib_z_inflateCopy = yes; then
17659
17660cat >>confdefs.h <<\_ACEOF
17661#define HAVE_ZLIB_COPY 1
17662_ACEOF
17663
17664fi
17665
17666
Ronald Oussorenf8752642006-07-06 10:13:35 +000017667case $ac_sys_system/$ac_sys_release in
17668Darwin/*)
17669 CFLAGS="${_CUR_CFLAGS}"
17670 LDFLAGS="${_CUR_LDFLAGS}"
17671 ;;
17672esac
17673
Martin v. Löwiseba40652007-08-30 20:10:57 +000017674{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17675echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017676cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017677/* confdefs.h. */
17678_ACEOF
17679cat confdefs.h >>conftest.$ac_ext
17680cat >>conftest.$ac_ext <<_ACEOF
17681/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017682
17683#include "confdefs.h"
17684#include <netdb.h>
17685
Martin v. Löwise9416172003-05-03 10:12:45 +000017686int
17687main ()
17688{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017689void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017690 ;
17691 return 0;
17692}
17693_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017694rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017695if { (ac_try="$ac_link"
17696case "(($ac_try" in
17697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17698 *) ac_try_echo=$ac_try;;
17699esac
17700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17701 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017703 grep -v '^ *+' conftest.er1 >conftest.err
17704 rm -f conftest.er1
17705 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017707 (exit $ac_status); } && {
17708 test -z "$ac_c_werror_flag" ||
17709 test ! -s conftest.err
17710 } && test -s conftest$ac_exeext &&
17711 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017712
17713cat >>confdefs.h <<\_ACEOF
17714#define HAVE_HSTRERROR 1
17715_ACEOF
17716
Martin v. Löwiseba40652007-08-30 20:10:57 +000017717 { echo "$as_me:$LINENO: result: yes" >&5
17718echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017719else
17720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017721sed 's/^/| /' conftest.$ac_ext >&5
17722
Martin v. Löwiseba40652007-08-30 20:10:57 +000017723 { echo "$as_me:$LINENO: result: no" >&5
17724echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017725
17726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017727
17728rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017730
Martin v. Löwiseba40652007-08-30 20:10:57 +000017731{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17732echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017734/* confdefs.h. */
17735_ACEOF
17736cat confdefs.h >>conftest.$ac_ext
17737cat >>conftest.$ac_ext <<_ACEOF
17738/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017739
17740#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017741#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017742#include <sys/socket.h>
17743#include <netinet/in.h>
17744#include <arpa/inet.h>
17745
Martin v. Löwise9416172003-05-03 10:12:45 +000017746int
17747main ()
17748{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017749void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017750 ;
17751 return 0;
17752}
17753_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017754rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017755if { (ac_try="$ac_link"
17756case "(($ac_try" in
17757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17758 *) ac_try_echo=$ac_try;;
17759esac
17760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17761 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017763 grep -v '^ *+' conftest.er1 >conftest.err
17764 rm -f conftest.er1
17765 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017767 (exit $ac_status); } && {
17768 test -z "$ac_c_werror_flag" ||
17769 test ! -s conftest.err
17770 } && test -s conftest$ac_exeext &&
17771 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017772
17773cat >>confdefs.h <<\_ACEOF
17774#define HAVE_INET_ATON 1
17775_ACEOF
17776
Martin v. Löwiseba40652007-08-30 20:10:57 +000017777 { echo "$as_me:$LINENO: result: yes" >&5
17778echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017779else
17780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017781sed 's/^/| /' conftest.$ac_ext >&5
17782
Martin v. Löwiseba40652007-08-30 20:10:57 +000017783 { echo "$as_me:$LINENO: result: no" >&5
17784echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017785
17786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017787
17788rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017789 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017790
Martin v. Löwiseba40652007-08-30 20:10:57 +000017791{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17792echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017793cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017794/* confdefs.h. */
17795_ACEOF
17796cat confdefs.h >>conftest.$ac_ext
17797cat >>conftest.$ac_ext <<_ACEOF
17798/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017799
17800#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017801#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017802#include <sys/socket.h>
17803#include <netinet/in.h>
17804#include <arpa/inet.h>
17805
Martin v. Löwise9416172003-05-03 10:12:45 +000017806int
17807main ()
17808{
17809void* p = inet_pton
17810 ;
17811 return 0;
17812}
17813_ACEOF
17814rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017815if { (ac_try="$ac_compile"
17816case "(($ac_try" in
17817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17818 *) ac_try_echo=$ac_try;;
17819esac
17820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017823 grep -v '^ *+' conftest.er1 >conftest.err
17824 rm -f conftest.er1
17825 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017827 (exit $ac_status); } && {
17828 test -z "$ac_c_werror_flag" ||
17829 test ! -s conftest.err
17830 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017831
17832cat >>confdefs.h <<\_ACEOF
17833#define HAVE_INET_PTON 1
17834_ACEOF
17835
Martin v. Löwiseba40652007-08-30 20:10:57 +000017836 { echo "$as_me:$LINENO: result: yes" >&5
17837echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017838else
17839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017840sed 's/^/| /' conftest.$ac_ext >&5
17841
Martin v. Löwiseba40652007-08-30 20:10:57 +000017842 { echo "$as_me:$LINENO: result: no" >&5
17843echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017844
17845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017846
17847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017848
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017849# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017850{ echo "$as_me:$LINENO: checking for setgroups" >&5
17851echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017853/* confdefs.h. */
17854_ACEOF
17855cat confdefs.h >>conftest.$ac_ext
17856cat >>conftest.$ac_ext <<_ACEOF
17857/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017858
17859#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017860#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017861#ifdef HAVE_GRP_H
17862#include <grp.h>
17863#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017864
Martin v. Löwisd5843682002-11-21 20:41:28 +000017865int
17866main ()
17867{
17868void* p = setgroups
17869 ;
17870 return 0;
17871}
17872_ACEOF
17873rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017874if { (ac_try="$ac_compile"
17875case "(($ac_try" in
17876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17877 *) ac_try_echo=$ac_try;;
17878esac
17879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017882 grep -v '^ *+' conftest.er1 >conftest.err
17883 rm -f conftest.er1
17884 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017886 (exit $ac_status); } && {
17887 test -z "$ac_c_werror_flag" ||
17888 test ! -s conftest.err
17889 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017890
17891cat >>confdefs.h <<\_ACEOF
17892#define HAVE_SETGROUPS 1
17893_ACEOF
17894
Martin v. Löwiseba40652007-08-30 20:10:57 +000017895 { echo "$as_me:$LINENO: result: yes" >&5
17896echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017897else
17898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017899sed 's/^/| /' conftest.$ac_ext >&5
17900
Martin v. Löwiseba40652007-08-30 20:10:57 +000017901 { echo "$as_me:$LINENO: result: no" >&5
17902echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017903
17904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017905
17906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017907
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017908# check for openpty and forkpty
17909
Martin v. Löwis11437992002-04-12 09:54:03 +000017910
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017911for ac_func in openpty
17912do
Martin v. Löwis11437992002-04-12 09:54:03 +000017913as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017914{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17915echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17916if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017918else
Martin v. Löwis11437992002-04-12 09:54:03 +000017919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017920/* confdefs.h. */
17921_ACEOF
17922cat confdefs.h >>conftest.$ac_ext
17923cat >>conftest.$ac_ext <<_ACEOF
17924/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017925/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17926 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17927#define $ac_func innocuous_$ac_func
17928
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017929/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017930 which can conflict with char $ac_func (); below.
17931 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017932 <limits.h> exists even on freestanding compilers. */
17933
17934#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017935# include <limits.h>
17936#else
17937# include <assert.h>
17938#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017939
17940#undef $ac_func
17941
Martin v. Löwiseba40652007-08-30 20:10:57 +000017942/* Override any GCC internal prototype to avoid an error.
17943 Use char because int might match the return type of a GCC
17944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017945#ifdef __cplusplus
17946extern "C"
17947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017948char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017949/* The GNU C library defines this for functions which it implements
17950 to always fail with ENOSYS. Some functions are actually named
17951 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017952#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017953choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017954#endif
17955
Skip Montanaro6dead952003-09-25 14:50:04 +000017956int
17957main ()
17958{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017959return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 ;
17961 return 0;
17962}
17963_ACEOF
17964rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017965if { (ac_try="$ac_link"
17966case "(($ac_try" in
17967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17968 *) ac_try_echo=$ac_try;;
17969esac
17970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17971 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017973 grep -v '^ *+' conftest.er1 >conftest.err
17974 rm -f conftest.er1
17975 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017977 (exit $ac_status); } && {
17978 test -z "$ac_c_werror_flag" ||
17979 test ! -s conftest.err
17980 } && test -s conftest$ac_exeext &&
17981 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017982 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017983else
Martin v. Löwis11437992002-04-12 09:54:03 +000017984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017985sed 's/^/| /' conftest.$ac_ext >&5
17986
Martin v. Löwiseba40652007-08-30 20:10:57 +000017987 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017989
17990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017991 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017993ac_res=`eval echo '${'$as_ac_var'}'`
17994 { echo "$as_me:$LINENO: result: $ac_res" >&5
17995echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017996if test `eval echo '${'$as_ac_var'}'` = yes; then
17997 cat >>confdefs.h <<_ACEOF
17998#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17999_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018000
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018001else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018002 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18003echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018004if test "${ac_cv_lib_util_openpty+set}" = set; then
18005 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018006else
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018008LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018009cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018010/* confdefs.h. */
18011_ACEOF
18012cat confdefs.h >>conftest.$ac_ext
18013cat >>conftest.$ac_ext <<_ACEOF
18014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018015
Martin v. Löwiseba40652007-08-30 20:10:57 +000018016/* Override any GCC internal prototype to avoid an error.
18017 Use char because int might match the return type of a GCC
18018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018019#ifdef __cplusplus
18020extern "C"
18021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018022char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018023int
18024main ()
18025{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018026return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 ;
18028 return 0;
18029}
18030_ACEOF
18031rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018032if { (ac_try="$ac_link"
18033case "(($ac_try" in
18034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18035 *) ac_try_echo=$ac_try;;
18036esac
18037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18038 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018040 grep -v '^ *+' conftest.er1 >conftest.err
18041 rm -f conftest.er1
18042 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018044 (exit $ac_status); } && {
18045 test -z "$ac_c_werror_flag" ||
18046 test ! -s conftest.err
18047 } && test -s conftest$ac_exeext &&
18048 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018049 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018050else
Martin v. Löwis11437992002-04-12 09:54:03 +000018051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018052sed 's/^/| /' conftest.$ac_ext >&5
18053
Martin v. Löwiseba40652007-08-30 20:10:57 +000018054 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018056
18057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018059LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018061{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18062echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018063if test $ac_cv_lib_util_openpty = yes; then
18064 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018065#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018066_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018067 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018068else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018069 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18070echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018071if test "${ac_cv_lib_bsd_openpty+set}" = set; then
18072 echo $ECHO_N "(cached) $ECHO_C" >&6
18073else
18074 ac_check_lib_save_LIBS=$LIBS
18075LIBS="-lbsd $LIBS"
18076cat >conftest.$ac_ext <<_ACEOF
18077/* confdefs.h. */
18078_ACEOF
18079cat confdefs.h >>conftest.$ac_ext
18080cat >>conftest.$ac_ext <<_ACEOF
18081/* end confdefs.h. */
18082
Martin v. Löwiseba40652007-08-30 20:10:57 +000018083/* Override any GCC internal prototype to avoid an error.
18084 Use char because int might match the return type of a GCC
18085 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018086#ifdef __cplusplus
18087extern "C"
18088#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018089char openpty ();
18090int
18091main ()
18092{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018093return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018094 ;
18095 return 0;
18096}
18097_ACEOF
18098rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018099if { (ac_try="$ac_link"
18100case "(($ac_try" in
18101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18102 *) ac_try_echo=$ac_try;;
18103esac
18104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18105 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018106 ac_status=$?
18107 grep -v '^ *+' conftest.er1 >conftest.err
18108 rm -f conftest.er1
18109 cat conftest.err >&5
18110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018111 (exit $ac_status); } && {
18112 test -z "$ac_c_werror_flag" ||
18113 test ! -s conftest.err
18114 } && test -s conftest$ac_exeext &&
18115 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018116 ac_cv_lib_bsd_openpty=yes
18117else
18118 echo "$as_me: failed program was:" >&5
18119sed 's/^/| /' conftest.$ac_ext >&5
18120
Martin v. Löwiseba40652007-08-30 20:10:57 +000018121 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018123
18124rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018125 conftest$ac_exeext conftest.$ac_ext
18126LIBS=$ac_check_lib_save_LIBS
18127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018128{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18129echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018130if test $ac_cv_lib_bsd_openpty = yes; then
18131 cat >>confdefs.h <<\_ACEOF
18132#define HAVE_OPENPTY 1
18133_ACEOF
18134 LIBS="$LIBS -lbsd"
18135fi
18136
18137
18138fi
18139
Fred Drake8cef4cf2000-06-28 16:40:38 +000018140
18141fi
18142done
18143
Martin v. Löwis11437992002-04-12 09:54:03 +000018144
Fred Drake8cef4cf2000-06-28 16:40:38 +000018145for ac_func in forkpty
18146do
Martin v. Löwis11437992002-04-12 09:54:03 +000018147as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018148{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18149echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18150if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018152else
Martin v. Löwis11437992002-04-12 09:54:03 +000018153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018154/* confdefs.h. */
18155_ACEOF
18156cat confdefs.h >>conftest.$ac_ext
18157cat >>conftest.$ac_ext <<_ACEOF
18158/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018159/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18160 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18161#define $ac_func innocuous_$ac_func
18162
Fred Drake8cef4cf2000-06-28 16:40:38 +000018163/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018164 which can conflict with char $ac_func (); below.
18165 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018166 <limits.h> exists even on freestanding compilers. */
18167
18168#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018169# include <limits.h>
18170#else
18171# include <assert.h>
18172#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018173
18174#undef $ac_func
18175
Martin v. Löwiseba40652007-08-30 20:10:57 +000018176/* Override any GCC internal prototype to avoid an error.
18177 Use char because int might match the return type of a GCC
18178 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018179#ifdef __cplusplus
18180extern "C"
18181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018182char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018183/* The GNU C library defines this for functions which it implements
18184 to always fail with ENOSYS. Some functions are actually named
18185 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018186#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018187choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018188#endif
18189
Skip Montanaro6dead952003-09-25 14:50:04 +000018190int
18191main ()
18192{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018193return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018194 ;
18195 return 0;
18196}
18197_ACEOF
18198rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018199if { (ac_try="$ac_link"
18200case "(($ac_try" in
18201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18202 *) ac_try_echo=$ac_try;;
18203esac
18204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18205 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018207 grep -v '^ *+' conftest.er1 >conftest.err
18208 rm -f conftest.er1
18209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018211 (exit $ac_status); } && {
18212 test -z "$ac_c_werror_flag" ||
18213 test ! -s conftest.err
18214 } && test -s conftest$ac_exeext &&
18215 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018216 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018217else
Martin v. Löwis11437992002-04-12 09:54:03 +000018218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018219sed 's/^/| /' conftest.$ac_ext >&5
18220
Martin v. Löwiseba40652007-08-30 20:10:57 +000018221 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018223
18224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018225 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018227ac_res=`eval echo '${'$as_ac_var'}'`
18228 { echo "$as_me:$LINENO: result: $ac_res" >&5
18229echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018230if test `eval echo '${'$as_ac_var'}'` = yes; then
18231 cat >>confdefs.h <<_ACEOF
18232#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18233_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018234
Fred Drake8cef4cf2000-06-28 16:40:38 +000018235else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018236 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18237echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018238if test "${ac_cv_lib_util_forkpty+set}" = set; then
18239 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018240else
Martin v. Löwis11437992002-04-12 09:54:03 +000018241 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018242LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018244/* confdefs.h. */
18245_ACEOF
18246cat confdefs.h >>conftest.$ac_ext
18247cat >>conftest.$ac_ext <<_ACEOF
18248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018249
Martin v. Löwiseba40652007-08-30 20:10:57 +000018250/* Override any GCC internal prototype to avoid an error.
18251 Use char because int might match the return type of a GCC
18252 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018253#ifdef __cplusplus
18254extern "C"
18255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018256char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018257int
18258main ()
18259{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018260return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018261 ;
18262 return 0;
18263}
18264_ACEOF
18265rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018266if { (ac_try="$ac_link"
18267case "(($ac_try" in
18268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18269 *) ac_try_echo=$ac_try;;
18270esac
18271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18272 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018274 grep -v '^ *+' conftest.er1 >conftest.err
18275 rm -f conftest.er1
18276 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018278 (exit $ac_status); } && {
18279 test -z "$ac_c_werror_flag" ||
18280 test ! -s conftest.err
18281 } && test -s conftest$ac_exeext &&
18282 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018283 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018284else
Martin v. Löwis11437992002-04-12 09:54:03 +000018285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018286sed 's/^/| /' conftest.$ac_ext >&5
18287
Martin v. Löwiseba40652007-08-30 20:10:57 +000018288 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018290
18291rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018293LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018295{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18296echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018297if test $ac_cv_lib_util_forkpty = yes; then
18298 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018299#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018300_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018301 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018302else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018303 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18304echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018305if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18306 echo $ECHO_N "(cached) $ECHO_C" >&6
18307else
18308 ac_check_lib_save_LIBS=$LIBS
18309LIBS="-lbsd $LIBS"
18310cat >conftest.$ac_ext <<_ACEOF
18311/* confdefs.h. */
18312_ACEOF
18313cat confdefs.h >>conftest.$ac_ext
18314cat >>conftest.$ac_ext <<_ACEOF
18315/* end confdefs.h. */
18316
Martin v. Löwiseba40652007-08-30 20:10:57 +000018317/* Override any GCC internal prototype to avoid an error.
18318 Use char because int might match the return type of a GCC
18319 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018320#ifdef __cplusplus
18321extern "C"
18322#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018323char forkpty ();
18324int
18325main ()
18326{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018327return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018328 ;
18329 return 0;
18330}
18331_ACEOF
18332rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018333if { (ac_try="$ac_link"
18334case "(($ac_try" in
18335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18336 *) ac_try_echo=$ac_try;;
18337esac
18338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18339 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018340 ac_status=$?
18341 grep -v '^ *+' conftest.er1 >conftest.err
18342 rm -f conftest.er1
18343 cat conftest.err >&5
18344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018345 (exit $ac_status); } && {
18346 test -z "$ac_c_werror_flag" ||
18347 test ! -s conftest.err
18348 } && test -s conftest$ac_exeext &&
18349 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018350 ac_cv_lib_bsd_forkpty=yes
18351else
18352 echo "$as_me: failed program was:" >&5
18353sed 's/^/| /' conftest.$ac_ext >&5
18354
Martin v. Löwiseba40652007-08-30 20:10:57 +000018355 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018357
18358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018359 conftest$ac_exeext conftest.$ac_ext
18360LIBS=$ac_check_lib_save_LIBS
18361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018362{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18363echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018364if test $ac_cv_lib_bsd_forkpty = yes; then
18365 cat >>confdefs.h <<\_ACEOF
18366#define HAVE_FORKPTY 1
18367_ACEOF
18368 LIBS="$LIBS -lbsd"
18369fi
18370
18371
18372fi
18373
Fred Drake8cef4cf2000-06-28 16:40:38 +000018374
18375fi
18376done
18377
Jack Jansendd19cf82001-12-06 22:36:17 +000018378
Brett Cannonaa5778d2008-03-18 04:09:00 +000018379# Stuff for expat.
18380
18381for ac_func in memmove
18382do
18383as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18384{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18385echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18386if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18387 echo $ECHO_N "(cached) $ECHO_C" >&6
18388else
18389 cat >conftest.$ac_ext <<_ACEOF
18390/* confdefs.h. */
18391_ACEOF
18392cat confdefs.h >>conftest.$ac_ext
18393cat >>conftest.$ac_ext <<_ACEOF
18394/* end confdefs.h. */
18395/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18396 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18397#define $ac_func innocuous_$ac_func
18398
18399/* System header to define __stub macros and hopefully few prototypes,
18400 which can conflict with char $ac_func (); below.
18401 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18402 <limits.h> exists even on freestanding compilers. */
18403
18404#ifdef __STDC__
18405# include <limits.h>
18406#else
18407# include <assert.h>
18408#endif
18409
18410#undef $ac_func
18411
18412/* Override any GCC internal prototype to avoid an error.
18413 Use char because int might match the return type of a GCC
18414 builtin and then its argument prototype would still apply. */
18415#ifdef __cplusplus
18416extern "C"
18417#endif
18418char $ac_func ();
18419/* The GNU C library defines this for functions which it implements
18420 to always fail with ENOSYS. Some functions are actually named
18421 something starting with __ and the normal name is an alias. */
18422#if defined __stub_$ac_func || defined __stub___$ac_func
18423choke me
18424#endif
18425
18426int
18427main ()
18428{
18429return $ac_func ();
18430 ;
18431 return 0;
18432}
18433_ACEOF
18434rm -f conftest.$ac_objext conftest$ac_exeext
18435if { (ac_try="$ac_link"
18436case "(($ac_try" in
18437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18438 *) ac_try_echo=$ac_try;;
18439esac
18440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18441 (eval "$ac_link") 2>conftest.er1
18442 ac_status=$?
18443 grep -v '^ *+' conftest.er1 >conftest.err
18444 rm -f conftest.er1
18445 cat conftest.err >&5
18446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18447 (exit $ac_status); } && {
18448 test -z "$ac_c_werror_flag" ||
18449 test ! -s conftest.err
18450 } && test -s conftest$ac_exeext &&
18451 $as_test_x conftest$ac_exeext; then
18452 eval "$as_ac_var=yes"
18453else
18454 echo "$as_me: failed program was:" >&5
18455sed 's/^/| /' conftest.$ac_ext >&5
18456
18457 eval "$as_ac_var=no"
18458fi
18459
18460rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18461 conftest$ac_exeext conftest.$ac_ext
18462fi
18463ac_res=`eval echo '${'$as_ac_var'}'`
18464 { echo "$as_me:$LINENO: result: $ac_res" >&5
18465echo "${ECHO_T}$ac_res" >&6; }
18466if test `eval echo '${'$as_ac_var'}'` = yes; then
18467 cat >>confdefs.h <<_ACEOF
18468#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18469_ACEOF
18470
18471fi
18472done
18473
18474
Michael W. Hudson54241132001-12-07 15:38:26 +000018475# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018476
18477
18478
18479
18480
18481
Fred Drake8cef4cf2000-06-28 16:40:38 +000018482for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18483do
Martin v. Löwis11437992002-04-12 09:54:03 +000018484as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018485{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18486echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18487if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018489else
Martin v. Löwis11437992002-04-12 09:54:03 +000018490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018491/* confdefs.h. */
18492_ACEOF
18493cat confdefs.h >>conftest.$ac_ext
18494cat >>conftest.$ac_ext <<_ACEOF
18495/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018496/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18497 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18498#define $ac_func innocuous_$ac_func
18499
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018500/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018501 which can conflict with char $ac_func (); below.
18502 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018503 <limits.h> exists even on freestanding compilers. */
18504
18505#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018506# include <limits.h>
18507#else
18508# include <assert.h>
18509#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018510
18511#undef $ac_func
18512
Martin v. Löwiseba40652007-08-30 20:10:57 +000018513/* Override any GCC internal prototype to avoid an error.
18514 Use char because int might match the return type of a GCC
18515 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018516#ifdef __cplusplus
18517extern "C"
18518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018519char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018520/* The GNU C library defines this for functions which it implements
18521 to always fail with ENOSYS. Some functions are actually named
18522 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018523#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018524choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018525#endif
18526
Skip Montanaro6dead952003-09-25 14:50:04 +000018527int
18528main ()
18529{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018530return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018531 ;
18532 return 0;
18533}
18534_ACEOF
18535rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018536if { (ac_try="$ac_link"
18537case "(($ac_try" in
18538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18539 *) ac_try_echo=$ac_try;;
18540esac
18541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18542 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018544 grep -v '^ *+' conftest.er1 >conftest.err
18545 rm -f conftest.er1
18546 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018548 (exit $ac_status); } && {
18549 test -z "$ac_c_werror_flag" ||
18550 test ! -s conftest.err
18551 } && test -s conftest$ac_exeext &&
18552 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018553 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018554else
Martin v. Löwis11437992002-04-12 09:54:03 +000018555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018556sed 's/^/| /' conftest.$ac_ext >&5
18557
Martin v. Löwiseba40652007-08-30 20:10:57 +000018558 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018560
18561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018562 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018564ac_res=`eval echo '${'$as_ac_var'}'`
18565 { echo "$as_me:$LINENO: result: $ac_res" >&5
18566echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018567if test `eval echo '${'$as_ac_var'}'` = yes; then
18568 cat >>confdefs.h <<_ACEOF
18569#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18570_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018571
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018572fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018573done
18574
Michael W. Hudson54241132001-12-07 15:38:26 +000018575
Martin v. Löwis11437992002-04-12 09:54:03 +000018576
18577
18578
Brett Cannonaa5778d2008-03-18 04:09:00 +000018579for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018580do
Martin v. Löwis11437992002-04-12 09:54:03 +000018581as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018582{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18583echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18584if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018585 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018586else
Martin v. Löwis11437992002-04-12 09:54:03 +000018587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018588/* confdefs.h. */
18589_ACEOF
18590cat confdefs.h >>conftest.$ac_ext
18591cat >>conftest.$ac_ext <<_ACEOF
18592/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018593/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18594 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18595#define $ac_func innocuous_$ac_func
18596
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018597/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018598 which can conflict with char $ac_func (); below.
18599 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018600 <limits.h> exists even on freestanding compilers. */
18601
18602#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018603# include <limits.h>
18604#else
18605# include <assert.h>
18606#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018607
18608#undef $ac_func
18609
Martin v. Löwiseba40652007-08-30 20:10:57 +000018610/* Override any GCC internal prototype to avoid an error.
18611 Use char because int might match the return type of a GCC
18612 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018613#ifdef __cplusplus
18614extern "C"
18615#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018616char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018617/* The GNU C library defines this for functions which it implements
18618 to always fail with ENOSYS. Some functions are actually named
18619 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018620#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018621choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018622#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018623
Skip Montanaro6dead952003-09-25 14:50:04 +000018624int
18625main ()
18626{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018627return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018628 ;
18629 return 0;
18630}
18631_ACEOF
18632rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018633if { (ac_try="$ac_link"
18634case "(($ac_try" in
18635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18636 *) ac_try_echo=$ac_try;;
18637esac
18638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18639 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018641 grep -v '^ *+' conftest.er1 >conftest.err
18642 rm -f conftest.er1
18643 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018645 (exit $ac_status); } && {
18646 test -z "$ac_c_werror_flag" ||
18647 test ! -s conftest.err
18648 } && test -s conftest$ac_exeext &&
18649 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018650 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018651else
Martin v. Löwis11437992002-04-12 09:54:03 +000018652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018653sed 's/^/| /' conftest.$ac_ext >&5
18654
Martin v. Löwiseba40652007-08-30 20:10:57 +000018655 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018657
18658rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018661ac_res=`eval echo '${'$as_ac_var'}'`
18662 { echo "$as_me:$LINENO: result: $ac_res" >&5
18663echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018664if test `eval echo '${'$as_ac_var'}'` = yes; then
18665 cat >>confdefs.h <<_ACEOF
18666#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18667_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018668
Martin v. Löwis1142de32002-03-29 16:28:31 +000018669else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018670 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018671 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018672 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18673 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018674esac
18675
Martin v. Löwis1142de32002-03-29 16:28:31 +000018676fi
18677done
18678
18679
Martin v. Löwis11437992002-04-12 09:54:03 +000018680
Martin v. Löwis1142de32002-03-29 16:28:31 +000018681for ac_func in getpgrp
18682do
Martin v. Löwis11437992002-04-12 09:54:03 +000018683as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018684{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18685echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18686if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018687 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018688else
Martin v. Löwis11437992002-04-12 09:54:03 +000018689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018690/* confdefs.h. */
18691_ACEOF
18692cat confdefs.h >>conftest.$ac_ext
18693cat >>conftest.$ac_ext <<_ACEOF
18694/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018695/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18696 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18697#define $ac_func innocuous_$ac_func
18698
Martin v. Löwis1142de32002-03-29 16:28:31 +000018699/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018700 which can conflict with char $ac_func (); below.
18701 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018702 <limits.h> exists even on freestanding compilers. */
18703
18704#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018705# include <limits.h>
18706#else
18707# include <assert.h>
18708#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018709
18710#undef $ac_func
18711
Martin v. Löwiseba40652007-08-30 20:10:57 +000018712/* Override any GCC internal prototype to avoid an error.
18713 Use char because int might match the return type of a GCC
18714 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018715#ifdef __cplusplus
18716extern "C"
18717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018718char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018719/* The GNU C library defines this for functions which it implements
18720 to always fail with ENOSYS. Some functions are actually named
18721 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018722#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018723choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018724#endif
18725
Skip Montanaro6dead952003-09-25 14:50:04 +000018726int
18727main ()
18728{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018729return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018730 ;
18731 return 0;
18732}
18733_ACEOF
18734rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018735if { (ac_try="$ac_link"
18736case "(($ac_try" in
18737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18738 *) ac_try_echo=$ac_try;;
18739esac
18740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18741 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018743 grep -v '^ *+' conftest.er1 >conftest.err
18744 rm -f conftest.er1
18745 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018747 (exit $ac_status); } && {
18748 test -z "$ac_c_werror_flag" ||
18749 test ! -s conftest.err
18750 } && test -s conftest$ac_exeext &&
18751 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018752 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018753else
Martin v. Löwis11437992002-04-12 09:54:03 +000018754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018755sed 's/^/| /' conftest.$ac_ext >&5
18756
Martin v. Löwiseba40652007-08-30 20:10:57 +000018757 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018758fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018759
18760rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018761 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018763ac_res=`eval echo '${'$as_ac_var'}'`
18764 { echo "$as_me:$LINENO: result: $ac_res" >&5
18765echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018766if test `eval echo '${'$as_ac_var'}'` = yes; then
18767 cat >>confdefs.h <<_ACEOF
18768#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18769_ACEOF
18770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018771/* confdefs.h. */
18772_ACEOF
18773cat confdefs.h >>conftest.$ac_ext
18774cat >>conftest.$ac_ext <<_ACEOF
18775/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018776#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018777int
18778main ()
18779{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018780getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018781 ;
18782 return 0;
18783}
18784_ACEOF
18785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018786if { (ac_try="$ac_compile"
18787case "(($ac_try" in
18788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18789 *) ac_try_echo=$ac_try;;
18790esac
18791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018794 grep -v '^ *+' conftest.er1 >conftest.err
18795 rm -f conftest.er1
18796 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018798 (exit $ac_status); } && {
18799 test -z "$ac_c_werror_flag" ||
18800 test ! -s conftest.err
18801 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018802
18803cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018804#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018805_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018806
Martin v. Löwis11437992002-04-12 09:54:03 +000018807
Guido van Rossumf78abae1997-01-21 22:02:36 +000018808else
Martin v. Löwis11437992002-04-12 09:54:03 +000018809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018810sed 's/^/| /' conftest.$ac_ext >&5
18811
Martin v. Löwiseba40652007-08-30 20:10:57 +000018812
Guido van Rossum627b2d71993-12-24 10:39:16 +000018813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018814
18815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018816
Guido van Rossum627b2d71993-12-24 10:39:16 +000018817fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018818done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018819
Jack Jansen150753c2003-03-29 22:07:47 +000018820
18821for ac_func in setpgrp
18822do
18823as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018824{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18825echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18826if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018827 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018828else
Martin v. Löwis11437992002-04-12 09:54:03 +000018829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018830/* confdefs.h. */
18831_ACEOF
18832cat confdefs.h >>conftest.$ac_ext
18833cat >>conftest.$ac_ext <<_ACEOF
18834/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018835/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18836 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18837#define $ac_func innocuous_$ac_func
18838
Jack Jansen150753c2003-03-29 22:07:47 +000018839/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018840 which can conflict with char $ac_func (); below.
18841 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018842 <limits.h> exists even on freestanding compilers. */
18843
18844#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018845# include <limits.h>
18846#else
18847# include <assert.h>
18848#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018849
18850#undef $ac_func
18851
Martin v. Löwiseba40652007-08-30 20:10:57 +000018852/* Override any GCC internal prototype to avoid an error.
18853 Use char because int might match the return type of a GCC
18854 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018855#ifdef __cplusplus
18856extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018857#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018858char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018859/* The GNU C library defines this for functions which it implements
18860 to always fail with ENOSYS. Some functions are actually named
18861 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018862#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018863choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018864#endif
18865
Skip Montanaro6dead952003-09-25 14:50:04 +000018866int
18867main ()
18868{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018869return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018870 ;
18871 return 0;
18872}
18873_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018874rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018875if { (ac_try="$ac_link"
18876case "(($ac_try" in
18877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18878 *) ac_try_echo=$ac_try;;
18879esac
18880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18881 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018883 grep -v '^ *+' conftest.er1 >conftest.err
18884 rm -f conftest.er1
18885 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018887 (exit $ac_status); } && {
18888 test -z "$ac_c_werror_flag" ||
18889 test ! -s conftest.err
18890 } && test -s conftest$ac_exeext &&
18891 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018892 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018893else
Jack Jansen150753c2003-03-29 22:07:47 +000018894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018895sed 's/^/| /' conftest.$ac_ext >&5
18896
Martin v. Löwiseba40652007-08-30 20:10:57 +000018897 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018899
18900rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018901 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018903ac_res=`eval echo '${'$as_ac_var'}'`
18904 { echo "$as_me:$LINENO: result: $ac_res" >&5
18905echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018906if test `eval echo '${'$as_ac_var'}'` = yes; then
18907 cat >>confdefs.h <<_ACEOF
18908#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18909_ACEOF
18910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018911/* confdefs.h. */
18912_ACEOF
18913cat confdefs.h >>conftest.$ac_ext
18914cat >>conftest.$ac_ext <<_ACEOF
18915/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018916#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018917int
18918main ()
18919{
18920setpgrp(0,0);
18921 ;
18922 return 0;
18923}
18924_ACEOF
18925rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018926if { (ac_try="$ac_compile"
18927case "(($ac_try" in
18928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18929 *) ac_try_echo=$ac_try;;
18930esac
18931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18932 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018934 grep -v '^ *+' conftest.er1 >conftest.err
18935 rm -f conftest.er1
18936 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018938 (exit $ac_status); } && {
18939 test -z "$ac_c_werror_flag" ||
18940 test ! -s conftest.err
18941 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018942
18943cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018944#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018945_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018946
Jack Jansen150753c2003-03-29 22:07:47 +000018947
18948else
18949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018950sed 's/^/| /' conftest.$ac_ext >&5
18951
Martin v. Löwiseba40652007-08-30 20:10:57 +000018952
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018954
18955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018956
18957fi
18958done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018959
Martin v. Löwis11437992002-04-12 09:54:03 +000018960
Thomas Wouters3a584202000-08-05 23:28:51 +000018961for ac_func in gettimeofday
18962do
Martin v. Löwis11437992002-04-12 09:54:03 +000018963as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018964{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18965echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18966if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018967 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018968else
Martin v. Löwis11437992002-04-12 09:54:03 +000018969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018970/* confdefs.h. */
18971_ACEOF
18972cat confdefs.h >>conftest.$ac_ext
18973cat >>conftest.$ac_ext <<_ACEOF
18974/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018975/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18976 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18977#define $ac_func innocuous_$ac_func
18978
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018979/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018980 which can conflict with char $ac_func (); below.
18981 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018982 <limits.h> exists even on freestanding compilers. */
18983
18984#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018985# include <limits.h>
18986#else
18987# include <assert.h>
18988#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018989
18990#undef $ac_func
18991
Martin v. Löwiseba40652007-08-30 20:10:57 +000018992/* Override any GCC internal prototype to avoid an error.
18993 Use char because int might match the return type of a GCC
18994 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018995#ifdef __cplusplus
18996extern "C"
18997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018998char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018999/* The GNU C library defines this for functions which it implements
19000 to always fail with ENOSYS. Some functions are actually named
19001 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019002#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019003choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019004#endif
19005
Skip Montanaro6dead952003-09-25 14:50:04 +000019006int
19007main ()
19008{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019009return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019010 ;
19011 return 0;
19012}
19013_ACEOF
19014rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019015if { (ac_try="$ac_link"
19016case "(($ac_try" in
19017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19018 *) ac_try_echo=$ac_try;;
19019esac
19020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19021 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019023 grep -v '^ *+' conftest.er1 >conftest.err
19024 rm -f conftest.er1
19025 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019027 (exit $ac_status); } && {
19028 test -z "$ac_c_werror_flag" ||
19029 test ! -s conftest.err
19030 } && test -s conftest$ac_exeext &&
19031 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019032 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019033else
Martin v. Löwis11437992002-04-12 09:54:03 +000019034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019035sed 's/^/| /' conftest.$ac_ext >&5
19036
Martin v. Löwiseba40652007-08-30 20:10:57 +000019037 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019039
19040rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019041 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019043ac_res=`eval echo '${'$as_ac_var'}'`
19044 { echo "$as_me:$LINENO: result: $ac_res" >&5
19045echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019046if test `eval echo '${'$as_ac_var'}'` = yes; then
19047 cat >>confdefs.h <<_ACEOF
19048#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19049_ACEOF
19050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019051/* confdefs.h. */
19052_ACEOF
19053cat confdefs.h >>conftest.$ac_ext
19054cat >>conftest.$ac_ext <<_ACEOF
19055/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019056#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019057int
19058main ()
19059{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019060gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019061 ;
19062 return 0;
19063}
19064_ACEOF
19065rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019066if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019074 grep -v '^ *+' conftest.er1 >conftest.err
19075 rm -f conftest.er1
19076 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019078 (exit $ac_status); } && {
19079 test -z "$ac_c_werror_flag" ||
19080 test ! -s conftest.err
19081 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019082 :
19083else
Martin v. Löwis11437992002-04-12 09:54:03 +000019084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019085sed 's/^/| /' conftest.$ac_ext >&5
19086
Martin v. Löwis11437992002-04-12 09:54:03 +000019087
19088cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019089#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019090_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019091
Martin v. Löwis11437992002-04-12 09:54:03 +000019092
Guido van Rossum627b2d71993-12-24 10:39:16 +000019093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019094
19095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019096
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019097fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019098done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019099
Michael W. Hudson54241132001-12-07 15:38:26 +000019100
Martin v. Löwiseba40652007-08-30 20:10:57 +000019101{ echo "$as_me:$LINENO: checking for major" >&5
19102echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019104/* confdefs.h. */
19105_ACEOF
19106cat confdefs.h >>conftest.$ac_ext
19107cat >>conftest.$ac_ext <<_ACEOF
19108/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019109
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019110#if defined(MAJOR_IN_MKDEV)
19111#include <sys/mkdev.h>
19112#elif defined(MAJOR_IN_SYSMACROS)
19113#include <sys/sysmacros.h>
19114#else
19115#include <sys/types.h>
19116#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019117
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019118int
19119main ()
19120{
19121
19122 makedev(major(0),minor(0));
19123
19124 ;
19125 return 0;
19126}
19127_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019128rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019129if { (ac_try="$ac_link"
19130case "(($ac_try" in
19131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19132 *) ac_try_echo=$ac_try;;
19133esac
19134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19135 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019137 grep -v '^ *+' conftest.er1 >conftest.err
19138 rm -f conftest.er1
19139 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019141 (exit $ac_status); } && {
19142 test -z "$ac_c_werror_flag" ||
19143 test ! -s conftest.err
19144 } && test -s conftest$ac_exeext &&
19145 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019146
19147
19148cat >>confdefs.h <<\_ACEOF
19149#define HAVE_DEVICE_MACROS 1
19150_ACEOF
19151
Martin v. Löwiseba40652007-08-30 20:10:57 +000019152 { echo "$as_me:$LINENO: result: yes" >&5
19153echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019154
19155else
19156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019157sed 's/^/| /' conftest.$ac_ext >&5
19158
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019159
Martin v. Löwiseba40652007-08-30 20:10:57 +000019160 { echo "$as_me:$LINENO: result: no" >&5
19161echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019162
19163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019164
19165rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019166 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019167
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019168# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019169# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000019170{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19171echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019172cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019173/* confdefs.h. */
19174_ACEOF
19175cat confdefs.h >>conftest.$ac_ext
19176cat >>conftest.$ac_ext <<_ACEOF
19177/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019178
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019179#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019180#include <sys/socket.h>
19181#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019182#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019183
Martin v. Löwis11437992002-04-12 09:54:03 +000019184int
19185main ()
19186{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019187
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019188getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019189
Martin v. Löwis11437992002-04-12 09:54:03 +000019190 ;
19191 return 0;
19192}
19193_ACEOF
19194rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019195if { (ac_try="$ac_link"
19196case "(($ac_try" in
19197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19198 *) ac_try_echo=$ac_try;;
19199esac
19200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19201 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019203 grep -v '^ *+' conftest.er1 >conftest.err
19204 rm -f conftest.er1
19205 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019207 (exit $ac_status); } && {
19208 test -z "$ac_c_werror_flag" ||
19209 test ! -s conftest.err
19210 } && test -s conftest$ac_exeext &&
19211 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019212
Martin v. Löwiseba40652007-08-30 20:10:57 +000019213{ echo "$as_me:$LINENO: result: yes" >&5
19214echo "${ECHO_T}yes" >&6; }
19215{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19216echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019217if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019218 { echo "$as_me:$LINENO: result: buggy" >&5
19219echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019220buggygetaddrinfo=yes
19221else
Martin v. Löwis11437992002-04-12 09:54:03 +000019222 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019223/* confdefs.h. */
19224_ACEOF
19225cat confdefs.h >>conftest.$ac_ext
19226cat >>conftest.$ac_ext <<_ACEOF
19227/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019228
19229#include <sys/types.h>
19230#include <netdb.h>
19231#include <string.h>
19232#include <sys/socket.h>
19233#include <netinet/in.h>
19234
19235main()
19236{
19237 int passive, gaierr, inet4 = 0, inet6 = 0;
19238 struct addrinfo hints, *ai, *aitop;
19239 char straddr[INET6_ADDRSTRLEN], strport[16];
19240
19241 for (passive = 0; passive <= 1; passive++) {
19242 memset(&hints, 0, sizeof(hints));
19243 hints.ai_family = AF_UNSPEC;
19244 hints.ai_flags = passive ? AI_PASSIVE : 0;
19245 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019246 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019247 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19248 (void)gai_strerror(gaierr);
19249 goto bad;
19250 }
19251 for (ai = aitop; ai; ai = ai->ai_next) {
19252 if (ai->ai_addr == NULL ||
19253 ai->ai_addrlen == 0 ||
19254 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19255 straddr, sizeof(straddr), strport, sizeof(strport),
19256 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19257 goto bad;
19258 }
19259 switch (ai->ai_family) {
19260 case AF_INET:
19261 if (strcmp(strport, "54321") != 0) {
19262 goto bad;
19263 }
19264 if (passive) {
19265 if (strcmp(straddr, "0.0.0.0") != 0) {
19266 goto bad;
19267 }
19268 } else {
19269 if (strcmp(straddr, "127.0.0.1") != 0) {
19270 goto bad;
19271 }
19272 }
19273 inet4++;
19274 break;
19275 case AF_INET6:
19276 if (strcmp(strport, "54321") != 0) {
19277 goto bad;
19278 }
19279 if (passive) {
19280 if (strcmp(straddr, "::") != 0) {
19281 goto bad;
19282 }
19283 } else {
19284 if (strcmp(straddr, "::1") != 0) {
19285 goto bad;
19286 }
19287 }
19288 inet6++;
19289 break;
19290 case AF_UNSPEC:
19291 goto bad;
19292 break;
19293 default:
19294 /* another family support? */
19295 break;
19296 }
19297 }
19298 }
19299
19300 if (!(inet4 == 0 || inet4 == 2))
19301 goto bad;
19302 if (!(inet6 == 0 || inet6 == 2))
19303 goto bad;
19304
19305 if (aitop)
19306 freeaddrinfo(aitop);
19307 exit(0);
19308
19309 bad:
19310 if (aitop)
19311 freeaddrinfo(aitop);
19312 exit(1);
19313}
19314
Martin v. Löwis11437992002-04-12 09:54:03 +000019315_ACEOF
19316rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019317if { (ac_try="$ac_link"
19318case "(($ac_try" in
19319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19320 *) ac_try_echo=$ac_try;;
19321esac
19322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19323 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 ac_status=$?
19325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19326 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000019327 { (case "(($ac_try" in
19328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19329 *) ac_try_echo=$ac_try;;
19330esac
19331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19332 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019333 ac_status=$?
19334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19335 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019336 { echo "$as_me:$LINENO: result: good" >&5
19337echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019338buggygetaddrinfo=no
19339else
Martin v. Löwis11437992002-04-12 09:54:03 +000019340 echo "$as_me: program exited with status $ac_status" >&5
19341echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019342sed 's/^/| /' conftest.$ac_ext >&5
19343
Martin v. Löwis11437992002-04-12 09:54:03 +000019344( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000019345{ echo "$as_me:$LINENO: result: buggy" >&5
19346echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019347buggygetaddrinfo=yes
19348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019349rm -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 +000019350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019351
19352
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019353else
Martin v. Löwis11437992002-04-12 09:54:03 +000019354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019355sed 's/^/| /' conftest.$ac_ext >&5
19356
Martin v. Löwis11437992002-04-12 09:54:03 +000019357
Martin v. Löwiseba40652007-08-30 20:10:57 +000019358{ echo "$as_me:$LINENO: result: no" >&5
19359echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019360buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019361
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019363
19364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019366
19367if test "$buggygetaddrinfo" = "yes"; then
19368 if test "$ipv6" = "yes"; then
19369 echo 'Fatal: You must get working getaddrinfo() function.'
19370 echo ' or you can specify "--disable-ipv6"'.
19371 exit 1
19372 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019373else
Martin v. Löwis11437992002-04-12 09:54:03 +000019374
19375cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019376#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019377_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019378
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019379fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019380
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019381for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019382do
Martin v. Löwis11437992002-04-12 09:54:03 +000019383as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000019384{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19385echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19386if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019387 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019388else
Martin v. Löwis11437992002-04-12 09:54:03 +000019389 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019390/* confdefs.h. */
19391_ACEOF
19392cat confdefs.h >>conftest.$ac_ext
19393cat >>conftest.$ac_ext <<_ACEOF
19394/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019395/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19396 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19397#define $ac_func innocuous_$ac_func
19398
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019399/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019400 which can conflict with char $ac_func (); below.
19401 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019402 <limits.h> exists even on freestanding compilers. */
19403
19404#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019405# include <limits.h>
19406#else
19407# include <assert.h>
19408#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019409
19410#undef $ac_func
19411
Martin v. Löwiseba40652007-08-30 20:10:57 +000019412/* Override any GCC internal prototype to avoid an error.
19413 Use char because int might match the return type of a GCC
19414 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019415#ifdef __cplusplus
19416extern "C"
19417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019418char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019419/* The GNU C library defines this for functions which it implements
19420 to always fail with ENOSYS. Some functions are actually named
19421 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019422#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019423choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019424#endif
19425
Skip Montanaro6dead952003-09-25 14:50:04 +000019426int
19427main ()
19428{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019429return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019430 ;
19431 return 0;
19432}
19433_ACEOF
19434rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019435if { (ac_try="$ac_link"
19436case "(($ac_try" in
19437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19438 *) ac_try_echo=$ac_try;;
19439esac
19440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19441 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019443 grep -v '^ *+' conftest.er1 >conftest.err
19444 rm -f conftest.er1
19445 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019447 (exit $ac_status); } && {
19448 test -z "$ac_c_werror_flag" ||
19449 test ! -s conftest.err
19450 } && test -s conftest$ac_exeext &&
19451 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019452 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019453else
Martin v. Löwis11437992002-04-12 09:54:03 +000019454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019455sed 's/^/| /' conftest.$ac_ext >&5
19456
Martin v. Löwiseba40652007-08-30 20:10:57 +000019457 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019459
19460rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019461 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019463ac_res=`eval echo '${'$as_ac_var'}'`
19464 { echo "$as_me:$LINENO: result: $ac_res" >&5
19465echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019466if test `eval echo '${'$as_ac_var'}'` = yes; then
19467 cat >>confdefs.h <<_ACEOF
19468#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19469_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019470
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019471fi
19472done
19473
Michael W. Hudson54241132001-12-07 15:38:26 +000019474
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019475# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019476{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19477echo $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 +000019478if test "${ac_cv_header_time+set}" = set; then
19479 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019480else
Martin v. Löwis11437992002-04-12 09:54:03 +000019481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019482/* confdefs.h. */
19483_ACEOF
19484cat confdefs.h >>conftest.$ac_ext
19485cat >>conftest.$ac_ext <<_ACEOF
19486/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019487#include <sys/types.h>
19488#include <sys/time.h>
19489#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019490
Martin v. Löwis11437992002-04-12 09:54:03 +000019491int
19492main ()
19493{
19494if ((struct tm *) 0)
19495return 0;
19496 ;
19497 return 0;
19498}
19499_ACEOF
19500rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019501if { (ac_try="$ac_compile"
19502case "(($ac_try" in
19503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19504 *) ac_try_echo=$ac_try;;
19505esac
19506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019509 grep -v '^ *+' conftest.er1 >conftest.err
19510 rm -f conftest.er1
19511 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019513 (exit $ac_status); } && {
19514 test -z "$ac_c_werror_flag" ||
19515 test ! -s conftest.err
19516 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019517 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019518else
Martin v. Löwis11437992002-04-12 09:54:03 +000019519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019520sed 's/^/| /' conftest.$ac_ext >&5
19521
Martin v. Löwiseba40652007-08-30 20:10:57 +000019522 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019524
19525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019527{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19528echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019529if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019530
19531cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019532#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019533_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019534
19535fi
19536
Martin v. Löwiseba40652007-08-30 20:10:57 +000019537{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19538echo $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 +000019539if test "${ac_cv_struct_tm+set}" = set; then
19540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019541else
Martin v. Löwis11437992002-04-12 09:54:03 +000019542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019543/* confdefs.h. */
19544_ACEOF
19545cat confdefs.h >>conftest.$ac_ext
19546cat >>conftest.$ac_ext <<_ACEOF
19547/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019548#include <sys/types.h>
19549#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019550
Martin v. Löwis11437992002-04-12 09:54:03 +000019551int
19552main ()
19553{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019554struct tm tm;
19555 int *p = &tm.tm_sec;
19556 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019557 ;
19558 return 0;
19559}
19560_ACEOF
19561rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019562if { (ac_try="$ac_compile"
19563case "(($ac_try" in
19564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19565 *) ac_try_echo=$ac_try;;
19566esac
19567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019570 grep -v '^ *+' conftest.er1 >conftest.err
19571 rm -f conftest.er1
19572 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019574 (exit $ac_status); } && {
19575 test -z "$ac_c_werror_flag" ||
19576 test ! -s conftest.err
19577 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019578 ac_cv_struct_tm=time.h
19579else
Martin v. Löwis11437992002-04-12 09:54:03 +000019580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019581sed 's/^/| /' conftest.$ac_ext >&5
19582
Martin v. Löwiseba40652007-08-30 20:10:57 +000019583 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019585
19586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019588{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19589echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019590if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019591
19592cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019593#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019594_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019595
19596fi
19597
Martin v. Löwiseba40652007-08-30 20:10:57 +000019598{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19599echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019600if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19601 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019602else
Martin v. Löwis11437992002-04-12 09:54:03 +000019603 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019604/* confdefs.h. */
19605_ACEOF
19606cat confdefs.h >>conftest.$ac_ext
19607cat >>conftest.$ac_ext <<_ACEOF
19608/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019609#include <sys/types.h>
19610#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019611
19612
Martin v. Löwis11437992002-04-12 09:54:03 +000019613int
19614main ()
19615{
19616static struct tm ac_aggr;
19617if (ac_aggr.tm_zone)
19618return 0;
19619 ;
19620 return 0;
19621}
19622_ACEOF
19623rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019624if { (ac_try="$ac_compile"
19625case "(($ac_try" in
19626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19627 *) ac_try_echo=$ac_try;;
19628esac
19629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019632 grep -v '^ *+' conftest.er1 >conftest.err
19633 rm -f conftest.er1
19634 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019636 (exit $ac_status); } && {
19637 test -z "$ac_c_werror_flag" ||
19638 test ! -s conftest.err
19639 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019640 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019641else
Martin v. Löwis11437992002-04-12 09:54:03 +000019642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019643sed 's/^/| /' conftest.$ac_ext >&5
19644
Martin v. Löwiseba40652007-08-30 20:10:57 +000019645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019646/* confdefs.h. */
19647_ACEOF
19648cat confdefs.h >>conftest.$ac_ext
19649cat >>conftest.$ac_ext <<_ACEOF
19650/* end confdefs.h. */
19651#include <sys/types.h>
19652#include <$ac_cv_struct_tm>
19653
19654
19655int
19656main ()
19657{
19658static struct tm ac_aggr;
19659if (sizeof ac_aggr.tm_zone)
19660return 0;
19661 ;
19662 return 0;
19663}
19664_ACEOF
19665rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019666if { (ac_try="$ac_compile"
19667case "(($ac_try" in
19668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19669 *) ac_try_echo=$ac_try;;
19670esac
19671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19672 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019674 grep -v '^ *+' conftest.er1 >conftest.err
19675 rm -f conftest.er1
19676 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019678 (exit $ac_status); } && {
19679 test -z "$ac_c_werror_flag" ||
19680 test ! -s conftest.err
19681 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019682 ac_cv_member_struct_tm_tm_zone=yes
19683else
19684 echo "$as_me: failed program was:" >&5
19685sed 's/^/| /' conftest.$ac_ext >&5
19686
Martin v. Löwiseba40652007-08-30 20:10:57 +000019687 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019689
19690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019692
19693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019695{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19696echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019697if test $ac_cv_member_struct_tm_tm_zone = yes; then
19698
19699cat >>confdefs.h <<_ACEOF
19700#define HAVE_STRUCT_TM_TM_ZONE 1
19701_ACEOF
19702
19703
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019704fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019705
Martin v. Löwis11437992002-04-12 09:54:03 +000019706if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19707
19708cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019709#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019710_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019711
19712else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019713 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19714echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19715if test "${ac_cv_have_decl_tzname+set}" = set; then
19716 echo $ECHO_N "(cached) $ECHO_C" >&6
19717else
19718 cat >conftest.$ac_ext <<_ACEOF
19719/* confdefs.h. */
19720_ACEOF
19721cat confdefs.h >>conftest.$ac_ext
19722cat >>conftest.$ac_ext <<_ACEOF
19723/* end confdefs.h. */
19724#include <time.h>
19725
19726int
19727main ()
19728{
19729#ifndef tzname
19730 (void) tzname;
19731#endif
19732
19733 ;
19734 return 0;
19735}
19736_ACEOF
19737rm -f conftest.$ac_objext
19738if { (ac_try="$ac_compile"
19739case "(($ac_try" in
19740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19741 *) ac_try_echo=$ac_try;;
19742esac
19743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19744 (eval "$ac_compile") 2>conftest.er1
19745 ac_status=$?
19746 grep -v '^ *+' conftest.er1 >conftest.err
19747 rm -f conftest.er1
19748 cat conftest.err >&5
19749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19750 (exit $ac_status); } && {
19751 test -z "$ac_c_werror_flag" ||
19752 test ! -s conftest.err
19753 } && test -s conftest.$ac_objext; then
19754 ac_cv_have_decl_tzname=yes
19755else
19756 echo "$as_me: failed program was:" >&5
19757sed 's/^/| /' conftest.$ac_ext >&5
19758
19759 ac_cv_have_decl_tzname=no
19760fi
19761
19762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19763fi
19764{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19765echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19766if test $ac_cv_have_decl_tzname = yes; then
19767
19768cat >>confdefs.h <<_ACEOF
19769#define HAVE_DECL_TZNAME 1
19770_ACEOF
19771
19772
19773else
19774 cat >>confdefs.h <<_ACEOF
19775#define HAVE_DECL_TZNAME 0
19776_ACEOF
19777
19778
19779fi
19780
19781
19782 { echo "$as_me:$LINENO: checking for tzname" >&5
19783echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019784if test "${ac_cv_var_tzname+set}" = set; then
19785 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019786else
Martin v. Löwis11437992002-04-12 09:54:03 +000019787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019788/* confdefs.h. */
19789_ACEOF
19790cat confdefs.h >>conftest.$ac_ext
19791cat >>conftest.$ac_ext <<_ACEOF
19792/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019793#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019794#if !HAVE_DECL_TZNAME
19795extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019797
Martin v. Löwis11437992002-04-12 09:54:03 +000019798int
19799main ()
19800{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019801return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019802 ;
19803 return 0;
19804}
19805_ACEOF
19806rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019807if { (ac_try="$ac_link"
19808case "(($ac_try" in
19809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19810 *) ac_try_echo=$ac_try;;
19811esac
19812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19813 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019815 grep -v '^ *+' conftest.er1 >conftest.err
19816 rm -f conftest.er1
19817 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019819 (exit $ac_status); } && {
19820 test -z "$ac_c_werror_flag" ||
19821 test ! -s conftest.err
19822 } && test -s conftest$ac_exeext &&
19823 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019824 ac_cv_var_tzname=yes
19825else
Martin v. Löwis11437992002-04-12 09:54:03 +000019826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019827sed 's/^/| /' conftest.$ac_ext >&5
19828
Martin v. Löwiseba40652007-08-30 20:10:57 +000019829 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019831
19832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019833 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019835{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19836echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019837 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019838
19839cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019840#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019841_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019842
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019843 fi
19844fi
19845
Martin v. Löwiseba40652007-08-30 20:10:57 +000019846{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19847echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019848if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19849 echo $ECHO_N "(cached) $ECHO_C" >&6
19850else
19851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019852/* confdefs.h. */
19853_ACEOF
19854cat confdefs.h >>conftest.$ac_ext
19855cat >>conftest.$ac_ext <<_ACEOF
19856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019857$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019858int
19859main ()
19860{
19861static struct stat ac_aggr;
19862if (ac_aggr.st_rdev)
19863return 0;
19864 ;
19865 return 0;
19866}
19867_ACEOF
19868rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019869if { (ac_try="$ac_compile"
19870case "(($ac_try" in
19871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19872 *) ac_try_echo=$ac_try;;
19873esac
19874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19875 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019877 grep -v '^ *+' conftest.er1 >conftest.err
19878 rm -f conftest.er1
19879 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019881 (exit $ac_status); } && {
19882 test -z "$ac_c_werror_flag" ||
19883 test ! -s conftest.err
19884 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019885 ac_cv_member_struct_stat_st_rdev=yes
19886else
19887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019888sed 's/^/| /' conftest.$ac_ext >&5
19889
Martin v. Löwiseba40652007-08-30 20:10:57 +000019890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019891/* confdefs.h. */
19892_ACEOF
19893cat confdefs.h >>conftest.$ac_ext
19894cat >>conftest.$ac_ext <<_ACEOF
19895/* end confdefs.h. */
19896$ac_includes_default
19897int
19898main ()
19899{
19900static struct stat ac_aggr;
19901if (sizeof ac_aggr.st_rdev)
19902return 0;
19903 ;
19904 return 0;
19905}
19906_ACEOF
19907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019908if { (ac_try="$ac_compile"
19909case "(($ac_try" in
19910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19911 *) ac_try_echo=$ac_try;;
19912esac
19913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19914 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019916 grep -v '^ *+' conftest.er1 >conftest.err
19917 rm -f conftest.er1
19918 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019920 (exit $ac_status); } && {
19921 test -z "$ac_c_werror_flag" ||
19922 test ! -s conftest.err
19923 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019924 ac_cv_member_struct_stat_st_rdev=yes
19925else
19926 echo "$as_me: failed program was:" >&5
19927sed 's/^/| /' conftest.$ac_ext >&5
19928
Martin v. Löwiseba40652007-08-30 20:10:57 +000019929 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019931
19932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019934
19935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019937{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19938echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019939if test $ac_cv_member_struct_stat_st_rdev = yes; then
19940
19941cat >>confdefs.h <<_ACEOF
19942#define HAVE_STRUCT_STAT_ST_RDEV 1
19943_ACEOF
19944
19945
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019946fi
19947
Martin v. Löwiseba40652007-08-30 20:10:57 +000019948{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19949echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019950if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19951 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019952else
Martin v. Löwis11437992002-04-12 09:54:03 +000019953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019954/* confdefs.h. */
19955_ACEOF
19956cat confdefs.h >>conftest.$ac_ext
19957cat >>conftest.$ac_ext <<_ACEOF
19958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019959$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019960int
19961main ()
19962{
19963static struct stat ac_aggr;
19964if (ac_aggr.st_blksize)
19965return 0;
19966 ;
19967 return 0;
19968}
19969_ACEOF
19970rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019971if { (ac_try="$ac_compile"
19972case "(($ac_try" in
19973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19974 *) ac_try_echo=$ac_try;;
19975esac
19976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019979 grep -v '^ *+' conftest.er1 >conftest.err
19980 rm -f conftest.er1
19981 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019983 (exit $ac_status); } && {
19984 test -z "$ac_c_werror_flag" ||
19985 test ! -s conftest.err
19986 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019987 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019988else
Martin v. Löwis11437992002-04-12 09:54:03 +000019989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019990sed 's/^/| /' conftest.$ac_ext >&5
19991
Martin v. Löwiseba40652007-08-30 20:10:57 +000019992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019993/* confdefs.h. */
19994_ACEOF
19995cat confdefs.h >>conftest.$ac_ext
19996cat >>conftest.$ac_ext <<_ACEOF
19997/* end confdefs.h. */
19998$ac_includes_default
19999int
20000main ()
20001{
20002static struct stat ac_aggr;
20003if (sizeof ac_aggr.st_blksize)
20004return 0;
20005 ;
20006 return 0;
20007}
20008_ACEOF
20009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020010if { (ac_try="$ac_compile"
20011case "(($ac_try" in
20012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20013 *) ac_try_echo=$ac_try;;
20014esac
20015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20016 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020018 grep -v '^ *+' conftest.er1 >conftest.err
20019 rm -f conftest.er1
20020 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020022 (exit $ac_status); } && {
20023 test -z "$ac_c_werror_flag" ||
20024 test ! -s conftest.err
20025 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020026 ac_cv_member_struct_stat_st_blksize=yes
20027else
20028 echo "$as_me: failed program was:" >&5
20029sed 's/^/| /' conftest.$ac_ext >&5
20030
Martin v. Löwiseba40652007-08-30 20:10:57 +000020031 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020033
20034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020036
20037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020039{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20040echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020041if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020042
Martin v. Löwis11437992002-04-12 09:54:03 +000020043cat >>confdefs.h <<_ACEOF
20044#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20045_ACEOF
20046
20047
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020048fi
20049
Martin v. Löwiseba40652007-08-30 20:10:57 +000020050{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20051echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020052if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
20053 echo $ECHO_N "(cached) $ECHO_C" >&6
20054else
20055 cat >conftest.$ac_ext <<_ACEOF
20056/* confdefs.h. */
20057_ACEOF
20058cat confdefs.h >>conftest.$ac_ext
20059cat >>conftest.$ac_ext <<_ACEOF
20060/* end confdefs.h. */
20061$ac_includes_default
20062int
20063main ()
20064{
20065static struct stat ac_aggr;
20066if (ac_aggr.st_flags)
20067return 0;
20068 ;
20069 return 0;
20070}
20071_ACEOF
20072rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020073if { (ac_try="$ac_compile"
20074case "(($ac_try" in
20075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20076 *) ac_try_echo=$ac_try;;
20077esac
20078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20079 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020080 ac_status=$?
20081 grep -v '^ *+' conftest.er1 >conftest.err
20082 rm -f conftest.er1
20083 cat conftest.err >&5
20084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020085 (exit $ac_status); } && {
20086 test -z "$ac_c_werror_flag" ||
20087 test ! -s conftest.err
20088 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020089 ac_cv_member_struct_stat_st_flags=yes
20090else
20091 echo "$as_me: failed program was:" >&5
20092sed 's/^/| /' conftest.$ac_ext >&5
20093
Martin v. Löwiseba40652007-08-30 20:10:57 +000020094 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020095/* confdefs.h. */
20096_ACEOF
20097cat confdefs.h >>conftest.$ac_ext
20098cat >>conftest.$ac_ext <<_ACEOF
20099/* end confdefs.h. */
20100$ac_includes_default
20101int
20102main ()
20103{
20104static struct stat ac_aggr;
20105if (sizeof ac_aggr.st_flags)
20106return 0;
20107 ;
20108 return 0;
20109}
20110_ACEOF
20111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020112if { (ac_try="$ac_compile"
20113case "(($ac_try" in
20114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20115 *) ac_try_echo=$ac_try;;
20116esac
20117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20118 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020119 ac_status=$?
20120 grep -v '^ *+' conftest.er1 >conftest.err
20121 rm -f conftest.er1
20122 cat conftest.err >&5
20123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020124 (exit $ac_status); } && {
20125 test -z "$ac_c_werror_flag" ||
20126 test ! -s conftest.err
20127 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020128 ac_cv_member_struct_stat_st_flags=yes
20129else
20130 echo "$as_me: failed program was:" >&5
20131sed 's/^/| /' conftest.$ac_ext >&5
20132
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020135
20136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020138
20139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020141{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20142echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020143if test $ac_cv_member_struct_stat_st_flags = yes; then
20144
20145cat >>confdefs.h <<_ACEOF
20146#define HAVE_STRUCT_STAT_ST_FLAGS 1
20147_ACEOF
20148
20149
20150fi
20151
Martin v. Löwiseba40652007-08-30 20:10:57 +000020152{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20153echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020154if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
20155 echo $ECHO_N "(cached) $ECHO_C" >&6
20156else
20157 cat >conftest.$ac_ext <<_ACEOF
20158/* confdefs.h. */
20159_ACEOF
20160cat confdefs.h >>conftest.$ac_ext
20161cat >>conftest.$ac_ext <<_ACEOF
20162/* end confdefs.h. */
20163$ac_includes_default
20164int
20165main ()
20166{
20167static struct stat ac_aggr;
20168if (ac_aggr.st_gen)
20169return 0;
20170 ;
20171 return 0;
20172}
20173_ACEOF
20174rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020175if { (ac_try="$ac_compile"
20176case "(($ac_try" in
20177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20178 *) ac_try_echo=$ac_try;;
20179esac
20180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20181 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020182 ac_status=$?
20183 grep -v '^ *+' conftest.er1 >conftest.err
20184 rm -f conftest.er1
20185 cat conftest.err >&5
20186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020187 (exit $ac_status); } && {
20188 test -z "$ac_c_werror_flag" ||
20189 test ! -s conftest.err
20190 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020191 ac_cv_member_struct_stat_st_gen=yes
20192else
20193 echo "$as_me: failed program was:" >&5
20194sed 's/^/| /' conftest.$ac_ext >&5
20195
Martin v. Löwiseba40652007-08-30 20:10:57 +000020196 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020197/* confdefs.h. */
20198_ACEOF
20199cat confdefs.h >>conftest.$ac_ext
20200cat >>conftest.$ac_ext <<_ACEOF
20201/* end confdefs.h. */
20202$ac_includes_default
20203int
20204main ()
20205{
20206static struct stat ac_aggr;
20207if (sizeof ac_aggr.st_gen)
20208return 0;
20209 ;
20210 return 0;
20211}
20212_ACEOF
20213rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020214if { (ac_try="$ac_compile"
20215case "(($ac_try" in
20216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20217 *) ac_try_echo=$ac_try;;
20218esac
20219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20220 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020221 ac_status=$?
20222 grep -v '^ *+' conftest.er1 >conftest.err
20223 rm -f conftest.er1
20224 cat conftest.err >&5
20225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020226 (exit $ac_status); } && {
20227 test -z "$ac_c_werror_flag" ||
20228 test ! -s conftest.err
20229 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020230 ac_cv_member_struct_stat_st_gen=yes
20231else
20232 echo "$as_me: failed program was:" >&5
20233sed 's/^/| /' conftest.$ac_ext >&5
20234
Martin v. Löwiseba40652007-08-30 20:10:57 +000020235 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020237
20238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020240
20241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020243{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20244echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020245if test $ac_cv_member_struct_stat_st_gen = yes; then
20246
20247cat >>confdefs.h <<_ACEOF
20248#define HAVE_STRUCT_STAT_ST_GEN 1
20249_ACEOF
20250
20251
20252fi
20253
Martin v. Löwiseba40652007-08-30 20:10:57 +000020254{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20255echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020256if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
20257 echo $ECHO_N "(cached) $ECHO_C" >&6
20258else
20259 cat >conftest.$ac_ext <<_ACEOF
20260/* confdefs.h. */
20261_ACEOF
20262cat confdefs.h >>conftest.$ac_ext
20263cat >>conftest.$ac_ext <<_ACEOF
20264/* end confdefs.h. */
20265$ac_includes_default
20266int
20267main ()
20268{
20269static struct stat ac_aggr;
20270if (ac_aggr.st_birthtime)
20271return 0;
20272 ;
20273 return 0;
20274}
20275_ACEOF
20276rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020277if { (ac_try="$ac_compile"
20278case "(($ac_try" in
20279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20280 *) ac_try_echo=$ac_try;;
20281esac
20282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20283 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020284 ac_status=$?
20285 grep -v '^ *+' conftest.er1 >conftest.err
20286 rm -f conftest.er1
20287 cat conftest.err >&5
20288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020289 (exit $ac_status); } && {
20290 test -z "$ac_c_werror_flag" ||
20291 test ! -s conftest.err
20292 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020293 ac_cv_member_struct_stat_st_birthtime=yes
20294else
20295 echo "$as_me: failed program was:" >&5
20296sed 's/^/| /' conftest.$ac_ext >&5
20297
Martin v. Löwiseba40652007-08-30 20:10:57 +000020298 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020299/* confdefs.h. */
20300_ACEOF
20301cat confdefs.h >>conftest.$ac_ext
20302cat >>conftest.$ac_ext <<_ACEOF
20303/* end confdefs.h. */
20304$ac_includes_default
20305int
20306main ()
20307{
20308static struct stat ac_aggr;
20309if (sizeof ac_aggr.st_birthtime)
20310return 0;
20311 ;
20312 return 0;
20313}
20314_ACEOF
20315rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020316if { (ac_try="$ac_compile"
20317case "(($ac_try" in
20318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20319 *) ac_try_echo=$ac_try;;
20320esac
20321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020323 ac_status=$?
20324 grep -v '^ *+' conftest.er1 >conftest.err
20325 rm -f conftest.er1
20326 cat conftest.err >&5
20327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020328 (exit $ac_status); } && {
20329 test -z "$ac_c_werror_flag" ||
20330 test ! -s conftest.err
20331 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020332 ac_cv_member_struct_stat_st_birthtime=yes
20333else
20334 echo "$as_me: failed program was:" >&5
20335sed 's/^/| /' conftest.$ac_ext >&5
20336
Martin v. Löwiseba40652007-08-30 20:10:57 +000020337 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020339
20340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020342
20343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020345{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20346echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020347if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20348
20349cat >>confdefs.h <<_ACEOF
20350#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20351_ACEOF
20352
20353
20354fi
20355
Martin v. Löwiseba40652007-08-30 20:10:57 +000020356{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20357echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020358if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20359 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020360else
Martin v. Löwis11437992002-04-12 09:54:03 +000020361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020362/* confdefs.h. */
20363_ACEOF
20364cat confdefs.h >>conftest.$ac_ext
20365cat >>conftest.$ac_ext <<_ACEOF
20366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020367$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020368int
20369main ()
20370{
20371static struct stat ac_aggr;
20372if (ac_aggr.st_blocks)
20373return 0;
20374 ;
20375 return 0;
20376}
20377_ACEOF
20378rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020379if { (ac_try="$ac_compile"
20380case "(($ac_try" in
20381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20382 *) ac_try_echo=$ac_try;;
20383esac
20384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020387 grep -v '^ *+' conftest.er1 >conftest.err
20388 rm -f conftest.er1
20389 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020391 (exit $ac_status); } && {
20392 test -z "$ac_c_werror_flag" ||
20393 test ! -s conftest.err
20394 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020395 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020396else
Martin v. Löwis11437992002-04-12 09:54:03 +000020397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020398sed 's/^/| /' conftest.$ac_ext >&5
20399
Martin v. Löwiseba40652007-08-30 20:10:57 +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. */
20406$ac_includes_default
20407int
20408main ()
20409{
20410static struct stat ac_aggr;
20411if (sizeof ac_aggr.st_blocks)
20412return 0;
20413 ;
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
Skip Montanaro6dead952003-09-25 14:50:04 +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
Skip Montanaro6dead952003-09-25 14:50:04 +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
Skip Montanaro6dead952003-09-25 14:50:04 +000020434 ac_cv_member_struct_stat_st_blocks=yes
20435else
20436 echo "$as_me: failed program was:" >&5
20437sed 's/^/| /' conftest.$ac_ext >&5
20438
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020441
20442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020444
20445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020447{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20448echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020449if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020450
Martin v. Löwis11437992002-04-12 09:54:03 +000020451cat >>confdefs.h <<_ACEOF
20452#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20453_ACEOF
20454
20455
20456cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020457#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020458_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020459
20460else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020461 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020462 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020463 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20464 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020465esac
20466
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020467fi
20468
Michael W. Hudson54241132001-12-07 15:38:26 +000020469
Martin v. Löwis11437992002-04-12 09:54:03 +000020470
Martin v. Löwiseba40652007-08-30 20:10:57 +000020471{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20472echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020473if test "${ac_cv_header_time_altzone+set}" = set; then
20474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020475else
Martin v. Löwis11437992002-04-12 09:54:03 +000020476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020477/* confdefs.h. */
20478_ACEOF
20479cat confdefs.h >>conftest.$ac_ext
20480cat >>conftest.$ac_ext <<_ACEOF
20481/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020482#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020483int
20484main ()
20485{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020486return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020487 ;
20488 return 0;
20489}
20490_ACEOF
20491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020492if { (ac_try="$ac_compile"
20493case "(($ac_try" in
20494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20495 *) ac_try_echo=$ac_try;;
20496esac
20497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020500 grep -v '^ *+' conftest.er1 >conftest.err
20501 rm -f conftest.er1
20502 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020504 (exit $ac_status); } && {
20505 test -z "$ac_c_werror_flag" ||
20506 test ! -s conftest.err
20507 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020508 ac_cv_header_time_altzone=yes
20509else
Martin v. Löwis11437992002-04-12 09:54:03 +000020510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020511sed 's/^/| /' conftest.$ac_ext >&5
20512
Martin v. Löwiseba40652007-08-30 20:10:57 +000020513 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020514fi
20515
Martin v. Löwiseba40652007-08-30 20:10:57 +000020516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20517fi
20518
20519{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20520echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020521if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020522
20523cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020524#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020525_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020526
20527fi
20528
Guido van Rossumda88dad1995-01-26 00:46:29 +000020529was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020530{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20531echo $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 +000020532cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020533/* confdefs.h. */
20534_ACEOF
20535cat confdefs.h >>conftest.$ac_ext
20536cat >>conftest.$ac_ext <<_ACEOF
20537/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020538
20539#include <sys/types.h>
20540#include <sys/select.h>
20541#include <sys/time.h>
20542
Martin v. Löwis11437992002-04-12 09:54:03 +000020543int
20544main ()
20545{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020546;
Martin v. Löwis11437992002-04-12 09:54:03 +000020547 ;
20548 return 0;
20549}
20550_ACEOF
20551rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020552if { (ac_try="$ac_compile"
20553case "(($ac_try" in
20554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20555 *) ac_try_echo=$ac_try;;
20556esac
20557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020560 grep -v '^ *+' conftest.er1 >conftest.err
20561 rm -f conftest.er1
20562 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020564 (exit $ac_status); } && {
20565 test -z "$ac_c_werror_flag" ||
20566 test ! -s conftest.err
20567 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020568
20569
20570cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020571#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020572_ACEOF
20573
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020574 was_it_defined=yes
20575
Guido van Rossumf78abae1997-01-21 22:02:36 +000020576else
Martin v. Löwis11437992002-04-12 09:54:03 +000020577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020578sed 's/^/| /' conftest.$ac_ext >&5
20579
Brett Cannon19fab762007-06-02 03:02:29 +000020580
Martin v. Löwiseba40652007-08-30 20:10:57 +000020581fi
20582
20583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20584{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20585echo "${ECHO_T}$was_it_defined" >&6; }
20586
20587{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20588echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020589if test "${ac_cv_struct_addrinfo+set}" = set; then
20590 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020591else
Martin v. Löwis11437992002-04-12 09:54:03 +000020592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020593/* confdefs.h. */
20594_ACEOF
20595cat confdefs.h >>conftest.$ac_ext
20596cat >>conftest.$ac_ext <<_ACEOF
20597/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020598
20599# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020600int
20601main ()
20602{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020603struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020604 ;
20605 return 0;
20606}
20607_ACEOF
20608rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020609if { (ac_try="$ac_compile"
20610case "(($ac_try" in
20611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20612 *) ac_try_echo=$ac_try;;
20613esac
20614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020617 grep -v '^ *+' conftest.er1 >conftest.err
20618 rm -f conftest.er1
20619 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020621 (exit $ac_status); } && {
20622 test -z "$ac_c_werror_flag" ||
20623 test ! -s conftest.err
20624 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020625 ac_cv_struct_addrinfo=yes
20626else
Martin v. Löwis11437992002-04-12 09:54:03 +000020627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020628sed 's/^/| /' conftest.$ac_ext >&5
20629
Martin v. Löwiseba40652007-08-30 20:10:57 +000020630 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020631fi
20632
Martin v. Löwiseba40652007-08-30 20:10:57 +000020633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20634fi
20635
20636{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20637echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020638if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020639
20640cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020641#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020642_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020643
20644fi
20645
Martin v. Löwiseba40652007-08-30 20:10:57 +000020646{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20647echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020648if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20649 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020650else
Martin v. Löwis11437992002-04-12 09:54:03 +000020651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020652/* confdefs.h. */
20653_ACEOF
20654cat confdefs.h >>conftest.$ac_ext
20655cat >>conftest.$ac_ext <<_ACEOF
20656/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020657
20658# include <sys/types.h>
20659# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020660int
20661main ()
20662{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020663struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020664 ;
20665 return 0;
20666}
20667_ACEOF
20668rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020669if { (ac_try="$ac_compile"
20670case "(($ac_try" in
20671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20672 *) ac_try_echo=$ac_try;;
20673esac
20674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20675 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020677 grep -v '^ *+' conftest.er1 >conftest.err
20678 rm -f conftest.er1
20679 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020681 (exit $ac_status); } && {
20682 test -z "$ac_c_werror_flag" ||
20683 test ! -s conftest.err
20684 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020685 ac_cv_struct_sockaddr_storage=yes
20686else
Martin v. Löwis11437992002-04-12 09:54:03 +000020687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020688sed 's/^/| /' conftest.$ac_ext >&5
20689
Martin v. Löwiseba40652007-08-30 20:10:57 +000020690 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020691fi
20692
Martin v. Löwiseba40652007-08-30 20:10:57 +000020693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20694fi
20695
20696{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20697echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020698if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020699
20700cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020701#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020702_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020703
20704fi
20705
Guido van Rossum627b2d71993-12-24 10:39:16 +000020706# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020707
Michael W. Hudson54241132001-12-07 15:38:26 +000020708
Martin v. Löwiseba40652007-08-30 20:10:57 +000020709{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20710echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020711if test "${ac_cv_c_char_unsigned+set}" = set; then
20712 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020713else
Martin v. Löwis11437992002-04-12 09:54:03 +000020714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020715/* confdefs.h. */
20716_ACEOF
20717cat confdefs.h >>conftest.$ac_ext
20718cat >>conftest.$ac_ext <<_ACEOF
20719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020720$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020721int
20722main ()
20723{
20724static int test_array [1 - 2 * !(((char) -1) < 0)];
20725test_array [0] = 0
20726
20727 ;
20728 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020729}
Martin v. Löwis11437992002-04-12 09:54:03 +000020730_ACEOF
20731rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020732if { (ac_try="$ac_compile"
20733case "(($ac_try" in
20734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20735 *) ac_try_echo=$ac_try;;
20736esac
20737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020740 grep -v '^ *+' conftest.er1 >conftest.err
20741 rm -f conftest.er1
20742 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020744 (exit $ac_status); } && {
20745 test -z "$ac_c_werror_flag" ||
20746 test ! -s conftest.err
20747 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020748 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020749else
20750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020751sed 's/^/| /' conftest.$ac_ext >&5
20752
Martin v. Löwiseba40652007-08-30 20:10:57 +000020753 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020755
20756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020758{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20759echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020760if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020761 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020762#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020764
20765fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020766
Martin v. Löwiseba40652007-08-30 20:10:57 +000020767{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20768echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020769if test "${ac_cv_c_const+set}" = set; then
20770 echo $ECHO_N "(cached) $ECHO_C" >&6
20771else
20772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020773/* confdefs.h. */
20774_ACEOF
20775cat confdefs.h >>conftest.$ac_ext
20776cat >>conftest.$ac_ext <<_ACEOF
20777/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020778
Martin v. Löwis11437992002-04-12 09:54:03 +000020779int
20780main ()
20781{
20782/* FIXME: Include the comments suggested by Paul. */
20783#ifndef __cplusplus
20784 /* Ultrix mips cc rejects this. */
20785 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020786 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020787 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020788 char const *const *pcpcc;
20789 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020790 /* NEC SVR4.0.2 mips cc rejects this. */
20791 struct point {int x, y;};
20792 static struct point const zero = {0,0};
20793 /* AIX XL C 1.02.0.0 rejects this.
20794 It does not let you subtract one const X* pointer from another in
20795 an arm of an if-expression whose if-part is not a constant
20796 expression */
20797 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020798 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020799 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020800 ++pcpcc;
20801 ppc = (char**) pcpcc;
20802 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020803 { /* SCO 3.2v4 cc rejects this. */
20804 char *t;
20805 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020806
Martin v. Löwis11437992002-04-12 09:54:03 +000020807 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020808 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020809 }
20810 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20811 int x[] = {25, 17};
20812 const int *foo = &x[0];
20813 ++foo;
20814 }
20815 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20816 typedef const int *iptr;
20817 iptr p = 0;
20818 ++p;
20819 }
20820 { /* AIX XL C 1.02.0.0 rejects this saying
20821 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20822 struct s { int j; const int *ap[3]; };
20823 struct s *b; b->j = 5;
20824 }
20825 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20826 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020827 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020828 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020829 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020830#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020831
Martin v. Löwis11437992002-04-12 09:54:03 +000020832 ;
20833 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020834}
Martin v. Löwis11437992002-04-12 09:54:03 +000020835_ACEOF
20836rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020837if { (ac_try="$ac_compile"
20838case "(($ac_try" in
20839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20840 *) ac_try_echo=$ac_try;;
20841esac
20842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020845 grep -v '^ *+' conftest.er1 >conftest.err
20846 rm -f conftest.er1
20847 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020849 (exit $ac_status); } && {
20850 test -z "$ac_c_werror_flag" ||
20851 test ! -s conftest.err
20852 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020853 ac_cv_c_const=yes
20854else
Martin v. Löwis11437992002-04-12 09:54:03 +000020855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020856sed 's/^/| /' conftest.$ac_ext >&5
20857
Martin v. Löwiseba40652007-08-30 20:10:57 +000020858 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020860
20861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020863{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20864echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020865if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020866
20867cat >>confdefs.h <<\_ACEOF
20868#define const
20869_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020870
20871fi
20872
Michael W. Hudson54241132001-12-07 15:38:26 +000020873
Guido van Rossumda88dad1995-01-26 00:46:29 +000020874works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020875{ echo "$as_me:$LINENO: checking for working volatile" >&5
20876echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020877cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020878/* confdefs.h. */
20879_ACEOF
20880cat confdefs.h >>conftest.$ac_ext
20881cat >>conftest.$ac_ext <<_ACEOF
20882/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020883
Martin v. Löwis11437992002-04-12 09:54:03 +000020884int
20885main ()
20886{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020887volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020888 ;
20889 return 0;
20890}
20891_ACEOF
20892rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020893if { (ac_try="$ac_compile"
20894case "(($ac_try" in
20895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20896 *) ac_try_echo=$ac_try;;
20897esac
20898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20899 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020901 grep -v '^ *+' conftest.er1 >conftest.err
20902 rm -f conftest.er1
20903 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020905 (exit $ac_status); } && {
20906 test -z "$ac_c_werror_flag" ||
20907 test ! -s conftest.err
20908 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020909 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020910else
Martin v. Löwis11437992002-04-12 09:54:03 +000020911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020912sed 's/^/| /' conftest.$ac_ext >&5
20913
Martin v. Löwis11437992002-04-12 09:54:03 +000020914
20915cat >>confdefs.h <<\_ACEOF
20916#define volatile
20917_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020918
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020919
Guido van Rossum627b2d71993-12-24 10:39:16 +000020920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020921
20922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20923{ echo "$as_me:$LINENO: result: $works" >&5
20924echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020925
Guido van Rossumda88dad1995-01-26 00:46:29 +000020926works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020927{ echo "$as_me:$LINENO: checking for working signed char" >&5
20928echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020929cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020930/* confdefs.h. */
20931_ACEOF
20932cat confdefs.h >>conftest.$ac_ext
20933cat >>conftest.$ac_ext <<_ACEOF
20934/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020935
Martin v. Löwis11437992002-04-12 09:54:03 +000020936int
20937main ()
20938{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020939signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020940 ;
20941 return 0;
20942}
20943_ACEOF
20944rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020945if { (ac_try="$ac_compile"
20946case "(($ac_try" in
20947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20948 *) ac_try_echo=$ac_try;;
20949esac
20950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020953 grep -v '^ *+' conftest.er1 >conftest.err
20954 rm -f conftest.er1
20955 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020957 (exit $ac_status); } && {
20958 test -z "$ac_c_werror_flag" ||
20959 test ! -s conftest.err
20960 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020961 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020962else
Martin v. Löwis11437992002-04-12 09:54:03 +000020963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020964sed 's/^/| /' conftest.$ac_ext >&5
20965
Martin v. Löwis11437992002-04-12 09:54:03 +000020966
20967cat >>confdefs.h <<\_ACEOF
20968#define signed
20969_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020970
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020971
Guido van Rossum7f43da71994-08-01 12:15:30 +000020972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020973
20974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20975{ echo "$as_me:$LINENO: result: $works" >&5
20976echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020977
Guido van Rossumda88dad1995-01-26 00:46:29 +000020978have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020979{ echo "$as_me:$LINENO: checking for prototypes" >&5
20980echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020981cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020982/* confdefs.h. */
20983_ACEOF
20984cat confdefs.h >>conftest.$ac_ext
20985cat >>conftest.$ac_ext <<_ACEOF
20986/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020987int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020988int
20989main ()
20990{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020991return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020992 ;
20993 return 0;
20994}
20995_ACEOF
20996rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020997if { (ac_try="$ac_compile"
20998case "(($ac_try" in
20999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21000 *) ac_try_echo=$ac_try;;
21001esac
21002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21003 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021005 grep -v '^ *+' conftest.er1 >conftest.err
21006 rm -f conftest.er1
21007 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021009 (exit $ac_status); } && {
21010 test -z "$ac_c_werror_flag" ||
21011 test ! -s conftest.err
21012 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021013
21014
21015cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021016#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021017_ACEOF
21018
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021019 have_prototypes=yes
21020
Guido van Rossumf78abae1997-01-21 22:02:36 +000021021else
Martin v. Löwis11437992002-04-12 09:54:03 +000021022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021023sed 's/^/| /' conftest.$ac_ext >&5
21024
Martin v. Löwiseba40652007-08-30 20:10:57 +000021025
Guido van Rossum7f43da71994-08-01 12:15:30 +000021026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021027
21028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21029{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21030echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021031
Guido van Rossumda88dad1995-01-26 00:46:29 +000021032works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021033{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21034echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021036/* confdefs.h. */
21037_ACEOF
21038cat confdefs.h >>conftest.$ac_ext
21039cat >>conftest.$ac_ext <<_ACEOF
21040/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021041
21042#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021043int foo(int x, ...) {
21044 va_list va;
21045 va_start(va, x);
21046 va_arg(va, int);
21047 va_arg(va, char *);
21048 va_arg(va, double);
21049 return 0;
21050}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021051
Martin v. Löwis11437992002-04-12 09:54:03 +000021052int
21053main ()
21054{
Guido van Rossum90eea071996-08-30 20:58:57 +000021055return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021056 ;
21057 return 0;
21058}
21059_ACEOF
21060rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021061if { (ac_try="$ac_compile"
21062case "(($ac_try" in
21063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21064 *) ac_try_echo=$ac_try;;
21065esac
21066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021069 grep -v '^ *+' conftest.er1 >conftest.err
21070 rm -f conftest.er1
21071 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021073 (exit $ac_status); } && {
21074 test -z "$ac_c_werror_flag" ||
21075 test ! -s conftest.err
21076 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021077
21078
21079cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021080#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021081_ACEOF
21082
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021083 works=yes
21084
Guido van Rossumf78abae1997-01-21 22:02:36 +000021085else
Martin v. Löwis11437992002-04-12 09:54:03 +000021086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021087sed 's/^/| /' conftest.$ac_ext >&5
21088
Martin v. Löwiseba40652007-08-30 20:10:57 +000021089
Guido van Rossum627b2d71993-12-24 10:39:16 +000021090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021091
21092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21093{ echo "$as_me:$LINENO: result: $works" >&5
21094echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021095
Martin v. Löwisd6320502004-08-12 13:45:08 +000021096# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000021097{ echo "$as_me:$LINENO: checking for socketpair" >&5
21098echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021099cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021100/* confdefs.h. */
21101_ACEOF
21102cat confdefs.h >>conftest.$ac_ext
21103cat >>conftest.$ac_ext <<_ACEOF
21104/* end confdefs.h. */
21105
21106#include <sys/types.h>
21107#include <sys/socket.h>
21108
21109int
21110main ()
21111{
21112void *x=socketpair
21113 ;
21114 return 0;
21115}
21116_ACEOF
21117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021118if { (ac_try="$ac_compile"
21119case "(($ac_try" in
21120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21121 *) ac_try_echo=$ac_try;;
21122esac
21123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021126 grep -v '^ *+' conftest.er1 >conftest.err
21127 rm -f conftest.er1
21128 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021130 (exit $ac_status); } && {
21131 test -z "$ac_c_werror_flag" ||
21132 test ! -s conftest.err
21133 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021134
21135cat >>confdefs.h <<\_ACEOF
21136#define HAVE_SOCKETPAIR 1
21137_ACEOF
21138
Martin v. Löwiseba40652007-08-30 20:10:57 +000021139 { echo "$as_me:$LINENO: result: yes" >&5
21140echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021141else
21142 echo "$as_me: failed program was:" >&5
21143sed 's/^/| /' conftest.$ac_ext >&5
21144
Martin v. Löwiseba40652007-08-30 20:10:57 +000021145 { echo "$as_me:$LINENO: result: no" >&5
21146echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021147
21148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021149
21150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021151
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021152# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000021153{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21154echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021155cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021156/* confdefs.h. */
21157_ACEOF
21158cat confdefs.h >>conftest.$ac_ext
21159cat >>conftest.$ac_ext <<_ACEOF
21160/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021161#include <sys/types.h>
21162#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021163int
21164main ()
21165{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021166struct sockaddr x;
21167x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021168 ;
21169 return 0;
21170}
21171_ACEOF
21172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021173if { (ac_try="$ac_compile"
21174case "(($ac_try" in
21175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21176 *) ac_try_echo=$ac_try;;
21177esac
21178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021181 grep -v '^ *+' conftest.er1 >conftest.err
21182 rm -f conftest.er1
21183 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021185 (exit $ac_status); } && {
21186 test -z "$ac_c_werror_flag" ||
21187 test ! -s conftest.err
21188 } && test -s conftest.$ac_objext; then
21189 { echo "$as_me:$LINENO: result: yes" >&5
21190echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021191
21192cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021193#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021194_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021195
21196else
Martin v. Löwis11437992002-04-12 09:54:03 +000021197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021198sed 's/^/| /' conftest.$ac_ext >&5
21199
Martin v. Löwiseba40652007-08-30 20:10:57 +000021200 { echo "$as_me:$LINENO: result: no" >&5
21201echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021203
21204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021205
Guido van Rossumda88dad1995-01-26 00:46:29 +000021206va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021207{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21208echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021209cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021210/* confdefs.h. */
21211_ACEOF
21212cat confdefs.h >>conftest.$ac_ext
21213cat >>conftest.$ac_ext <<_ACEOF
21214/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021215
21216#ifdef HAVE_STDARG_PROTOTYPES
21217#include <stdarg.h>
21218#else
21219#include <varargs.h>
21220#endif
21221
Martin v. Löwis11437992002-04-12 09:54:03 +000021222int
21223main ()
21224{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021225va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021226 ;
21227 return 0;
21228}
21229_ACEOF
21230rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021231if { (ac_try="$ac_compile"
21232case "(($ac_try" in
21233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21234 *) ac_try_echo=$ac_try;;
21235esac
21236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21237 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021239 grep -v '^ *+' conftest.er1 >conftest.err
21240 rm -f conftest.er1
21241 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243 (exit $ac_status); } && {
21244 test -z "$ac_c_werror_flag" ||
21245 test ! -s conftest.err
21246 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021247 :
21248else
Martin v. Löwis11437992002-04-12 09:54:03 +000021249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021250sed 's/^/| /' conftest.$ac_ext >&5
21251
Martin v. Löwis11437992002-04-12 09:54:03 +000021252
21253
21254cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021255#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021256_ACEOF
21257
Guido van Rossumda88dad1995-01-26 00:46:29 +000021258 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021259
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021261
21262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21263{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21264echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021265
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021266# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021267
21268
21269
Martin v. Löwiseba40652007-08-30 20:10:57 +000021270{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21271echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021272if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21273 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021274else
Martin v. Löwis11437992002-04-12 09:54:03 +000021275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021276/* confdefs.h. */
21277_ACEOF
21278cat confdefs.h >>conftest.$ac_ext
21279cat >>conftest.$ac_ext <<_ACEOF
21280/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021281/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21282 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21283#define gethostbyname_r innocuous_gethostbyname_r
21284
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021285/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021286 which can conflict with char gethostbyname_r (); below.
21287 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021288 <limits.h> exists even on freestanding compilers. */
21289
21290#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021291# include <limits.h>
21292#else
21293# include <assert.h>
21294#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021295
21296#undef gethostbyname_r
21297
Martin v. Löwiseba40652007-08-30 20:10:57 +000021298/* Override any GCC internal prototype to avoid an error.
21299 Use char because int might match the return type of a GCC
21300 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021301#ifdef __cplusplus
21302extern "C"
21303#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021304char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021305/* The GNU C library defines this for functions which it implements
21306 to always fail with ENOSYS. Some functions are actually named
21307 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021308#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021309choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021310#endif
21311
Skip Montanaro6dead952003-09-25 14:50:04 +000021312int
21313main ()
21314{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021315return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021316 ;
21317 return 0;
21318}
21319_ACEOF
21320rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021321if { (ac_try="$ac_link"
21322case "(($ac_try" in
21323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21324 *) ac_try_echo=$ac_try;;
21325esac
21326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21327 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021329 grep -v '^ *+' conftest.er1 >conftest.err
21330 rm -f conftest.er1
21331 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021333 (exit $ac_status); } && {
21334 test -z "$ac_c_werror_flag" ||
21335 test ! -s conftest.err
21336 } && test -s conftest$ac_exeext &&
21337 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021338 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021339else
Martin v. Löwis11437992002-04-12 09:54:03 +000021340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021341sed 's/^/| /' conftest.$ac_ext >&5
21342
Martin v. Löwiseba40652007-08-30 20:10:57 +000021343 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021345
21346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021347 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021349{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21350echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021351if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021352
Martin v. Löwis11437992002-04-12 09:54:03 +000021353 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021354#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021355_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021356
Martin v. Löwiseba40652007-08-30 20:10:57 +000021357 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21358echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021359 OLD_CFLAGS=$CFLAGS
21360 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021362/* confdefs.h. */
21363_ACEOF
21364cat confdefs.h >>conftest.$ac_ext
21365cat >>conftest.$ac_ext <<_ACEOF
21366/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021367
21368# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021369
Martin v. Löwis11437992002-04-12 09:54:03 +000021370int
21371main ()
21372{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021373
21374 char *name;
21375 struct hostent *he, *res;
21376 char buffer[2048];
21377 int buflen = 2048;
21378 int h_errnop;
21379
21380 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021381
21382 ;
21383 return 0;
21384}
21385_ACEOF
21386rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021387if { (ac_try="$ac_compile"
21388case "(($ac_try" in
21389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21390 *) ac_try_echo=$ac_try;;
21391esac
21392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21393 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021395 grep -v '^ *+' conftest.er1 >conftest.err
21396 rm -f conftest.er1
21397 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021399 (exit $ac_status); } && {
21400 test -z "$ac_c_werror_flag" ||
21401 test ! -s conftest.err
21402 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021403
21404 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021405#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021406_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021407
Martin v. Löwis11437992002-04-12 09:54:03 +000021408
21409cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021410#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021411_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021412
Martin v. Löwiseba40652007-08-30 20:10:57 +000021413 { echo "$as_me:$LINENO: result: yes" >&5
21414echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021415
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021416else
Martin v. Löwis11437992002-04-12 09:54:03 +000021417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021418sed 's/^/| /' conftest.$ac_ext >&5
21419
Martin v. Löwis11437992002-04-12 09:54:03 +000021420
Martin v. Löwiseba40652007-08-30 20:10:57 +000021421 { echo "$as_me:$LINENO: result: no" >&5
21422echo "${ECHO_T}no" >&6; }
21423 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21424echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021426/* confdefs.h. */
21427_ACEOF
21428cat confdefs.h >>conftest.$ac_ext
21429cat >>conftest.$ac_ext <<_ACEOF
21430/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021431
21432# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021433
Martin v. Löwis11437992002-04-12 09:54:03 +000021434int
21435main ()
21436{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021437
21438 char *name;
21439 struct hostent *he;
21440 char buffer[2048];
21441 int buflen = 2048;
21442 int h_errnop;
21443
21444 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021445
21446 ;
21447 return 0;
21448}
21449_ACEOF
21450rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021451if { (ac_try="$ac_compile"
21452case "(($ac_try" in
21453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21454 *) ac_try_echo=$ac_try;;
21455esac
21456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021459 grep -v '^ *+' conftest.er1 >conftest.err
21460 rm -f conftest.er1
21461 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021463 (exit $ac_status); } && {
21464 test -z "$ac_c_werror_flag" ||
21465 test ! -s conftest.err
21466 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021467
21468 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021469#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021470_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021471
Martin v. Löwis11437992002-04-12 09:54:03 +000021472
21473cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021474#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021475_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021476
Martin v. Löwiseba40652007-08-30 20:10:57 +000021477 { echo "$as_me:$LINENO: result: yes" >&5
21478echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021480else
Martin v. Löwis11437992002-04-12 09:54:03 +000021481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021482sed 's/^/| /' conftest.$ac_ext >&5
21483
Martin v. Löwis11437992002-04-12 09:54:03 +000021484
Martin v. Löwiseba40652007-08-30 20:10:57 +000021485 { echo "$as_me:$LINENO: result: no" >&5
21486echo "${ECHO_T}no" >&6; }
21487 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21488echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021490/* confdefs.h. */
21491_ACEOF
21492cat confdefs.h >>conftest.$ac_ext
21493cat >>conftest.$ac_ext <<_ACEOF
21494/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021495
21496# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021497
Martin v. Löwis11437992002-04-12 09:54:03 +000021498int
21499main ()
21500{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021501
21502 char *name;
21503 struct hostent *he;
21504 struct hostent_data data;
21505
21506 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021507
21508 ;
21509 return 0;
21510}
21511_ACEOF
21512rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021513if { (ac_try="$ac_compile"
21514case "(($ac_try" in
21515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21516 *) ac_try_echo=$ac_try;;
21517esac
21518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021521 grep -v '^ *+' conftest.er1 >conftest.err
21522 rm -f conftest.er1
21523 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021525 (exit $ac_status); } && {
21526 test -z "$ac_c_werror_flag" ||
21527 test ! -s conftest.err
21528 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021529
21530 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021531#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021532_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021533
Martin v. Löwis11437992002-04-12 09:54:03 +000021534
21535cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021536#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021537_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021538
Martin v. Löwiseba40652007-08-30 20:10:57 +000021539 { echo "$as_me:$LINENO: result: yes" >&5
21540echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021541
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021542else
Martin v. Löwis11437992002-04-12 09:54:03 +000021543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021544sed 's/^/| /' conftest.$ac_ext >&5
21545
Martin v. Löwis11437992002-04-12 09:54:03 +000021546
Martin v. Löwiseba40652007-08-30 20:10:57 +000021547 { echo "$as_me:$LINENO: result: no" >&5
21548echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021549
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021551
21552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021553
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021555
21556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021557
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021559
21560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021561 CFLAGS=$OLD_CFLAGS
21562
21563else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021564
Martin v. Löwis11437992002-04-12 09:54:03 +000021565
21566for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021567do
Martin v. Löwis11437992002-04-12 09:54:03 +000021568as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021569{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21570echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21571if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021573else
Martin v. Löwis11437992002-04-12 09:54:03 +000021574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021575/* confdefs.h. */
21576_ACEOF
21577cat confdefs.h >>conftest.$ac_ext
21578cat >>conftest.$ac_ext <<_ACEOF
21579/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021580/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21581 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21582#define $ac_func innocuous_$ac_func
21583
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021584/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021585 which can conflict with char $ac_func (); below.
21586 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021587 <limits.h> exists even on freestanding compilers. */
21588
21589#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021590# include <limits.h>
21591#else
21592# include <assert.h>
21593#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021594
21595#undef $ac_func
21596
Martin v. Löwiseba40652007-08-30 20:10:57 +000021597/* Override any GCC internal prototype to avoid an error.
21598 Use char because int might match the return type of a GCC
21599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021600#ifdef __cplusplus
21601extern "C"
21602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021603char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021604/* The GNU C library defines this for functions which it implements
21605 to always fail with ENOSYS. Some functions are actually named
21606 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021607#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021608choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021609#endif
21610
Skip Montanaro6dead952003-09-25 14:50:04 +000021611int
21612main ()
21613{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021614return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021615 ;
21616 return 0;
21617}
21618_ACEOF
21619rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021620if { (ac_try="$ac_link"
21621case "(($ac_try" in
21622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21623 *) ac_try_echo=$ac_try;;
21624esac
21625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21626 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021628 grep -v '^ *+' conftest.er1 >conftest.err
21629 rm -f conftest.er1
21630 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021632 (exit $ac_status); } && {
21633 test -z "$ac_c_werror_flag" ||
21634 test ! -s conftest.err
21635 } && test -s conftest$ac_exeext &&
21636 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021637 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021638else
Martin v. Löwis11437992002-04-12 09:54:03 +000021639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021640sed 's/^/| /' conftest.$ac_ext >&5
21641
Martin v. Löwiseba40652007-08-30 20:10:57 +000021642 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021644
21645rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021646 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021648ac_res=`eval echo '${'$as_ac_var'}'`
21649 { echo "$as_me:$LINENO: result: $ac_res" >&5
21650echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021651if test `eval echo '${'$as_ac_var'}'` = yes; then
21652 cat >>confdefs.h <<_ACEOF
21653#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21654_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021655
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021656fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021657done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021658
Michael W. Hudson54241132001-12-07 15:38:26 +000021659
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021660fi
21661
Michael W. Hudson54241132001-12-07 15:38:26 +000021662
21663
21664
21665
21666
21667
Guido van Rossum627b2d71993-12-24 10:39:16 +000021668# checks for system services
21669# (none yet)
21670
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021671# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021672{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21673echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021674if test "${ac_cv_func___fpu_control+set}" = set; then
21675 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021676else
Martin v. Löwis11437992002-04-12 09:54:03 +000021677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021678/* confdefs.h. */
21679_ACEOF
21680cat confdefs.h >>conftest.$ac_ext
21681cat >>conftest.$ac_ext <<_ACEOF
21682/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021683/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21684 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21685#define __fpu_control innocuous___fpu_control
21686
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021687/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021688 which can conflict with char __fpu_control (); below.
21689 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021690 <limits.h> exists even on freestanding compilers. */
21691
21692#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021693# include <limits.h>
21694#else
21695# include <assert.h>
21696#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021697
21698#undef __fpu_control
21699
Martin v. Löwiseba40652007-08-30 20:10:57 +000021700/* Override any GCC internal prototype to avoid an error.
21701 Use char because int might match the return type of a GCC
21702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021703#ifdef __cplusplus
21704extern "C"
21705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021706char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021707/* The GNU C library defines this for functions which it implements
21708 to always fail with ENOSYS. Some functions are actually named
21709 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021710#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021711choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021712#endif
21713
Skip Montanaro6dead952003-09-25 14:50:04 +000021714int
21715main ()
21716{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021717return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021718 ;
21719 return 0;
21720}
21721_ACEOF
21722rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021723if { (ac_try="$ac_link"
21724case "(($ac_try" in
21725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21726 *) ac_try_echo=$ac_try;;
21727esac
21728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21729 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021731 grep -v '^ *+' conftest.er1 >conftest.err
21732 rm -f conftest.er1
21733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021735 (exit $ac_status); } && {
21736 test -z "$ac_c_werror_flag" ||
21737 test ! -s conftest.err
21738 } && test -s conftest$ac_exeext &&
21739 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021740 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021741else
Martin v. Löwis11437992002-04-12 09:54:03 +000021742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021743sed 's/^/| /' conftest.$ac_ext >&5
21744
Martin v. Löwiseba40652007-08-30 20:10:57 +000021745 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021747
21748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021749 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021751{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21752echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021753if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021754 :
21755else
Martin v. Löwis11437992002-04-12 09:54:03 +000021756
Martin v. Löwiseba40652007-08-30 20:10:57 +000021757{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21758echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021759if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21760 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021761else
Martin v. Löwis11437992002-04-12 09:54:03 +000021762 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021763LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021764cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021765/* confdefs.h. */
21766_ACEOF
21767cat confdefs.h >>conftest.$ac_ext
21768cat >>conftest.$ac_ext <<_ACEOF
21769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021770
Martin v. Löwiseba40652007-08-30 20:10:57 +000021771/* Override any GCC internal prototype to avoid an error.
21772 Use char because int might match the return type of a GCC
21773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021774#ifdef __cplusplus
21775extern "C"
21776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021777char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021778int
21779main ()
21780{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021781return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021782 ;
21783 return 0;
21784}
21785_ACEOF
21786rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021787if { (ac_try="$ac_link"
21788case "(($ac_try" in
21789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21790 *) ac_try_echo=$ac_try;;
21791esac
21792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21793 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021795 grep -v '^ *+' conftest.er1 >conftest.err
21796 rm -f conftest.er1
21797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021799 (exit $ac_status); } && {
21800 test -z "$ac_c_werror_flag" ||
21801 test ! -s conftest.err
21802 } && test -s conftest$ac_exeext &&
21803 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021804 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021805else
Martin v. Löwis11437992002-04-12 09:54:03 +000021806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021807sed 's/^/| /' conftest.$ac_ext >&5
21808
Martin v. Löwiseba40652007-08-30 20:10:57 +000021809 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021811
21812rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021814LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021815fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021816{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21817echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021818if test $ac_cv_lib_ieee___fpu_control = yes; then
21819 cat >>confdefs.h <<_ACEOF
21820#define HAVE_LIBIEEE 1
21821_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021822
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021823 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021824
Guido van Rossum627b2d71993-12-24 10:39:16 +000021825fi
21826
Michael W. Hudson54241132001-12-07 15:38:26 +000021827
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021828fi
21829
Michael W. Hudson54241132001-12-07 15:38:26 +000021830
Guido van Rossum7f253911997-05-09 02:42:48 +000021831# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021832{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21833echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021834
Martin v. Löwiseba40652007-08-30 20:10:57 +000021835# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021836if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021837 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021838if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021839then
21840
21841cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021842#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021843_ACEOF
21844
Martin v. Löwiseba40652007-08-30 20:10:57 +000021845 { echo "$as_me:$LINENO: result: yes" >&5
21846echo "${ECHO_T}yes" >&6; }
21847else { echo "$as_me:$LINENO: result: no" >&5
21848echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021849fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021850else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021851 { echo "$as_me:$LINENO: result: no" >&5
21852echo "${ECHO_T}no" >&6; }
21853fi
21854
Guido van Rossum7f253911997-05-09 02:42:48 +000021855
Guido van Rossum7f43da71994-08-01 12:15:30 +000021856# check for --with-libm=...
21857
Guido van Rossum563e7081996-09-10 18:20:48 +000021858case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021859Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021860BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021861*) LIBM=-lm
21862esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021863{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21864echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021865
Martin v. Löwiseba40652007-08-30 20:10:57 +000021866# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021867if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021868 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021869if test "$withval" = no
21870then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021871 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21872echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021873elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021874then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021875 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21876echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021877else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21878echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21879 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021880fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021881else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021882 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21883echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21884fi
21885
Guido van Rossum7f43da71994-08-01 12:15:30 +000021886
21887# check for --with-libc=...
21888
Martin v. Löwiseba40652007-08-30 20:10:57 +000021889{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21890echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021891
Martin v. Löwiseba40652007-08-30 20:10:57 +000021892# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021893if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021894 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021895if test "$withval" = no
21896then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021897 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21898echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021899elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021900then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021901 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21902echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021903else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21904echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21905 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021906fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021907else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021908 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21909echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21910fi
21911
Guido van Rossum7f43da71994-08-01 12:15:30 +000021912
Christian Heimes0a8143f2007-12-18 23:22:54 +000021913# ************************************
21914# * Check for mathematical functions *
21915# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021916
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021917LIBS_SAVE=$LIBS
21918LIBS="$LIBS $LIBM"
21919
Mark Dickinson04b27232009-01-04 12:29:36 +000021920# Detect whether system arithmetic is subject to x87-style double
21921# rounding issues. The result of this test has little meaning on non
21922# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21923# mode is round-to-nearest and double rounding issues are present, and
21924# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
21925{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21926echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
21927if test "${ac_cv_x87_double_rounding+set}" = set; then
21928 echo $ECHO_N "(cached) $ECHO_C" >&6
21929else
21930
21931if test "$cross_compiling" = yes; then
21932 ac_cv_x87_double_rounding=no
21933else
21934 cat >conftest.$ac_ext <<_ACEOF
21935/* confdefs.h. */
21936_ACEOF
21937cat confdefs.h >>conftest.$ac_ext
21938cat >>conftest.$ac_ext <<_ACEOF
21939/* end confdefs.h. */
21940
21941#include <stdlib.h>
21942#include <math.h>
21943int main() {
21944 volatile double x, y, z;
21945 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21946 x = 0.99999999999999989; /* 1-2**-53 */
21947 y = 1./x;
21948 if (y != 1.)
21949 exit(0);
21950 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21951 x = 1e16;
21952 y = 2.99999;
21953 z = x + y;
21954 if (z != 1e16+4.)
21955 exit(0);
21956 /* both tests show evidence of double rounding */
21957 exit(1);
21958}
21959
21960_ACEOF
21961rm -f conftest$ac_exeext
21962if { (ac_try="$ac_link"
21963case "(($ac_try" in
21964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21965 *) ac_try_echo=$ac_try;;
21966esac
21967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21968 (eval "$ac_link") 2>&5
21969 ac_status=$?
21970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21971 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21972 { (case "(($ac_try" in
21973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21974 *) ac_try_echo=$ac_try;;
21975esac
21976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21977 (eval "$ac_try") 2>&5
21978 ac_status=$?
21979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21980 (exit $ac_status); }; }; then
21981 ac_cv_x87_double_rounding=no
21982else
21983 echo "$as_me: program exited with status $ac_status" >&5
21984echo "$as_me: failed program was:" >&5
21985sed 's/^/| /' conftest.$ac_ext >&5
21986
21987( exit $ac_status )
21988ac_cv_x87_double_rounding=yes
21989fi
21990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21991fi
21992
21993
21994fi
21995
21996{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
21997echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
21998if test "$ac_cv_x87_double_rounding" = yes
21999then
22000
22001cat >>confdefs.h <<\_ACEOF
22002#define X87_DOUBLE_ROUNDING 1
22003_ACEOF
22004
22005fi
22006
Jesse Noller355b1262009-04-02 00:03:28 +000022007# Multiprocessing check for broken sem_getvalue
22008{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22009echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
22010if test "$cross_compiling" = yes; then
22011 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
22012See \`config.log' for more details." >&5
22013echo "$as_me: error: cannot run test program while cross compiling
22014See \`config.log' for more details." >&2;}
22015 { (exit 1); exit 1; }; }
22016else
22017 cat >conftest.$ac_ext <<_ACEOF
22018/* confdefs.h. */
22019_ACEOF
22020cat confdefs.h >>conftest.$ac_ext
22021cat >>conftest.$ac_ext <<_ACEOF
22022/* end confdefs.h. */
22023
22024#include <unistd.h>
22025#include <fcntl.h>
22026#include <stdio.h>
22027#include <semaphore.h>
22028#include <sys/stat.h>
22029
22030int main(void){
22031 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22032 int count;
22033 int res;
22034 if(a==SEM_FAILED){
22035 perror("sem_open");
22036 return 1;
22037
22038 }
22039 res = sem_getvalue(a, &count);
22040 sem_close(a);
22041 return res==-1 ? 1 : 0;
22042}
22043
22044
22045_ACEOF
22046rm -f conftest$ac_exeext
22047if { (ac_try="$ac_link"
22048case "(($ac_try" in
22049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22050 *) ac_try_echo=$ac_try;;
22051esac
22052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22053 (eval "$ac_link") 2>&5
22054 ac_status=$?
22055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22057 { (case "(($ac_try" in
22058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22059 *) ac_try_echo=$ac_try;;
22060esac
22061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22062 (eval "$ac_try") 2>&5
22063 ac_status=$?
22064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22065 (exit $ac_status); }; }; then
22066 { echo "$as_me:$LINENO: result: no" >&5
22067echo "${ECHO_T}no" >&6; }
22068else
22069 echo "$as_me: program exited with status $ac_status" >&5
22070echo "$as_me: failed program was:" >&5
22071sed 's/^/| /' conftest.$ac_ext >&5
22072
22073( exit $ac_status )
22074{ echo "$as_me:$LINENO: result: yes" >&5
22075echo "${ECHO_T}yes" >&6; }
22076
22077cat >>confdefs.h <<\_ACEOF
22078#define HAVE_BROKEN_SEM_GETVALUE 1
22079_ACEOF
22080
22081
22082fi
22083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22084fi
22085
22086
Mark Dickinson04b27232009-01-04 12:29:36 +000022087
Mark Dickinson265d7382008-04-21 22:32:24 +000022088# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22089# -0. on some architectures.
22090{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22091echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
22092if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
22093 echo $ECHO_N "(cached) $ECHO_C" >&6
22094else
22095
22096if test "$cross_compiling" = yes; then
22097 ac_cv_tanh_preserves_zero_sign=no
22098else
22099 cat >conftest.$ac_ext <<_ACEOF
22100/* confdefs.h. */
22101_ACEOF
22102cat confdefs.h >>conftest.$ac_ext
22103cat >>conftest.$ac_ext <<_ACEOF
22104/* end confdefs.h. */
22105
22106#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000022107#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000022108int main() {
22109 /* return 0 if either negative zeros don't exist
22110 on this platform or if negative zeros exist
22111 and tanh(-0.) == -0. */
22112 if (atan2(0., -1.) == atan2(-0., -1.) ||
22113 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22114 else exit(1);
22115}
22116
22117_ACEOF
22118rm -f conftest$ac_exeext
22119if { (ac_try="$ac_link"
22120case "(($ac_try" in
22121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22122 *) ac_try_echo=$ac_try;;
22123esac
22124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22125 (eval "$ac_link") 2>&5
22126 ac_status=$?
22127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22129 { (case "(($ac_try" in
22130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22131 *) ac_try_echo=$ac_try;;
22132esac
22133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22134 (eval "$ac_try") 2>&5
22135 ac_status=$?
22136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22137 (exit $ac_status); }; }; then
22138 ac_cv_tanh_preserves_zero_sign=yes
22139else
22140 echo "$as_me: program exited with status $ac_status" >&5
22141echo "$as_me: failed program was:" >&5
22142sed 's/^/| /' conftest.$ac_ext >&5
22143
22144( exit $ac_status )
22145ac_cv_tanh_preserves_zero_sign=no
22146fi
22147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22148fi
22149
22150
22151fi
22152
22153{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22154echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
22155if test "$ac_cv_tanh_preserves_zero_sign" = yes
22156then
22157
22158cat >>confdefs.h <<\_ACEOF
22159#define TANH_PRESERVES_ZERO_SIGN 1
22160_ACEOF
22161
22162fi
22163
Martin v. Löwis11437992002-04-12 09:54:03 +000022164
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022165
Michael W. Hudson54241132001-12-07 15:38:26 +000022166
Christian Heimes0a8143f2007-12-18 23:22:54 +000022167
22168
22169
22170
22171
Mark Dickinson1de33272009-01-04 20:19:41 +000022172for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000022173do
22174as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22175{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22176echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22177if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22178 echo $ECHO_N "(cached) $ECHO_C" >&6
22179else
22180 cat >conftest.$ac_ext <<_ACEOF
22181/* confdefs.h. */
22182_ACEOF
22183cat confdefs.h >>conftest.$ac_ext
22184cat >>conftest.$ac_ext <<_ACEOF
22185/* end confdefs.h. */
22186/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22187 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22188#define $ac_func innocuous_$ac_func
22189
22190/* System header to define __stub macros and hopefully few prototypes,
22191 which can conflict with char $ac_func (); below.
22192 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22193 <limits.h> exists even on freestanding compilers. */
22194
22195#ifdef __STDC__
22196# include <limits.h>
22197#else
22198# include <assert.h>
22199#endif
22200
22201#undef $ac_func
22202
22203/* Override any GCC internal prototype to avoid an error.
22204 Use char because int might match the return type of a GCC
22205 builtin and then its argument prototype would still apply. */
22206#ifdef __cplusplus
22207extern "C"
22208#endif
22209char $ac_func ();
22210/* The GNU C library defines this for functions which it implements
22211 to always fail with ENOSYS. Some functions are actually named
22212 something starting with __ and the normal name is an alias. */
22213#if defined __stub_$ac_func || defined __stub___$ac_func
22214choke me
22215#endif
22216
22217int
22218main ()
22219{
22220return $ac_func ();
22221 ;
22222 return 0;
22223}
22224_ACEOF
22225rm -f conftest.$ac_objext conftest$ac_exeext
22226if { (ac_try="$ac_link"
22227case "(($ac_try" in
22228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22229 *) ac_try_echo=$ac_try;;
22230esac
22231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22232 (eval "$ac_link") 2>conftest.er1
22233 ac_status=$?
22234 grep -v '^ *+' conftest.er1 >conftest.err
22235 rm -f conftest.er1
22236 cat conftest.err >&5
22237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22238 (exit $ac_status); } && {
22239 test -z "$ac_c_werror_flag" ||
22240 test ! -s conftest.err
22241 } && test -s conftest$ac_exeext &&
22242 $as_test_x conftest$ac_exeext; then
22243 eval "$as_ac_var=yes"
22244else
22245 echo "$as_me: failed program was:" >&5
22246sed 's/^/| /' conftest.$ac_ext >&5
22247
22248 eval "$as_ac_var=no"
22249fi
22250
22251rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22252 conftest$ac_exeext conftest.$ac_ext
22253fi
22254ac_res=`eval echo '${'$as_ac_var'}'`
22255 { echo "$as_me:$LINENO: result: $ac_res" >&5
22256echo "${ECHO_T}$ac_res" >&6; }
22257if test `eval echo '${'$as_ac_var'}'` = yes; then
22258 cat >>confdefs.h <<_ACEOF
22259#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22260_ACEOF
22261
22262fi
22263done
22264
Mark Dickinsond181e3a2009-01-04 13:57:26 +000022265{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22266echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
22267if test "${ac_cv_have_decl_isinf+set}" = set; then
22268 echo $ECHO_N "(cached) $ECHO_C" >&6
22269else
22270 cat >conftest.$ac_ext <<_ACEOF
22271/* confdefs.h. */
22272_ACEOF
22273cat confdefs.h >>conftest.$ac_ext
22274cat >>conftest.$ac_ext <<_ACEOF
22275/* end confdefs.h. */
22276#include <math.h>
22277
22278int
22279main ()
22280{
22281#ifndef isinf
22282 (void) isinf;
22283#endif
22284
22285 ;
22286 return 0;
22287}
22288_ACEOF
22289rm -f conftest.$ac_objext
22290if { (ac_try="$ac_compile"
22291case "(($ac_try" in
22292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22293 *) ac_try_echo=$ac_try;;
22294esac
22295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22296 (eval "$ac_compile") 2>conftest.er1
22297 ac_status=$?
22298 grep -v '^ *+' conftest.er1 >conftest.err
22299 rm -f conftest.er1
22300 cat conftest.err >&5
22301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22302 (exit $ac_status); } && {
22303 test -z "$ac_c_werror_flag" ||
22304 test ! -s conftest.err
22305 } && test -s conftest.$ac_objext; then
22306 ac_cv_have_decl_isinf=yes
22307else
22308 echo "$as_me: failed program was:" >&5
22309sed 's/^/| /' conftest.$ac_ext >&5
22310
22311 ac_cv_have_decl_isinf=no
22312fi
22313
22314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22315fi
22316{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22317echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22318if test $ac_cv_have_decl_isinf = yes; then
22319
22320cat >>confdefs.h <<_ACEOF
22321#define HAVE_DECL_ISINF 1
22322_ACEOF
22323
22324
22325else
22326 cat >>confdefs.h <<_ACEOF
22327#define HAVE_DECL_ISINF 0
22328_ACEOF
22329
22330
22331fi
22332{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22333echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
22334if test "${ac_cv_have_decl_isnan+set}" = set; then
22335 echo $ECHO_N "(cached) $ECHO_C" >&6
22336else
22337 cat >conftest.$ac_ext <<_ACEOF
22338/* confdefs.h. */
22339_ACEOF
22340cat confdefs.h >>conftest.$ac_ext
22341cat >>conftest.$ac_ext <<_ACEOF
22342/* end confdefs.h. */
22343#include <math.h>
22344
22345int
22346main ()
22347{
22348#ifndef isnan
22349 (void) isnan;
22350#endif
22351
22352 ;
22353 return 0;
22354}
22355_ACEOF
22356rm -f conftest.$ac_objext
22357if { (ac_try="$ac_compile"
22358case "(($ac_try" in
22359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22360 *) ac_try_echo=$ac_try;;
22361esac
22362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22363 (eval "$ac_compile") 2>conftest.er1
22364 ac_status=$?
22365 grep -v '^ *+' conftest.er1 >conftest.err
22366 rm -f conftest.er1
22367 cat conftest.err >&5
22368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22369 (exit $ac_status); } && {
22370 test -z "$ac_c_werror_flag" ||
22371 test ! -s conftest.err
22372 } && test -s conftest.$ac_objext; then
22373 ac_cv_have_decl_isnan=yes
22374else
22375 echo "$as_me: failed program was:" >&5
22376sed 's/^/| /' conftest.$ac_ext >&5
22377
22378 ac_cv_have_decl_isnan=no
22379fi
22380
22381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22382fi
22383{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22384echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22385if test $ac_cv_have_decl_isnan = yes; then
22386
22387cat >>confdefs.h <<_ACEOF
22388#define HAVE_DECL_ISNAN 1
22389_ACEOF
22390
22391
22392else
22393 cat >>confdefs.h <<_ACEOF
22394#define HAVE_DECL_ISNAN 0
22395_ACEOF
22396
22397
22398fi
22399{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22400echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
22401if test "${ac_cv_have_decl_isfinite+set}" = set; then
22402 echo $ECHO_N "(cached) $ECHO_C" >&6
22403else
22404 cat >conftest.$ac_ext <<_ACEOF
22405/* confdefs.h. */
22406_ACEOF
22407cat confdefs.h >>conftest.$ac_ext
22408cat >>conftest.$ac_ext <<_ACEOF
22409/* end confdefs.h. */
22410#include <math.h>
22411
22412int
22413main ()
22414{
22415#ifndef isfinite
22416 (void) isfinite;
22417#endif
22418
22419 ;
22420 return 0;
22421}
22422_ACEOF
22423rm -f conftest.$ac_objext
22424if { (ac_try="$ac_compile"
22425case "(($ac_try" in
22426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22427 *) ac_try_echo=$ac_try;;
22428esac
22429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22430 (eval "$ac_compile") 2>conftest.er1
22431 ac_status=$?
22432 grep -v '^ *+' conftest.er1 >conftest.err
22433 rm -f conftest.er1
22434 cat conftest.err >&5
22435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22436 (exit $ac_status); } && {
22437 test -z "$ac_c_werror_flag" ||
22438 test ! -s conftest.err
22439 } && test -s conftest.$ac_objext; then
22440 ac_cv_have_decl_isfinite=yes
22441else
22442 echo "$as_me: failed program was:" >&5
22443sed 's/^/| /' conftest.$ac_ext >&5
22444
22445 ac_cv_have_decl_isfinite=no
22446fi
22447
22448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22449fi
22450{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22451echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22452if test $ac_cv_have_decl_isfinite = yes; then
22453
22454cat >>confdefs.h <<_ACEOF
22455#define HAVE_DECL_ISFINITE 1
22456_ACEOF
22457
22458
22459else
22460 cat >>confdefs.h <<_ACEOF
22461#define HAVE_DECL_ISFINITE 0
22462_ACEOF
22463
22464
22465fi
22466
22467
Christian Heimes0a8143f2007-12-18 23:22:54 +000022468
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022469LIBS=$LIBS_SAVE
22470
Mark Dickinsonefc82f72009-03-20 15:51:55 +000022471# determine what size digit to use for Python's longs
22472{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22473echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
22474# Check whether --enable-big-digits was given.
22475if test "${enable_big_digits+set}" = set; then
22476 enableval=$enable_big_digits; case $enable_big_digits in
22477yes)
22478 enable_big_digits=30 ;;
22479no)
22480 enable_big_digits=15 ;;
2248115|30)
22482 ;;
22483*)
22484 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22485echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
22486 { (exit 1); exit 1; }; } ;;
22487esac
22488{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22489echo "${ECHO_T}$enable_big_digits" >&6; }
22490
22491cat >>confdefs.h <<_ACEOF
22492#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22493_ACEOF
22494
22495
22496else
22497 { echo "$as_me:$LINENO: result: no value specified" >&5
22498echo "${ECHO_T}no value specified" >&6; }
22499fi
22500
22501
Guido van Rossumef2255b2000-03-10 22:30:29 +000022502# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022503if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022504 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22505echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022506if test "${ac_cv_header_wchar_h+set}" = set; then
22507 echo $ECHO_N "(cached) $ECHO_C" >&6
22508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022509{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22510echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022511else
Martin v. Löwis11437992002-04-12 09:54:03 +000022512 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022513{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22514echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022515cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022516/* confdefs.h. */
22517_ACEOF
22518cat confdefs.h >>conftest.$ac_ext
22519cat >>conftest.$ac_ext <<_ACEOF
22520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022521$ac_includes_default
22522#include <wchar.h>
22523_ACEOF
22524rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022525if { (ac_try="$ac_compile"
22526case "(($ac_try" in
22527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22528 *) ac_try_echo=$ac_try;;
22529esac
22530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22531 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022533 grep -v '^ *+' conftest.er1 >conftest.err
22534 rm -f conftest.er1
22535 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022537 (exit $ac_status); } && {
22538 test -z "$ac_c_werror_flag" ||
22539 test ! -s conftest.err
22540 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022541 ac_header_compiler=yes
22542else
22543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022544sed 's/^/| /' conftest.$ac_ext >&5
22545
Martin v. Löwiseba40652007-08-30 20:10:57 +000022546 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022548
22549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22550{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22551echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022552
22553# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022554{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22555echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022556cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022557/* confdefs.h. */
22558_ACEOF
22559cat confdefs.h >>conftest.$ac_ext
22560cat >>conftest.$ac_ext <<_ACEOF
22561/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022562#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022563_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022564if { (ac_try="$ac_cpp conftest.$ac_ext"
22565case "(($ac_try" in
22566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22567 *) ac_try_echo=$ac_try;;
22568esac
22569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22570 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022571 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022572 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022573 rm -f conftest.er1
22574 cat conftest.err >&5
22575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022576 (exit $ac_status); } >/dev/null && {
22577 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22578 test ! -s conftest.err
22579 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022580 ac_header_preproc=yes
22581else
22582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022583sed 's/^/| /' conftest.$ac_ext >&5
22584
Martin v. Löwis11437992002-04-12 09:54:03 +000022585 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022587
Martin v. Löwis11437992002-04-12 09:54:03 +000022588rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022589{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22590echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022591
22592# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022593case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22594 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022595 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22596echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022597 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22598echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22599 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022600 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022601 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022602 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22603echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022604 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22605echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22606 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22607echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22608 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22609echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022610 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22611echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022612 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22613echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022614 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022615## ------------------------------------------------ ##
22616## Report this to http://www.python.org/python-bugs ##
22617## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022618_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000022619 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022620 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022621esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000022622{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22623echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022624if test "${ac_cv_header_wchar_h+set}" = set; then
22625 echo $ECHO_N "(cached) $ECHO_C" >&6
22626else
22627 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022629{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22630echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022631
22632fi
22633if test $ac_cv_header_wchar_h = yes; then
22634
22635
22636cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022637#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022638_ACEOF
22639
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022640 wchar_h="yes"
22641
Guido van Rossumef2255b2000-03-10 22:30:29 +000022642else
Martin v. Löwis11437992002-04-12 09:54:03 +000022643 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022644
22645fi
22646
Michael W. Hudson54241132001-12-07 15:38:26 +000022647
Martin v. Löwis11437992002-04-12 09:54:03 +000022648
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022649# determine wchar_t size
22650if test "$wchar_h" = yes
22651then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022652 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22653echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022654if test "${ac_cv_type_wchar_t+set}" = set; then
22655 echo $ECHO_N "(cached) $ECHO_C" >&6
22656else
22657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022658/* confdefs.h. */
22659_ACEOF
22660cat confdefs.h >>conftest.$ac_ext
22661cat >>conftest.$ac_ext <<_ACEOF
22662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022663#include <wchar.h>
22664
Martin v. Löwiseba40652007-08-30 20:10:57 +000022665typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022666int
22667main ()
22668{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022669if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022670 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022671if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022672 return 0;
22673 ;
22674 return 0;
22675}
22676_ACEOF
22677rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022678if { (ac_try="$ac_compile"
22679case "(($ac_try" in
22680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22681 *) ac_try_echo=$ac_try;;
22682esac
22683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22684 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022686 grep -v '^ *+' conftest.er1 >conftest.err
22687 rm -f conftest.er1
22688 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022690 (exit $ac_status); } && {
22691 test -z "$ac_c_werror_flag" ||
22692 test ! -s conftest.err
22693 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022694 ac_cv_type_wchar_t=yes
22695else
22696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022697sed 's/^/| /' conftest.$ac_ext >&5
22698
Martin v. Löwiseba40652007-08-30 20:10:57 +000022699 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022700fi
Brett Cannon19fab762007-06-02 03:02:29 +000022701
Martin v. Löwiseba40652007-08-30 20:10:57 +000022702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22703fi
22704{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22705echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22706
22707# The cast to long int works around a bug in the HP C Compiler
22708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22710# This bug is HP SR number 8606223364.
22711{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22712echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022713if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22714 echo $ECHO_N "(cached) $ECHO_C" >&6
22715else
Martin v. Löwis11437992002-04-12 09:54:03 +000022716 if test "$cross_compiling" = yes; then
22717 # Depending upon the size, compute the lo and hi bounds.
22718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022719/* confdefs.h. */
22720_ACEOF
22721cat confdefs.h >>conftest.$ac_ext
22722cat >>conftest.$ac_ext <<_ACEOF
22723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022724#include <wchar.h>
22725
Martin v. Löwiseba40652007-08-30 20:10:57 +000022726 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022727int
22728main ()
22729{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022730static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022731test_array [0] = 0
22732
22733 ;
22734 return 0;
22735}
22736_ACEOF
22737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022738if { (ac_try="$ac_compile"
22739case "(($ac_try" in
22740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22741 *) ac_try_echo=$ac_try;;
22742esac
22743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022746 grep -v '^ *+' conftest.er1 >conftest.err
22747 rm -f conftest.er1
22748 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022750 (exit $ac_status); } && {
22751 test -z "$ac_c_werror_flag" ||
22752 test ! -s conftest.err
22753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022754 ac_lo=0 ac_mid=0
22755 while :; do
22756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022757/* confdefs.h. */
22758_ACEOF
22759cat confdefs.h >>conftest.$ac_ext
22760cat >>conftest.$ac_ext <<_ACEOF
22761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022762#include <wchar.h>
22763
Martin v. Löwiseba40652007-08-30 20:10:57 +000022764 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022765int
22766main ()
22767{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022768static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022769test_array [0] = 0
22770
22771 ;
22772 return 0;
22773}
22774_ACEOF
22775rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022776if { (ac_try="$ac_compile"
22777case "(($ac_try" in
22778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22779 *) ac_try_echo=$ac_try;;
22780esac
22781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22782 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022784 grep -v '^ *+' conftest.er1 >conftest.err
22785 rm -f conftest.er1
22786 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022788 (exit $ac_status); } && {
22789 test -z "$ac_c_werror_flag" ||
22790 test ! -s conftest.err
22791 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022792 ac_hi=$ac_mid; break
22793else
22794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022795sed 's/^/| /' conftest.$ac_ext >&5
22796
Martin v. Löwiseba40652007-08-30 20:10:57 +000022797 ac_lo=`expr $ac_mid + 1`
22798 if test $ac_lo -le $ac_mid; then
22799 ac_lo= ac_hi=
22800 break
22801 fi
22802 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022804
22805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022806 done
22807else
22808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022809sed 's/^/| /' conftest.$ac_ext >&5
22810
Martin v. Löwiseba40652007-08-30 20:10:57 +000022811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022812/* confdefs.h. */
22813_ACEOF
22814cat confdefs.h >>conftest.$ac_ext
22815cat >>conftest.$ac_ext <<_ACEOF
22816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022817#include <wchar.h>
22818
Martin v. Löwiseba40652007-08-30 20:10:57 +000022819 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022820int
22821main ()
22822{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022823static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022824test_array [0] = 0
22825
22826 ;
22827 return 0;
22828}
22829_ACEOF
22830rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022831if { (ac_try="$ac_compile"
22832case "(($ac_try" in
22833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22834 *) ac_try_echo=$ac_try;;
22835esac
22836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022839 grep -v '^ *+' conftest.er1 >conftest.err
22840 rm -f conftest.er1
22841 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022843 (exit $ac_status); } && {
22844 test -z "$ac_c_werror_flag" ||
22845 test ! -s conftest.err
22846 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022847 ac_hi=-1 ac_mid=-1
22848 while :; do
22849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022850/* confdefs.h. */
22851_ACEOF
22852cat confdefs.h >>conftest.$ac_ext
22853cat >>conftest.$ac_ext <<_ACEOF
22854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022855#include <wchar.h>
22856
Martin v. Löwiseba40652007-08-30 20:10:57 +000022857 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022858int
22859main ()
22860{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022861static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022862test_array [0] = 0
22863
22864 ;
22865 return 0;
22866}
22867_ACEOF
22868rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022869if { (ac_try="$ac_compile"
22870case "(($ac_try" in
22871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22872 *) ac_try_echo=$ac_try;;
22873esac
22874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22875 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022877 grep -v '^ *+' conftest.er1 >conftest.err
22878 rm -f conftest.er1
22879 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022881 (exit $ac_status); } && {
22882 test -z "$ac_c_werror_flag" ||
22883 test ! -s conftest.err
22884 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022885 ac_lo=$ac_mid; break
22886else
22887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022888sed 's/^/| /' conftest.$ac_ext >&5
22889
Martin v. Löwiseba40652007-08-30 20:10:57 +000022890 ac_hi=`expr '(' $ac_mid ')' - 1`
22891 if test $ac_mid -le $ac_hi; then
22892 ac_lo= ac_hi=
22893 break
22894 fi
22895 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022897
22898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022899 done
22900else
22901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022902sed 's/^/| /' conftest.$ac_ext >&5
22903
Martin v. Löwiseba40652007-08-30 20:10:57 +000022904 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022906
22907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022909
22910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022911# Binary search between lo and hi bounds.
22912while test "x$ac_lo" != "x$ac_hi"; do
22913 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22914 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022915/* confdefs.h. */
22916_ACEOF
22917cat confdefs.h >>conftest.$ac_ext
22918cat >>conftest.$ac_ext <<_ACEOF
22919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022920#include <wchar.h>
22921
Martin v. Löwiseba40652007-08-30 20:10:57 +000022922 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022923int
22924main ()
22925{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022926static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022927test_array [0] = 0
22928
22929 ;
22930 return 0;
22931}
22932_ACEOF
22933rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022934if { (ac_try="$ac_compile"
22935case "(($ac_try" in
22936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22937 *) ac_try_echo=$ac_try;;
22938esac
22939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22940 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022942 grep -v '^ *+' conftest.er1 >conftest.err
22943 rm -f conftest.er1
22944 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022946 (exit $ac_status); } && {
22947 test -z "$ac_c_werror_flag" ||
22948 test ! -s conftest.err
22949 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022950 ac_hi=$ac_mid
22951else
22952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022953sed 's/^/| /' conftest.$ac_ext >&5
22954
Martin v. Löwiseba40652007-08-30 20:10:57 +000022955 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022957
22958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022959done
22960case $ac_lo in
22961?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022962'') if test "$ac_cv_type_wchar_t" = yes; then
22963 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022964See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022965echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022966See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022967 { (exit 77); exit 77; }; }
22968 else
22969 ac_cv_sizeof_wchar_t=0
22970 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022971esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022972else
Martin v. Löwis11437992002-04-12 09:54:03 +000022973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022974/* confdefs.h. */
22975_ACEOF
22976cat confdefs.h >>conftest.$ac_ext
22977cat >>conftest.$ac_ext <<_ACEOF
22978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022979#include <wchar.h>
22980
Martin v. Löwiseba40652007-08-30 20:10:57 +000022981 typedef wchar_t ac__type_sizeof_;
22982static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22983static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022984#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022985#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022986int
22987main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022988{
Martin v. Löwis11437992002-04-12 09:54:03 +000022989
22990 FILE *f = fopen ("conftest.val", "w");
22991 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022992 return 1;
22993 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022994 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022995 long int i = longval ();
22996 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22997 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022998 fprintf (f, "%ld\n", i);
22999 }
23000 else
23001 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002 unsigned long int i = ulongval ();
23003 if (i != ((long int) (sizeof (ac__type_sizeof_))))
23004 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000023005 fprintf (f, "%lu\n", i);
23006 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023007 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023008
23009 ;
23010 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023011}
Martin v. Löwis11437992002-04-12 09:54:03 +000023012_ACEOF
23013rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023014if { (ac_try="$ac_link"
23015case "(($ac_try" in
23016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23017 *) ac_try_echo=$ac_try;;
23018esac
23019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23020 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023021 ac_status=$?
23022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23023 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023024 { (case "(($ac_try" in
23025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23026 *) ac_try_echo=$ac_try;;
23027esac
23028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23029 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023030 ac_status=$?
23031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23032 (exit $ac_status); }; }; then
23033 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023034else
Martin v. Löwis11437992002-04-12 09:54:03 +000023035 echo "$as_me: program exited with status $ac_status" >&5
23036echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023037sed 's/^/| /' conftest.$ac_ext >&5
23038
Martin v. Löwis11437992002-04-12 09:54:03 +000023039( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023040if test "$ac_cv_type_wchar_t" = yes; then
23041 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023042See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023043echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023044See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000023045 { (exit 77); exit 77; }; }
23046 else
23047 ac_cv_sizeof_wchar_t=0
23048 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023050rm -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 +000023051fi
23052rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023054{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23055echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
23056
23057
23058
Martin v. Löwis11437992002-04-12 09:54:03 +000023059cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023060#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023061_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023062
Michael W. Hudson54241132001-12-07 15:38:26 +000023063
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023064fi
23065
Martin v. Löwiseba40652007-08-30 20:10:57 +000023066{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23067echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023068have_ucs4_tcl=no
23069cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023070/* confdefs.h. */
23071_ACEOF
23072cat confdefs.h >>conftest.$ac_ext
23073cat >>conftest.$ac_ext <<_ACEOF
23074/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023075
23076#include <tcl.h>
23077#if TCL_UTF_MAX != 6
23078# error "NOT UCS4_TCL"
23079#endif
23080int
23081main ()
23082{
23083
23084 ;
23085 return 0;
23086}
23087_ACEOF
23088rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023089if { (ac_try="$ac_compile"
23090case "(($ac_try" in
23091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23092 *) ac_try_echo=$ac_try;;
23093esac
23094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23095 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023097 grep -v '^ *+' conftest.er1 >conftest.err
23098 rm -f conftest.er1
23099 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023101 (exit $ac_status); } && {
23102 test -z "$ac_c_werror_flag" ||
23103 test ! -s conftest.err
23104 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023105
23106
23107cat >>confdefs.h <<\_ACEOF
23108#define HAVE_UCS4_TCL 1
23109_ACEOF
23110
23111 have_ucs4_tcl=yes
23112
23113else
23114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023115sed 's/^/| /' conftest.$ac_ext >&5
23116
Martin v. Löwiseba40652007-08-30 20:10:57 +000023117
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023119
23120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23121{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23122echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023123
Skip Montanaro6dead952003-09-25 14:50:04 +000023124# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023125if test "$wchar_h" = yes
23126then
23127 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000023128 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23129echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023130 if test "${ac_cv_wchar_t_signed+set}" = set; then
23131 echo $ECHO_N "(cached) $ECHO_C" >&6
23132else
23133
23134 if test "$cross_compiling" = yes; then
23135 ac_cv_wchar_t_signed=yes
23136else
23137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023138/* confdefs.h. */
23139_ACEOF
23140cat confdefs.h >>conftest.$ac_ext
23141cat >>conftest.$ac_ext <<_ACEOF
23142/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023143
23144 #include <wchar.h>
23145 int main()
23146 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000023147 /* Success: exit code 0 */
23148 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023149 }
23150
23151_ACEOF
23152rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023153if { (ac_try="$ac_link"
23154case "(($ac_try" in
23155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23156 *) ac_try_echo=$ac_try;;
23157esac
23158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23159 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023160 ac_status=$?
23161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23162 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023163 { (case "(($ac_try" in
23164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23165 *) ac_try_echo=$ac_try;;
23166esac
23167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23168 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023169 ac_status=$?
23170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23171 (exit $ac_status); }; }; then
23172 ac_cv_wchar_t_signed=yes
23173else
23174 echo "$as_me: program exited with status $ac_status" >&5
23175echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023176sed 's/^/| /' conftest.$ac_ext >&5
23177
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023178( exit $ac_status )
23179ac_cv_wchar_t_signed=no
23180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023181rm -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 +000023182fi
23183
Martin v. Löwiseba40652007-08-30 20:10:57 +000023184
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023185fi
23186
Martin v. Löwiseba40652007-08-30 20:10:57 +000023187 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23188echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
23189fi
23190
23191{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
23192echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
23193# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023194if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023195 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023196else
23197 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000023198fi
23199
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023200
23201if test $enable_unicode = yes
23202then
Martin v. Löwisfd917792001-06-27 20:22:04 +000023203 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023204 case "$have_ucs4_tcl" in
23205 yes) enable_unicode="ucs4"
23206 ;;
23207 *) enable_unicode="ucs2"
23208 ;;
23209 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023210fi
23211
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023212
23213
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023214case "$enable_unicode" in
23215ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000023216 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023217#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000023218_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023219
23220 ;;
23221ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000023222 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023223#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023224_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023225
23226 ;;
23227esac
23228
Michael W. Hudson54241132001-12-07 15:38:26 +000023229
Martin v. Löwis11437992002-04-12 09:54:03 +000023230
23231
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023232
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023233if test "$enable_unicode" = "no"
23234then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023235 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000023236 { echo "$as_me:$LINENO: result: not used" >&5
23237echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023238else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023239 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000023240
23241cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023242#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023243_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023244
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023245
23246 # wchar_t is only usable if it maps to an unsigned type
23247 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023248 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023249 then
23250 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023251
Martin v. Löwis11437992002-04-12 09:54:03 +000023252cat >>confdefs.h <<\_ACEOF
23253#define HAVE_USABLE_WCHAR_T 1
23254_ACEOF
23255
23256 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023257#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023258_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023259
23260 elif test "$ac_cv_sizeof_short" = "$unicode_size"
23261 then
23262 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000023263 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023264#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023265_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023266
23267 elif test "$ac_cv_sizeof_long" = "$unicode_size"
23268 then
23269 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000023270 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023271#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023272_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023273
23274 else
23275 PY_UNICODE_TYPE="no type found"
23276 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023277 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23278echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023279fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023280
23281# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000023282{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23283echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023284if test "${ac_cv_c_bigendian+set}" = set; then
23285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023286else
Martin v. Löwis11437992002-04-12 09:54:03 +000023287 # See if sys/param.h defines the BYTE_ORDER macro.
23288cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023289/* confdefs.h. */
23290_ACEOF
23291cat confdefs.h >>conftest.$ac_ext
23292cat >>conftest.$ac_ext <<_ACEOF
23293/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023294#include <sys/types.h>
23295#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023296
Martin v. Löwis11437992002-04-12 09:54:03 +000023297int
23298main ()
23299{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023300#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23301 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000023302 bogus endian macros
23303#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023304
23305 ;
23306 return 0;
23307}
23308_ACEOF
23309rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023310if { (ac_try="$ac_compile"
23311case "(($ac_try" in
23312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23313 *) ac_try_echo=$ac_try;;
23314esac
23315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023318 grep -v '^ *+' conftest.er1 >conftest.err
23319 rm -f conftest.er1
23320 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023322 (exit $ac_status); } && {
23323 test -z "$ac_c_werror_flag" ||
23324 test ! -s conftest.err
23325 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023326 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000023327cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023328/* confdefs.h. */
23329_ACEOF
23330cat confdefs.h >>conftest.$ac_ext
23331cat >>conftest.$ac_ext <<_ACEOF
23332/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023333#include <sys/types.h>
23334#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023335
Martin v. Löwis11437992002-04-12 09:54:03 +000023336int
23337main ()
23338{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023339#if BYTE_ORDER != BIG_ENDIAN
23340 not big endian
23341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023342
23343 ;
23344 return 0;
23345}
23346_ACEOF
23347rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023348if { (ac_try="$ac_compile"
23349case "(($ac_try" in
23350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23351 *) ac_try_echo=$ac_try;;
23352esac
23353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23354 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023356 grep -v '^ *+' conftest.er1 >conftest.err
23357 rm -f conftest.er1
23358 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023360 (exit $ac_status); } && {
23361 test -z "$ac_c_werror_flag" ||
23362 test ! -s conftest.err
23363 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023364 ac_cv_c_bigendian=yes
23365else
Martin v. Löwis11437992002-04-12 09:54:03 +000023366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023367sed 's/^/| /' conftest.$ac_ext >&5
23368
Martin v. Löwiseba40652007-08-30 20:10:57 +000023369 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023371
23372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023373else
Martin v. Löwis11437992002-04-12 09:54:03 +000023374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023375sed 's/^/| /' conftest.$ac_ext >&5
23376
Martin v. Löwiseba40652007-08-30 20:10:57 +000023377 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000023378if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023379 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000023380 ac_cv_c_bigendian=unknown
23381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023382/* confdefs.h. */
23383_ACEOF
23384cat confdefs.h >>conftest.$ac_ext
23385cat >>conftest.$ac_ext <<_ACEOF
23386/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023387short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23388short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023389void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023390short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23391short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023392void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023393int
23394main ()
23395{
23396 _ascii (); _ebcdic ();
23397 ;
23398 return 0;
23399}
23400_ACEOF
23401rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023402if { (ac_try="$ac_compile"
23403case "(($ac_try" in
23404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23405 *) ac_try_echo=$ac_try;;
23406esac
23407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23408 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023410 grep -v '^ *+' conftest.er1 >conftest.err
23411 rm -f conftest.er1
23412 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023414 (exit $ac_status); } && {
23415 test -z "$ac_c_werror_flag" ||
23416 test ! -s conftest.err
23417 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023418 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023419 ac_cv_c_bigendian=yes
23420fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023421if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023422 if test "$ac_cv_c_bigendian" = unknown; then
23423 ac_cv_c_bigendian=no
23424 else
23425 # finding both strings is unlikely to happen, but who knows?
23426 ac_cv_c_bigendian=unknown
23427 fi
23428fi
23429else
23430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023431sed 's/^/| /' conftest.$ac_ext >&5
23432
Martin v. Löwiseba40652007-08-30 20:10:57 +000023433
Martin v. Löwis11437992002-04-12 09:54:03 +000023434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023435
23436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023437else
23438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023439/* confdefs.h. */
23440_ACEOF
23441cat confdefs.h >>conftest.$ac_ext
23442cat >>conftest.$ac_ext <<_ACEOF
23443/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023444$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023445int
23446main ()
23447{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023448
Guido van Rossumef2255b2000-03-10 22:30:29 +000023449 /* Are we little or big endian? From Harbison&Steele. */
23450 union
23451 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023452 long int l;
23453 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023454 } u;
23455 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023456 return u.c[sizeof (long int) - 1] == 1;
23457
23458 ;
23459 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023460}
Martin v. Löwis11437992002-04-12 09:54:03 +000023461_ACEOF
23462rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023463if { (ac_try="$ac_link"
23464case "(($ac_try" in
23465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23466 *) ac_try_echo=$ac_try;;
23467esac
23468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23469 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023470 ac_status=$?
23471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23472 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023473 { (case "(($ac_try" in
23474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23475 *) ac_try_echo=$ac_try;;
23476esac
23477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23478 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023479 ac_status=$?
23480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23481 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023482 ac_cv_c_bigendian=no
23483else
Martin v. Löwis11437992002-04-12 09:54:03 +000023484 echo "$as_me: program exited with status $ac_status" >&5
23485echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023486sed 's/^/| /' conftest.$ac_ext >&5
23487
Martin v. Löwis11437992002-04-12 09:54:03 +000023488( exit $ac_status )
23489ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023491rm -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 +000023492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023493
23494
Martin v. Löwis11437992002-04-12 09:54:03 +000023495fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023496
23497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023499{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23500echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023501case $ac_cv_c_bigendian in
23502 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023503
Martin v. Löwis11437992002-04-12 09:54:03 +000023504cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023505#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023506_ACEOF
23507 ;;
23508 no)
23509 ;;
23510 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023511 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023512presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023513echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023514presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23515 { (exit 1); exit 1; }; } ;;
23516esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023517
Michael W. Hudson54241132001-12-07 15:38:26 +000023518
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023519# Check whether right shifting a negative integer extends the sign bit
23520# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000023521{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23522echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023523if test "${ac_cv_rshift_extends_sign+set}" = set; then
23524 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023525else
Martin v. Löwis11437992002-04-12 09:54:03 +000023526
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023527if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023528 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023529else
Martin v. Löwis11437992002-04-12 09:54:03 +000023530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023531/* confdefs.h. */
23532_ACEOF
23533cat confdefs.h >>conftest.$ac_ext
23534cat >>conftest.$ac_ext <<_ACEOF
23535/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023536
23537int main()
23538{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023539 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023540}
23541
Martin v. Löwis11437992002-04-12 09:54:03 +000023542_ACEOF
23543rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023544if { (ac_try="$ac_link"
23545case "(($ac_try" in
23546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23547 *) ac_try_echo=$ac_try;;
23548esac
23549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23550 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023551 ac_status=$?
23552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23553 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023554 { (case "(($ac_try" in
23555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23556 *) ac_try_echo=$ac_try;;
23557esac
23558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23559 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023560 ac_status=$?
23561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23562 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023563 ac_cv_rshift_extends_sign=yes
23564else
Martin v. Löwis11437992002-04-12 09:54:03 +000023565 echo "$as_me: program exited with status $ac_status" >&5
23566echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023567sed 's/^/| /' conftest.$ac_ext >&5
23568
Martin v. Löwis11437992002-04-12 09:54:03 +000023569( exit $ac_status )
23570ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023572rm -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 +000023573fi
23574
Martin v. Löwiseba40652007-08-30 20:10:57 +000023575
23576fi
23577
23578{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23579echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023580if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023581then
Martin v. Löwis11437992002-04-12 09:54:03 +000023582
23583cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023584#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023585_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023586
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023587fi
23588
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023589# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000023590{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23591echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023592if test "${ac_cv_have_getc_unlocked+set}" = set; then
23593 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023594else
Martin v. Löwis11437992002-04-12 09:54:03 +000023595
23596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023597/* confdefs.h. */
23598_ACEOF
23599cat confdefs.h >>conftest.$ac_ext
23600cat >>conftest.$ac_ext <<_ACEOF
23601/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023602#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023603int
23604main ()
23605{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023606
23607 FILE *f = fopen("/dev/null", "r");
23608 flockfile(f);
23609 getc_unlocked(f);
23610 funlockfile(f);
23611
Martin v. Löwis11437992002-04-12 09:54:03 +000023612 ;
23613 return 0;
23614}
23615_ACEOF
23616rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023617if { (ac_try="$ac_link"
23618case "(($ac_try" in
23619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23620 *) ac_try_echo=$ac_try;;
23621esac
23622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23623 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023625 grep -v '^ *+' conftest.er1 >conftest.err
23626 rm -f conftest.er1
23627 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023629 (exit $ac_status); } && {
23630 test -z "$ac_c_werror_flag" ||
23631 test ! -s conftest.err
23632 } && test -s conftest$ac_exeext &&
23633 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023634 ac_cv_have_getc_unlocked=yes
23635else
Martin v. Löwis11437992002-04-12 09:54:03 +000023636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023637sed 's/^/| /' conftest.$ac_ext >&5
23638
Martin v. Löwiseba40652007-08-30 20:10:57 +000023639 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023641
23642rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023643 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023644fi
23645
Martin v. Löwiseba40652007-08-30 20:10:57 +000023646{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23647echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023648if test "$ac_cv_have_getc_unlocked" = yes
23649then
Martin v. Löwis11437992002-04-12 09:54:03 +000023650
23651cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023652#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023653_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023654
23655fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023656
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023657# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023658# save the value of LIBS so we don't actually link Python with readline
23659LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023660
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023661# On some systems we need to link readline to a termcap compatible
23662# library. NOTE: Keep the precedence of listed libraries synchronised
23663# with setup.py.
23664py_cv_lib_readline=no
23665{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23666echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
23667for py_libtermcap in "" ncursesw ncurses curses termcap; do
23668 if test -z "$py_libtermcap"; then
23669 READLINE_LIBS="-lreadline"
23670 else
23671 READLINE_LIBS="-lreadline -l$py_libtermcap"
23672 fi
23673 LIBS="$READLINE_LIBS $LIBS_no_readline"
23674 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023675/* confdefs.h. */
23676_ACEOF
23677cat confdefs.h >>conftest.$ac_ext
23678cat >>conftest.$ac_ext <<_ACEOF
23679/* end confdefs.h. */
23680
Martin v. Löwiseba40652007-08-30 20:10:57 +000023681/* Override any GCC internal prototype to avoid an error.
23682 Use char because int might match the return type of a GCC
23683 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023684#ifdef __cplusplus
23685extern "C"
23686#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023687char readline ();
23688int
23689main ()
23690{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023691return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023692 ;
23693 return 0;
23694}
23695_ACEOF
23696rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023697if { (ac_try="$ac_link"
23698case "(($ac_try" in
23699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23700 *) ac_try_echo=$ac_try;;
23701esac
23702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23703 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023704 ac_status=$?
23705 grep -v '^ *+' conftest.er1 >conftest.err
23706 rm -f conftest.er1
23707 cat conftest.err >&5
23708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023709 (exit $ac_status); } && {
23710 test -z "$ac_c_werror_flag" ||
23711 test ! -s conftest.err
23712 } && test -s conftest$ac_exeext &&
23713 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023714 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023715else
23716 echo "$as_me: failed program was:" >&5
23717sed 's/^/| /' conftest.$ac_ext >&5
23718
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023719
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023721
23722rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023723 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023724 if test $py_cv_lib_readline = yes; then
23725 break
23726 fi
23727done
23728# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23729#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000023730if test $py_cv_lib_readline = no; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023731 { echo "$as_me:$LINENO: result: none" >&5
23732echo "${ECHO_T}none" >&6; }
23733else
23734 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23735echo "${ECHO_T}$READLINE_LIBS" >&6; }
23736
23737cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023738#define HAVE_LIBREADLINE 1
23739_ACEOF
23740
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023741fi
23742
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023743# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023744{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23745echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023746if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23747 echo $ECHO_N "(cached) $ECHO_C" >&6
23748else
23749 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023750LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023751cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023752/* confdefs.h. */
23753_ACEOF
23754cat confdefs.h >>conftest.$ac_ext
23755cat >>conftest.$ac_ext <<_ACEOF
23756/* end confdefs.h. */
23757
Martin v. Löwiseba40652007-08-30 20:10:57 +000023758/* Override any GCC internal prototype to avoid an error.
23759 Use char because int might match the return type of a GCC
23760 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023761#ifdef __cplusplus
23762extern "C"
23763#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023764char rl_callback_handler_install ();
23765int
23766main ()
23767{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023768return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023769 ;
23770 return 0;
23771}
23772_ACEOF
23773rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023774if { (ac_try="$ac_link"
23775case "(($ac_try" in
23776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23777 *) ac_try_echo=$ac_try;;
23778esac
23779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23780 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023782 grep -v '^ *+' conftest.er1 >conftest.err
23783 rm -f conftest.er1
23784 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023786 (exit $ac_status); } && {
23787 test -z "$ac_c_werror_flag" ||
23788 test ! -s conftest.err
23789 } && test -s conftest$ac_exeext &&
23790 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023791 ac_cv_lib_readline_rl_callback_handler_install=yes
23792else
23793 echo "$as_me: failed program was:" >&5
23794sed 's/^/| /' conftest.$ac_ext >&5
23795
Martin v. Löwiseba40652007-08-30 20:10:57 +000023796 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023798
23799rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023800 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023801LIBS=$ac_check_lib_save_LIBS
23802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023803{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23804echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023805if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23806
23807cat >>confdefs.h <<\_ACEOF
23808#define HAVE_RL_CALLBACK 1
23809_ACEOF
23810
23811fi
23812
23813
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023814# check for readline 2.2
23815cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023816/* confdefs.h. */
23817_ACEOF
23818cat confdefs.h >>conftest.$ac_ext
23819cat >>conftest.$ac_ext <<_ACEOF
23820/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023821#include <readline/readline.h>
23822_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023823if { (ac_try="$ac_cpp conftest.$ac_ext"
23824case "(($ac_try" in
23825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23826 *) ac_try_echo=$ac_try;;
23827esac
23828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23829 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023830 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023831 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023832 rm -f conftest.er1
23833 cat conftest.err >&5
23834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023835 (exit $ac_status); } >/dev/null && {
23836 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23837 test ! -s conftest.err
23838 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023839 have_readline=yes
23840else
23841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023842sed 's/^/| /' conftest.$ac_ext >&5
23843
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023844 have_readline=no
23845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023846
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023847rm -f conftest.err conftest.$ac_ext
23848if test $have_readline = yes
23849then
23850 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023851/* confdefs.h. */
23852_ACEOF
23853cat confdefs.h >>conftest.$ac_ext
23854cat >>conftest.$ac_ext <<_ACEOF
23855/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023856#include <readline/readline.h>
23857
23858_ACEOF
23859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023860 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023861
23862cat >>confdefs.h <<\_ACEOF
23863#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23864_ACEOF
23865
23866fi
23867rm -f conftest*
23868
23869fi
23870
Martin v. Löwis0daad592001-09-30 21:09:59 +000023871# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023872{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23873echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023874if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23875 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023876else
Martin v. Löwis11437992002-04-12 09:54:03 +000023877 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023878LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023880/* confdefs.h. */
23881_ACEOF
23882cat confdefs.h >>conftest.$ac_ext
23883cat >>conftest.$ac_ext <<_ACEOF
23884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023885
Martin v. Löwiseba40652007-08-30 20:10:57 +000023886/* Override any GCC internal prototype to avoid an error.
23887 Use char because int might match the return type of a GCC
23888 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023889#ifdef __cplusplus
23890extern "C"
23891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023892char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023893int
23894main ()
23895{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023896return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023897 ;
23898 return 0;
23899}
23900_ACEOF
23901rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023902if { (ac_try="$ac_link"
23903case "(($ac_try" in
23904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23905 *) ac_try_echo=$ac_try;;
23906esac
23907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23908 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023910 grep -v '^ *+' conftest.er1 >conftest.err
23911 rm -f conftest.er1
23912 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023914 (exit $ac_status); } && {
23915 test -z "$ac_c_werror_flag" ||
23916 test ! -s conftest.err
23917 } && test -s conftest$ac_exeext &&
23918 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023919 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023920else
Martin v. Löwis11437992002-04-12 09:54:03 +000023921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023922sed 's/^/| /' conftest.$ac_ext >&5
23923
Martin v. Löwiseba40652007-08-30 20:10:57 +000023924 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023926
23927rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023928 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023929LIBS=$ac_check_lib_save_LIBS
23930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023931{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23932echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023933if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023934
Martin v. Löwis11437992002-04-12 09:54:03 +000023935cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023936#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023937_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023938
Martin v. Löwis0daad592001-09-30 21:09:59 +000023939fi
23940
Michael W. Hudson54241132001-12-07 15:38:26 +000023941
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023942# also in 4.0
23943{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23944echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23945if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23946 echo $ECHO_N "(cached) $ECHO_C" >&6
23947else
23948 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023949LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023950cat >conftest.$ac_ext <<_ACEOF
23951/* confdefs.h. */
23952_ACEOF
23953cat confdefs.h >>conftest.$ac_ext
23954cat >>conftest.$ac_ext <<_ACEOF
23955/* end confdefs.h. */
23956
23957/* Override any GCC internal prototype to avoid an error.
23958 Use char because int might match the return type of a GCC
23959 builtin and then its argument prototype would still apply. */
23960#ifdef __cplusplus
23961extern "C"
23962#endif
23963char rl_completion_display_matches_hook ();
23964int
23965main ()
23966{
23967return rl_completion_display_matches_hook ();
23968 ;
23969 return 0;
23970}
23971_ACEOF
23972rm -f conftest.$ac_objext conftest$ac_exeext
23973if { (ac_try="$ac_link"
23974case "(($ac_try" in
23975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23976 *) ac_try_echo=$ac_try;;
23977esac
23978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23979 (eval "$ac_link") 2>conftest.er1
23980 ac_status=$?
23981 grep -v '^ *+' conftest.er1 >conftest.err
23982 rm -f conftest.er1
23983 cat conftest.err >&5
23984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23985 (exit $ac_status); } && {
23986 test -z "$ac_c_werror_flag" ||
23987 test ! -s conftest.err
23988 } && test -s conftest$ac_exeext &&
23989 $as_test_x conftest$ac_exeext; then
23990 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23991else
23992 echo "$as_me: failed program was:" >&5
23993sed 's/^/| /' conftest.$ac_ext >&5
23994
23995 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23996fi
23997
23998rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23999 conftest$ac_exeext conftest.$ac_ext
24000LIBS=$ac_check_lib_save_LIBS
24001fi
24002{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24003echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24004if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
24005
24006cat >>confdefs.h <<\_ACEOF
24007#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24008_ACEOF
24009
24010fi
24011
24012
Martin v. Löwis0daad592001-09-30 21:09:59 +000024013# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000024014{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24015echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024016if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
24017 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024018else
Martin v. Löwis11437992002-04-12 09:54:03 +000024019 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000024020LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024022/* confdefs.h. */
24023_ACEOF
24024cat confdefs.h >>conftest.$ac_ext
24025cat >>conftest.$ac_ext <<_ACEOF
24026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024027
Martin v. Löwiseba40652007-08-30 20:10:57 +000024028/* Override any GCC internal prototype to avoid an error.
24029 Use char because int might match the return type of a GCC
24030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024031#ifdef __cplusplus
24032extern "C"
24033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024034char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024035int
24036main ()
24037{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024038return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024039 ;
24040 return 0;
24041}
24042_ACEOF
24043rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024044if { (ac_try="$ac_link"
24045case "(($ac_try" in
24046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24047 *) ac_try_echo=$ac_try;;
24048esac
24049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24050 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024052 grep -v '^ *+' conftest.er1 >conftest.err
24053 rm -f conftest.er1
24054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024056 (exit $ac_status); } && {
24057 test -z "$ac_c_werror_flag" ||
24058 test ! -s conftest.err
24059 } && test -s conftest$ac_exeext &&
24060 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024061 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024062else
Martin v. Löwis11437992002-04-12 09:54:03 +000024063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024064sed 's/^/| /' conftest.$ac_ext >&5
24065
Martin v. Löwiseba40652007-08-30 20:10:57 +000024066 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024068
24069rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024070 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024071LIBS=$ac_check_lib_save_LIBS
24072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024073{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24074echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024075if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024076
Martin v. Löwis11437992002-04-12 09:54:03 +000024077cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024078#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024079_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024080
Guido van Rossum353ae582001-07-10 16:45:32 +000024081fi
24082
Jack Jansendd19cf82001-12-06 22:36:17 +000024083
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024084# also in readline 4.2
24085cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024086/* confdefs.h. */
24087_ACEOF
24088cat confdefs.h >>conftest.$ac_ext
24089cat >>conftest.$ac_ext <<_ACEOF
24090/* end confdefs.h. */
24091#include <readline/readline.h>
24092_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024093if { (ac_try="$ac_cpp conftest.$ac_ext"
24094case "(($ac_try" in
24095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24096 *) ac_try_echo=$ac_try;;
24097esac
24098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24099 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024100 ac_status=$?
24101 grep -v '^ *+' conftest.er1 >conftest.err
24102 rm -f conftest.er1
24103 cat conftest.err >&5
24104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024105 (exit $ac_status); } >/dev/null && {
24106 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24107 test ! -s conftest.err
24108 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024109 have_readline=yes
24110else
24111 echo "$as_me: failed program was:" >&5
24112sed 's/^/| /' conftest.$ac_ext >&5
24113
24114 have_readline=no
24115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024116
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024117rm -f conftest.err conftest.$ac_ext
24118if test $have_readline = yes
24119then
24120 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024121/* confdefs.h. */
24122_ACEOF
24123cat confdefs.h >>conftest.$ac_ext
24124cat >>conftest.$ac_ext <<_ACEOF
24125/* end confdefs.h. */
24126#include <readline/readline.h>
24127
24128_ACEOF
24129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24130 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24131
24132cat >>confdefs.h <<\_ACEOF
24133#define HAVE_RL_CATCH_SIGNAL 1
24134_ACEOF
24135
24136fi
24137rm -f conftest*
24138
24139fi
24140
Martin v. Löwis82bca632006-02-10 20:49:30 +000024141# End of readline checks: restore LIBS
24142LIBS=$LIBS_no_readline
24143
Martin v. Löwiseba40652007-08-30 20:10:57 +000024144{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24145echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024146if test "${ac_cv_broken_nice+set}" = set; then
24147 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024148else
Martin v. Löwis11437992002-04-12 09:54:03 +000024149
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024150if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024151 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024152else
Martin v. Löwis11437992002-04-12 09:54:03 +000024153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024154/* confdefs.h. */
24155_ACEOF
24156cat confdefs.h >>conftest.$ac_ext
24157cat >>conftest.$ac_ext <<_ACEOF
24158/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024159
24160int main()
24161{
24162 int val1 = nice(1);
24163 if (val1 != -1 && val1 == nice(2))
24164 exit(0);
24165 exit(1);
24166}
24167
Martin v. Löwis11437992002-04-12 09:54:03 +000024168_ACEOF
24169rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024170if { (ac_try="$ac_link"
24171case "(($ac_try" in
24172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24173 *) ac_try_echo=$ac_try;;
24174esac
24175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24176 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024177 ac_status=$?
24178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024180 { (case "(($ac_try" in
24181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24182 *) ac_try_echo=$ac_try;;
24183esac
24184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24185 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024186 ac_status=$?
24187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24188 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024189 ac_cv_broken_nice=yes
24190else
Martin v. Löwis11437992002-04-12 09:54:03 +000024191 echo "$as_me: program exited with status $ac_status" >&5
24192echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024193sed 's/^/| /' conftest.$ac_ext >&5
24194
Martin v. Löwis11437992002-04-12 09:54:03 +000024195( exit $ac_status )
24196ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024198rm -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 +000024199fi
24200
Martin v. Löwiseba40652007-08-30 20:10:57 +000024201
24202fi
24203
24204{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24205echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024206if test "$ac_cv_broken_nice" = yes
24207then
Martin v. Löwis11437992002-04-12 09:54:03 +000024208
24209cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024210#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024211_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024212
24213fi
24214
Martin v. Löwiseba40652007-08-30 20:10:57 +000024215{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24216echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024217if test "$cross_compiling" = yes; then
24218 ac_cv_broken_poll=no
24219else
24220 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024221/* confdefs.h. */
24222_ACEOF
24223cat confdefs.h >>conftest.$ac_ext
24224cat >>conftest.$ac_ext <<_ACEOF
24225/* end confdefs.h. */
24226
24227#include <poll.h>
24228
24229int main (void)
24230 {
24231 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24232
24233 close (42);
24234
24235 int poll_test = poll (&poll_struct, 1, 0);
24236
24237 if (poll_test < 0)
24238 {
24239 exit(0);
24240 }
24241 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24242 {
24243 exit(0);
24244 }
24245 else
24246 {
24247 exit(1);
24248 }
24249 }
24250
24251_ACEOF
24252rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024253if { (ac_try="$ac_link"
24254case "(($ac_try" in
24255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24256 *) ac_try_echo=$ac_try;;
24257esac
24258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24259 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024260 ac_status=$?
24261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24262 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024263 { (case "(($ac_try" in
24264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24265 *) ac_try_echo=$ac_try;;
24266esac
24267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24268 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024269 ac_status=$?
24270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24271 (exit $ac_status); }; }; then
24272 ac_cv_broken_poll=yes
24273else
24274 echo "$as_me: program exited with status $ac_status" >&5
24275echo "$as_me: failed program was:" >&5
24276sed 's/^/| /' conftest.$ac_ext >&5
24277
24278( exit $ac_status )
24279ac_cv_broken_poll=no
24280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024281rm -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 +000024282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024283
24284
24285{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24286echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024287if test "$ac_cv_broken_poll" = yes
24288then
24289
24290cat >>confdefs.h <<\_ACEOF
24291#define HAVE_BROKEN_POLL 1
24292_ACEOF
24293
24294fi
24295
Brett Cannon43802422005-02-10 20:48:03 +000024296# 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 +000024297# (which is not required by ISO C or UNIX spec) and/or if we support
24298# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000024299{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24300echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024301if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
24302 echo $ECHO_N "(cached) $ECHO_C" >&6
24303else
24304 cat >conftest.$ac_ext <<_ACEOF
24305/* confdefs.h. */
24306_ACEOF
24307cat confdefs.h >>conftest.$ac_ext
24308cat >>conftest.$ac_ext <<_ACEOF
24309/* end confdefs.h. */
24310#include <sys/types.h>
24311#include <$ac_cv_struct_tm>
24312
24313
24314int
24315main ()
24316{
24317static struct tm ac_aggr;
24318if (ac_aggr.tm_zone)
24319return 0;
24320 ;
24321 return 0;
24322}
24323_ACEOF
24324rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024325if { (ac_try="$ac_compile"
24326case "(($ac_try" in
24327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24328 *) ac_try_echo=$ac_try;;
24329esac
24330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24331 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024332 ac_status=$?
24333 grep -v '^ *+' conftest.er1 >conftest.err
24334 rm -f conftest.er1
24335 cat conftest.err >&5
24336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024337 (exit $ac_status); } && {
24338 test -z "$ac_c_werror_flag" ||
24339 test ! -s conftest.err
24340 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024341 ac_cv_member_struct_tm_tm_zone=yes
24342else
24343 echo "$as_me: failed program was:" >&5
24344sed 's/^/| /' conftest.$ac_ext >&5
24345
Martin v. Löwiseba40652007-08-30 20:10:57 +000024346 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024347/* confdefs.h. */
24348_ACEOF
24349cat confdefs.h >>conftest.$ac_ext
24350cat >>conftest.$ac_ext <<_ACEOF
24351/* end confdefs.h. */
24352#include <sys/types.h>
24353#include <$ac_cv_struct_tm>
24354
24355
24356int
24357main ()
24358{
24359static struct tm ac_aggr;
24360if (sizeof ac_aggr.tm_zone)
24361return 0;
24362 ;
24363 return 0;
24364}
24365_ACEOF
24366rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024367if { (ac_try="$ac_compile"
24368case "(($ac_try" in
24369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24370 *) ac_try_echo=$ac_try;;
24371esac
24372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24373 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024374 ac_status=$?
24375 grep -v '^ *+' conftest.er1 >conftest.err
24376 rm -f conftest.er1
24377 cat conftest.err >&5
24378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024379 (exit $ac_status); } && {
24380 test -z "$ac_c_werror_flag" ||
24381 test ! -s conftest.err
24382 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024383 ac_cv_member_struct_tm_tm_zone=yes
24384else
24385 echo "$as_me: failed program was:" >&5
24386sed 's/^/| /' conftest.$ac_ext >&5
24387
Martin v. Löwiseba40652007-08-30 20:10:57 +000024388 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024390
24391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024393
24394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024396{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24397echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024398if test $ac_cv_member_struct_tm_tm_zone = yes; then
24399
24400cat >>confdefs.h <<_ACEOF
24401#define HAVE_STRUCT_TM_TM_ZONE 1
24402_ACEOF
24403
24404
24405fi
24406
24407if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24408
24409cat >>confdefs.h <<\_ACEOF
24410#define HAVE_TM_ZONE 1
24411_ACEOF
24412
24413else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024414 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24415echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24416if test "${ac_cv_have_decl_tzname+set}" = set; then
24417 echo $ECHO_N "(cached) $ECHO_C" >&6
24418else
24419 cat >conftest.$ac_ext <<_ACEOF
24420/* confdefs.h. */
24421_ACEOF
24422cat confdefs.h >>conftest.$ac_ext
24423cat >>conftest.$ac_ext <<_ACEOF
24424/* end confdefs.h. */
24425#include <time.h>
24426
24427int
24428main ()
24429{
24430#ifndef tzname
24431 (void) tzname;
24432#endif
24433
24434 ;
24435 return 0;
24436}
24437_ACEOF
24438rm -f conftest.$ac_objext
24439if { (ac_try="$ac_compile"
24440case "(($ac_try" in
24441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24442 *) ac_try_echo=$ac_try;;
24443esac
24444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24445 (eval "$ac_compile") 2>conftest.er1
24446 ac_status=$?
24447 grep -v '^ *+' conftest.er1 >conftest.err
24448 rm -f conftest.er1
24449 cat conftest.err >&5
24450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24451 (exit $ac_status); } && {
24452 test -z "$ac_c_werror_flag" ||
24453 test ! -s conftest.err
24454 } && test -s conftest.$ac_objext; then
24455 ac_cv_have_decl_tzname=yes
24456else
24457 echo "$as_me: failed program was:" >&5
24458sed 's/^/| /' conftest.$ac_ext >&5
24459
24460 ac_cv_have_decl_tzname=no
24461fi
24462
24463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24464fi
24465{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24466echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24467if test $ac_cv_have_decl_tzname = yes; then
24468
24469cat >>confdefs.h <<_ACEOF
24470#define HAVE_DECL_TZNAME 1
24471_ACEOF
24472
24473
24474else
24475 cat >>confdefs.h <<_ACEOF
24476#define HAVE_DECL_TZNAME 0
24477_ACEOF
24478
24479
24480fi
24481
24482
24483 { echo "$as_me:$LINENO: checking for tzname" >&5
24484echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024485if test "${ac_cv_var_tzname+set}" = set; then
24486 echo $ECHO_N "(cached) $ECHO_C" >&6
24487else
24488 cat >conftest.$ac_ext <<_ACEOF
24489/* confdefs.h. */
24490_ACEOF
24491cat confdefs.h >>conftest.$ac_ext
24492cat >>conftest.$ac_ext <<_ACEOF
24493/* end confdefs.h. */
24494#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000024495#if !HAVE_DECL_TZNAME
24496extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024497#endif
24498
24499int
24500main ()
24501{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024502return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024503 ;
24504 return 0;
24505}
24506_ACEOF
24507rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024508if { (ac_try="$ac_link"
24509case "(($ac_try" in
24510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24511 *) ac_try_echo=$ac_try;;
24512esac
24513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24514 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024515 ac_status=$?
24516 grep -v '^ *+' conftest.er1 >conftest.err
24517 rm -f conftest.er1
24518 cat conftest.err >&5
24519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024520 (exit $ac_status); } && {
24521 test -z "$ac_c_werror_flag" ||
24522 test ! -s conftest.err
24523 } && test -s conftest$ac_exeext &&
24524 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024525 ac_cv_var_tzname=yes
24526else
24527 echo "$as_me: failed program was:" >&5
24528sed 's/^/| /' conftest.$ac_ext >&5
24529
Martin v. Löwiseba40652007-08-30 20:10:57 +000024530 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024532
24533rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024534 conftest$ac_exeext conftest.$ac_ext
24535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024536{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24537echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024538 if test $ac_cv_var_tzname = yes; then
24539
24540cat >>confdefs.h <<\_ACEOF
24541#define HAVE_TZNAME 1
24542_ACEOF
24543
24544 fi
24545fi
24546
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024547
Martin v. Löwis1d459062005-03-14 21:23:33 +000024548# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000024549{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24550echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024551if test "${ac_cv_working_tzset+set}" = set; then
24552 echo $ECHO_N "(cached) $ECHO_C" >&6
24553else
24554
24555if test "$cross_compiling" = yes; then
24556 ac_cv_working_tzset=no
24557else
24558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024559/* confdefs.h. */
24560_ACEOF
24561cat confdefs.h >>conftest.$ac_ext
24562cat >>conftest.$ac_ext <<_ACEOF
24563/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024564
24565#include <stdlib.h>
24566#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024567#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024568
24569#if HAVE_TZNAME
24570extern char *tzname[];
24571#endif
24572
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024573int main()
24574{
Brett Cannon18367812003-09-19 00:59:16 +000024575 /* Note that we need to ensure that not only does tzset(3)
24576 do 'something' with localtime, but it works as documented
24577 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024578 This includes making sure that tzname is set properly if
24579 tm->tm_zone does not exist since it is the alternative way
24580 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024581
24582 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024583 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024584 */
24585
Martin v. Löwis1d459062005-03-14 21:23:33 +000024586 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024587 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24588
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024589 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024590 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024591 if (localtime(&groundhogday)->tm_hour != 0)
24592 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024593#if HAVE_TZNAME
24594 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24595 if (strcmp(tzname[0], "UTC") ||
24596 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24597 exit(1);
24598#endif
Brett Cannon18367812003-09-19 00:59:16 +000024599
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024600 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024601 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024602 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024603 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024604#if HAVE_TZNAME
24605 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24606 exit(1);
24607#endif
Brett Cannon18367812003-09-19 00:59:16 +000024608
24609 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24610 tzset();
24611 if (localtime(&groundhogday)->tm_hour != 11)
24612 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024613#if HAVE_TZNAME
24614 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24615 exit(1);
24616#endif
24617
24618#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024619 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24620 exit(1);
24621 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24622 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024623#endif
Brett Cannon18367812003-09-19 00:59:16 +000024624
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024625 exit(0);
24626}
24627
24628_ACEOF
24629rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024630if { (ac_try="$ac_link"
24631case "(($ac_try" in
24632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24633 *) ac_try_echo=$ac_try;;
24634esac
24635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24636 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024637 ac_status=$?
24638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24639 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024640 { (case "(($ac_try" in
24641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24642 *) ac_try_echo=$ac_try;;
24643esac
24644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24645 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024646 ac_status=$?
24647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24648 (exit $ac_status); }; }; then
24649 ac_cv_working_tzset=yes
24650else
24651 echo "$as_me: program exited with status $ac_status" >&5
24652echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024653sed 's/^/| /' conftest.$ac_ext >&5
24654
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024655( exit $ac_status )
24656ac_cv_working_tzset=no
24657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024658rm -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 +000024659fi
24660
Martin v. Löwiseba40652007-08-30 20:10:57 +000024661
24662fi
24663
24664{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24665echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024666if test "$ac_cv_working_tzset" = yes
24667then
24668
24669cat >>confdefs.h <<\_ACEOF
24670#define HAVE_WORKING_TZSET 1
24671_ACEOF
24672
24673fi
24674
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024675# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024676{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24677echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024678if test "${ac_cv_stat_tv_nsec+set}" = set; then
24679 echo $ECHO_N "(cached) $ECHO_C" >&6
24680else
24681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024682/* confdefs.h. */
24683_ACEOF
24684cat confdefs.h >>conftest.$ac_ext
24685cat >>conftest.$ac_ext <<_ACEOF
24686/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024687#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024688int
24689main ()
24690{
24691
24692struct stat st;
24693st.st_mtim.tv_nsec = 1;
24694
24695 ;
24696 return 0;
24697}
24698_ACEOF
24699rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024700if { (ac_try="$ac_compile"
24701case "(($ac_try" in
24702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24703 *) ac_try_echo=$ac_try;;
24704esac
24705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24706 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024708 grep -v '^ *+' conftest.er1 >conftest.err
24709 rm -f conftest.er1
24710 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024712 (exit $ac_status); } && {
24713 test -z "$ac_c_werror_flag" ||
24714 test ! -s conftest.err
24715 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024716 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024717else
24718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024719sed 's/^/| /' conftest.$ac_ext >&5
24720
Martin v. Löwiseba40652007-08-30 20:10:57 +000024721 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024722fi
24723
Martin v. Löwiseba40652007-08-30 20:10:57 +000024724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24725fi
24726
24727{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24728echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024729if test "$ac_cv_stat_tv_nsec" = yes
24730then
24731
24732cat >>confdefs.h <<\_ACEOF
24733#define HAVE_STAT_TV_NSEC 1
24734_ACEOF
24735
24736fi
24737
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024738# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024739{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24740echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024741if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24742 echo $ECHO_N "(cached) $ECHO_C" >&6
24743else
24744 cat >conftest.$ac_ext <<_ACEOF
24745/* confdefs.h. */
24746_ACEOF
24747cat confdefs.h >>conftest.$ac_ext
24748cat >>conftest.$ac_ext <<_ACEOF
24749/* end confdefs.h. */
24750#include <sys/stat.h>
24751int
24752main ()
24753{
24754
24755struct stat st;
24756st.st_mtimespec.tv_nsec = 1;
24757
24758 ;
24759 return 0;
24760}
24761_ACEOF
24762rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024763if { (ac_try="$ac_compile"
24764case "(($ac_try" in
24765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24766 *) ac_try_echo=$ac_try;;
24767esac
24768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024770 ac_status=$?
24771 grep -v '^ *+' conftest.er1 >conftest.err
24772 rm -f conftest.er1
24773 cat conftest.err >&5
24774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024775 (exit $ac_status); } && {
24776 test -z "$ac_c_werror_flag" ||
24777 test ! -s conftest.err
24778 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024779 ac_cv_stat_tv_nsec2=yes
24780else
24781 echo "$as_me: failed program was:" >&5
24782sed 's/^/| /' conftest.$ac_ext >&5
24783
Martin v. Löwiseba40652007-08-30 20:10:57 +000024784 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024785fi
24786
Martin v. Löwiseba40652007-08-30 20:10:57 +000024787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24788fi
24789
24790{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24791echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024792if test "$ac_cv_stat_tv_nsec2" = yes
24793then
24794
24795cat >>confdefs.h <<\_ACEOF
24796#define HAVE_STAT_TV_NSEC2 1
24797_ACEOF
24798
24799fi
24800
Jack Jansen666b1e72001-10-31 12:11:48 +000024801# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024802{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24803echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024804if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24805 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024806else
Martin v. Löwis11437992002-04-12 09:54:03 +000024807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024808/* confdefs.h. */
24809_ACEOF
24810cat confdefs.h >>conftest.$ac_ext
24811cat >>conftest.$ac_ext <<_ACEOF
24812/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024813#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024814int
24815main ()
24816{
Jack Jansen666b1e72001-10-31 12:11:48 +000024817
24818 int rtn;
24819 rtn = mvwdelch(0,0,0);
24820
Martin v. Löwis11437992002-04-12 09:54:03 +000024821 ;
24822 return 0;
24823}
24824_ACEOF
24825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024826if { (ac_try="$ac_compile"
24827case "(($ac_try" in
24828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24829 *) ac_try_echo=$ac_try;;
24830esac
24831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024834 grep -v '^ *+' conftest.er1 >conftest.err
24835 rm -f conftest.er1
24836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024838 (exit $ac_status); } && {
24839 test -z "$ac_c_werror_flag" ||
24840 test ! -s conftest.err
24841 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024842 ac_cv_mvwdelch_is_expression=yes
24843else
Martin v. Löwis11437992002-04-12 09:54:03 +000024844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024845sed 's/^/| /' conftest.$ac_ext >&5
24846
Martin v. Löwiseba40652007-08-30 20:10:57 +000024847 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024848fi
24849
Martin v. Löwiseba40652007-08-30 20:10:57 +000024850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24851fi
24852
24853{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24854echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024855
24856if test "$ac_cv_mvwdelch_is_expression" = yes
24857then
Martin v. Löwis11437992002-04-12 09:54:03 +000024858
24859cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024860#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024861_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024862
24863fi
24864
Martin v. Löwiseba40652007-08-30 20:10:57 +000024865{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24866echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024867if test "${ac_cv_window_has_flags+set}" = set; then
24868 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024869else
Martin v. Löwis11437992002-04-12 09:54:03 +000024870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024871/* confdefs.h. */
24872_ACEOF
24873cat confdefs.h >>conftest.$ac_ext
24874cat >>conftest.$ac_ext <<_ACEOF
24875/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024876#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024877int
24878main ()
24879{
Jack Jansen666b1e72001-10-31 12:11:48 +000024880
24881 WINDOW *w;
24882 w->_flags = 0;
24883
Martin v. Löwis11437992002-04-12 09:54:03 +000024884 ;
24885 return 0;
24886}
24887_ACEOF
24888rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889if { (ac_try="$ac_compile"
24890case "(($ac_try" in
24891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24892 *) ac_try_echo=$ac_try;;
24893esac
24894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024897 grep -v '^ *+' conftest.er1 >conftest.err
24898 rm -f conftest.er1
24899 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024901 (exit $ac_status); } && {
24902 test -z "$ac_c_werror_flag" ||
24903 test ! -s conftest.err
24904 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024905 ac_cv_window_has_flags=yes
24906else
Martin v. Löwis11437992002-04-12 09:54:03 +000024907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024908sed 's/^/| /' conftest.$ac_ext >&5
24909
Martin v. Löwiseba40652007-08-30 20:10:57 +000024910 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024911fi
24912
Martin v. Löwiseba40652007-08-30 20:10:57 +000024913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24914fi
24915
24916{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24917echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024918
Jack Jansen666b1e72001-10-31 12:11:48 +000024919
24920if test "$ac_cv_window_has_flags" = yes
24921then
Martin v. Löwis11437992002-04-12 09:54:03 +000024922
24923cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024924#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024925_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024926
24927fi
24928
Martin v. Löwiseba40652007-08-30 20:10:57 +000024929{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24930echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024931cat >conftest.$ac_ext <<_ACEOF
24932/* confdefs.h. */
24933_ACEOF
24934cat confdefs.h >>conftest.$ac_ext
24935cat >>conftest.$ac_ext <<_ACEOF
24936/* end confdefs.h. */
24937#include <curses.h>
24938int
24939main ()
24940{
24941void *x=is_term_resized
24942 ;
24943 return 0;
24944}
24945_ACEOF
24946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024947if { (ac_try="$ac_compile"
24948case "(($ac_try" in
24949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24950 *) ac_try_echo=$ac_try;;
24951esac
24952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24953 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024954 ac_status=$?
24955 grep -v '^ *+' conftest.er1 >conftest.err
24956 rm -f conftest.er1
24957 cat conftest.err >&5
24958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024959 (exit $ac_status); } && {
24960 test -z "$ac_c_werror_flag" ||
24961 test ! -s conftest.err
24962 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024963
24964cat >>confdefs.h <<\_ACEOF
24965#define HAVE_CURSES_IS_TERM_RESIZED 1
24966_ACEOF
24967
Martin v. Löwiseba40652007-08-30 20:10:57 +000024968 { echo "$as_me:$LINENO: result: yes" >&5
24969echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024970else
24971 echo "$as_me: failed program was:" >&5
24972sed 's/^/| /' conftest.$ac_ext >&5
24973
Martin v. Löwiseba40652007-08-30 20:10:57 +000024974 { echo "$as_me:$LINENO: result: no" >&5
24975echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024976
24977fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024978
Martin v. Löwiseba40652007-08-30 20:10:57 +000024979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24980
24981{ echo "$as_me:$LINENO: checking for resize_term" >&5
24982echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024983cat >conftest.$ac_ext <<_ACEOF
24984/* confdefs.h. */
24985_ACEOF
24986cat confdefs.h >>conftest.$ac_ext
24987cat >>conftest.$ac_ext <<_ACEOF
24988/* end confdefs.h. */
24989#include <curses.h>
24990int
24991main ()
24992{
24993void *x=resize_term
24994 ;
24995 return 0;
24996}
24997_ACEOF
24998rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024999if { (ac_try="$ac_compile"
25000case "(($ac_try" in
25001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25002 *) ac_try_echo=$ac_try;;
25003esac
25004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25005 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000025006 ac_status=$?
25007 grep -v '^ *+' conftest.er1 >conftest.err
25008 rm -f conftest.er1
25009 cat conftest.err >&5
25010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025011 (exit $ac_status); } && {
25012 test -z "$ac_c_werror_flag" ||
25013 test ! -s conftest.err
25014 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000025015
25016cat >>confdefs.h <<\_ACEOF
25017#define HAVE_CURSES_RESIZE_TERM 1
25018_ACEOF
25019
Martin v. Löwiseba40652007-08-30 20:10:57 +000025020 { echo "$as_me:$LINENO: result: yes" >&5
25021echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025022else
25023 echo "$as_me: failed program was:" >&5
25024sed 's/^/| /' conftest.$ac_ext >&5
25025
Martin v. Löwiseba40652007-08-30 20:10:57 +000025026 { echo "$as_me:$LINENO: result: no" >&5
25027echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025028
25029fi
Walter Dörwald4994d952006-06-19 08:07:50 +000025030
Martin v. Löwiseba40652007-08-30 20:10:57 +000025031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25032
25033{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25034echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025035cat >conftest.$ac_ext <<_ACEOF
25036/* confdefs.h. */
25037_ACEOF
25038cat confdefs.h >>conftest.$ac_ext
25039cat >>conftest.$ac_ext <<_ACEOF
25040/* end confdefs.h. */
25041#include <curses.h>
25042int
25043main ()
25044{
25045void *x=resizeterm
25046 ;
25047 return 0;
25048}
25049_ACEOF
25050rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025051if { (ac_try="$ac_compile"
25052case "(($ac_try" in
25053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25054 *) ac_try_echo=$ac_try;;
25055esac
25056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25057 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000025058 ac_status=$?
25059 grep -v '^ *+' conftest.er1 >conftest.err
25060 rm -f conftest.er1
25061 cat conftest.err >&5
25062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025063 (exit $ac_status); } && {
25064 test -z "$ac_c_werror_flag" ||
25065 test ! -s conftest.err
25066 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000025067
25068cat >>confdefs.h <<\_ACEOF
25069#define HAVE_CURSES_RESIZETERM 1
25070_ACEOF
25071
Martin v. Löwiseba40652007-08-30 20:10:57 +000025072 { echo "$as_me:$LINENO: result: yes" >&5
25073echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025074else
25075 echo "$as_me: failed program was:" >&5
25076sed 's/^/| /' conftest.$ac_ext >&5
25077
Martin v. Löwiseba40652007-08-30 20:10:57 +000025078 { echo "$as_me:$LINENO: result: no" >&5
25079echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025080
25081fi
Walter Dörwald4994d952006-06-19 08:07:50 +000025082
Martin v. Löwiseba40652007-08-30 20:10:57 +000025083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25084
25085{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25086echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025087
25088if test -r /dev/ptmx
25089then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025090 { echo "$as_me:$LINENO: result: yes" >&5
25091echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025092
25093cat >>confdefs.h <<\_ACEOF
25094#define HAVE_DEV_PTMX 1
25095_ACEOF
25096
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025097else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025098 { echo "$as_me:$LINENO: result: no" >&5
25099echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025100fi
25101
Martin v. Löwiseba40652007-08-30 20:10:57 +000025102{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25103echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025104
25105if test -r /dev/ptc
25106then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025107 { echo "$as_me:$LINENO: result: yes" >&5
25108echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025109
25110cat >>confdefs.h <<\_ACEOF
25111#define HAVE_DEV_PTC 1
25112_ACEOF
25113
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025114else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025115 { echo "$as_me:$LINENO: result: no" >&5
25116echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025117fi
25118
Martin v. Löwiseba40652007-08-30 20:10:57 +000025119{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25120echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025121if test "$cross_compiling" = yes; then
25122 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
25123See \`config.log' for more details." >&5
25124echo "$as_me: error: cannot run test program while cross compiling
25125See \`config.log' for more details." >&2;}
25126 { (exit 1); exit 1; }; }
25127else
25128 cat >conftest.$ac_ext <<_ACEOF
25129/* confdefs.h. */
25130_ACEOF
25131cat confdefs.h >>conftest.$ac_ext
25132cat >>conftest.$ac_ext <<_ACEOF
25133/* end confdefs.h. */
25134#include <stdio.h>
25135#include <stddef.h>
25136#include <string.h>
25137
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025138#ifdef HAVE_SYS_TYPES_H
25139#include <sys/types.h>
25140#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025141
25142#ifdef HAVE_SSIZE_T
25143typedef ssize_t Py_ssize_t;
25144#elif SIZEOF_VOID_P == SIZEOF_LONG
25145typedef long Py_ssize_t;
25146#else
25147typedef int Py_ssize_t;
25148#endif
Brett Cannon09d12362006-05-11 05:11:33 +000025149
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025150int main()
25151{
25152 char buffer[256];
25153
Brett Cannon09d12362006-05-11 05:11:33 +000025154 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25155 return 1;
25156
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025157 if (strcmp(buffer, "123"))
25158 return 1;
25159
25160 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25161 return 1;
25162
25163 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000025164 return 1;
25165
25166 return 0;
25167}
25168_ACEOF
25169rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025170if { (ac_try="$ac_link"
25171case "(($ac_try" in
25172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25173 *) ac_try_echo=$ac_try;;
25174esac
25175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25176 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025177 ac_status=$?
25178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025180 { (case "(($ac_try" in
25181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25182 *) ac_try_echo=$ac_try;;
25183esac
25184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25185 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025186 ac_status=$?
25187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25188 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025189 { echo "$as_me:$LINENO: result: yes" >&5
25190echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025191
25192cat >>confdefs.h <<\_ACEOF
25193#define PY_FORMAT_SIZE_T "z"
25194_ACEOF
25195
25196else
25197 echo "$as_me: program exited with status $ac_status" >&5
25198echo "$as_me: failed program was:" >&5
25199sed 's/^/| /' conftest.$ac_ext >&5
25200
25201( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025202{ echo "$as_me:$LINENO: result: no" >&5
25203echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025205rm -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 +000025206fi
25207
Martin v. Löwiseba40652007-08-30 20:10:57 +000025208
25209
25210{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25211echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025212if test "${ac_cv_type_socklen_t+set}" = set; then
25213 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025214else
Martin v. Löwis11437992002-04-12 09:54:03 +000025215 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025216/* confdefs.h. */
25217_ACEOF
25218cat confdefs.h >>conftest.$ac_ext
25219cat >>conftest.$ac_ext <<_ACEOF
25220/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025221
25222#ifdef HAVE_SYS_TYPES_H
25223#include <sys/types.h>
25224#endif
25225#ifdef HAVE_SYS_SOCKET_H
25226#include <sys/socket.h>
25227#endif
25228
25229
Martin v. Löwiseba40652007-08-30 20:10:57 +000025230typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025231int
25232main ()
25233{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025234if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025235 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025236if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000025237 return 0;
25238 ;
25239 return 0;
25240}
25241_ACEOF
25242rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025243if { (ac_try="$ac_compile"
25244case "(($ac_try" in
25245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25246 *) ac_try_echo=$ac_try;;
25247esac
25248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025251 grep -v '^ *+' conftest.er1 >conftest.err
25252 rm -f conftest.er1
25253 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025255 (exit $ac_status); } && {
25256 test -z "$ac_c_werror_flag" ||
25257 test ! -s conftest.err
25258 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000025259 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025260else
Martin v. Löwis11437992002-04-12 09:54:03 +000025261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025262sed 's/^/| /' conftest.$ac_ext >&5
25263
Martin v. Löwiseba40652007-08-30 20:10:57 +000025264 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025266
25267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025269{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25270echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025271if test $ac_cv_type_socklen_t = yes; then
25272 :
25273else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025274
Martin v. Löwis01c04012002-11-11 14:58:44 +000025275cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025276#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025277_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025278
25279fi
25280
Michael W. Hudson54241132001-12-07 15:38:26 +000025281
Michael W. Hudson54241132001-12-07 15:38:26 +000025282
25283
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025284for h in `(cd $srcdir;echo Python/thread_*.h)`
25285do
25286 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25287done
25288
Michael W. Hudson54241132001-12-07 15:38:26 +000025289
Neal Norwitzd24499d2005-12-18 21:36:39 +000025290SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025291{ echo "$as_me:$LINENO: checking for build directories" >&5
25292echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025293for dir in $SRCDIRS; do
25294 if test ! -d $dir; then
25295 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025296 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025297done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025298{ echo "$as_me:$LINENO: result: done" >&5
25299echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025300
Guido van Rossum627b2d71993-12-24 10:39:16 +000025301# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000025302ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025303
Martin v. Löwis11437992002-04-12 09:54:03 +000025304cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025305# This file is a shell script that caches the results of configure
25306# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025307# scripts and configure runs, see configure's option --config-cache.
25308# It is not useful on other systems. If it contains results you don't
25309# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025310#
Martin v. Löwis11437992002-04-12 09:54:03 +000025311# config.status only pays attention to the cache file if you give it
25312# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025313#
Skip Montanaro6dead952003-09-25 14:50:04 +000025314# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025315# loading this file, other *unset* `ac_cv_foo' will be assigned the
25316# following values.
25317
25318_ACEOF
25319
Guido van Rossumf78abae1997-01-21 22:02:36 +000025320# The following way of writing the cache mishandles newlines in values,
25321# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025322# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025323# Ultrix sh set writes to stderr and can't be redirected directly,
25324# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025325(
25326 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25327 eval ac_val=\$$ac_var
25328 case $ac_val in #(
25329 *${as_nl}*)
25330 case $ac_var in #(
25331 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25332echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
25333 esac
25334 case $ac_var in #(
25335 _ | IFS | as_nl) ;; #(
25336 *) $as_unset $ac_var ;;
25337 esac ;;
25338 esac
25339 done
25340
Martin v. Löwis11437992002-04-12 09:54:03 +000025341 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025342 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25343 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025344 # `set' does not quote correctly, so add quotes (double-quote
25345 # substitution turns \\\\ into \\, and sed turns \\ into \).
25346 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025347 "s/'/'\\\\''/g;
25348 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025349 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025350 *)
25351 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025352 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025353 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025354 esac |
25355 sort
25356) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025357 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025358 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025359 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000025360 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025361 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25362 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000025363 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25364 :end' >>confcache
25365if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25366 if test -w "$cache_file"; then
25367 test "x$cache_file" != "x/dev/null" &&
25368 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25369echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025370 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025371 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025372 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25373echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025374 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025375fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025376rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025377
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025378test "x$prefix" = xNONE && prefix=$ac_default_prefix
25379# Let make expand exec_prefix.
25380test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025381
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025382DEFS=-DHAVE_CONFIG_H
25383
Skip Montanaro6dead952003-09-25 14:50:04 +000025384ac_libobjs=
25385ac_ltlibobjs=
25386for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25387 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025388 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25389 ac_i=`echo "$ac_i" | sed "$ac_script"`
25390 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25391 # will be set to the directory where LIBOBJS objects are built.
25392 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25393 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025394done
25395LIBOBJS=$ac_libobjs
25396
25397LTLIBOBJS=$ac_ltlibobjs
25398
25399
Martin v. Löwis11437992002-04-12 09:54:03 +000025400
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025401: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025402ac_clean_files_save=$ac_clean_files
25403ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25404{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25405echo "$as_me: creating $CONFIG_STATUS" >&6;}
25406cat >$CONFIG_STATUS <<_ACEOF
25407#! $SHELL
25408# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025409# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025410# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025411# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025412
Martin v. Löwis11437992002-04-12 09:54:03 +000025413debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025414ac_cs_recheck=false
25415ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025416SHELL=\${CONFIG_SHELL-$SHELL}
25417_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025418
Martin v. Löwis11437992002-04-12 09:54:03 +000025419cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025420## --------------------- ##
25421## M4sh Initialization. ##
25422## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025423
Martin v. Löwiseba40652007-08-30 20:10:57 +000025424# Be more Bourne compatible
25425DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025426if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25427 emulate sh
25428 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025429 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25430 # is contrary to our usage. Disable this feature.
25431 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025432 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025433else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025434 case `(set -o) 2>/dev/null` in
25435 *posix*) set -o posix ;;
25436esac
25437
Martin v. Löwis11437992002-04-12 09:54:03 +000025438fi
Michael W. Hudson54241132001-12-07 15:38:26 +000025439
Skip Montanaro6dead952003-09-25 14:50:04 +000025440
Martin v. Löwis11437992002-04-12 09:54:03 +000025441
25442
Martin v. Löwiseba40652007-08-30 20:10:57 +000025443# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025444# Avoid depending upon Character Ranges.
25445as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25446as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25447as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25448as_cr_digits='0123456789'
25449as_cr_alnum=$as_cr_Letters$as_cr_digits
25450
25451# The user is always right.
25452if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000025453 echo "#! /bin/sh" >conf$$.sh
25454 echo "exit 0" >>conf$$.sh
25455 chmod +x conf$$.sh
25456 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025457 PATH_SEPARATOR=';'
25458 else
25459 PATH_SEPARATOR=:
25460 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000025461 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025462fi
25463
Martin v. Löwiseba40652007-08-30 20:10:57 +000025464# Support unset when possible.
25465if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25466 as_unset=unset
25467else
25468 as_unset=false
25469fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025470
Martin v. Löwiseba40652007-08-30 20:10:57 +000025471
25472# IFS
25473# We need space, tab and new line, in precisely that order. Quoting is
25474# there to prevent editors from complaining about space-tab.
25475# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25476# splitting by setting IFS to empty value.)
25477as_nl='
25478'
25479IFS=" "" $as_nl"
25480
25481# Find who we are. Look in the path if we contain no directory separator.
25482case $0 in
25483 *[\\/]* ) as_myself=$0 ;;
25484 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025485for as_dir in $PATH
25486do
25487 IFS=$as_save_IFS
25488 test -z "$as_dir" && as_dir=.
25489 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25490done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025491IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025492
Martin v. Löwiseba40652007-08-30 20:10:57 +000025493 ;;
25494esac
25495# We did not find ourselves, most probably we were run as `sh COMMAND'
25496# in which case we are not to be found in the path.
25497if test "x$as_myself" = x; then
25498 as_myself=$0
25499fi
25500if test ! -f "$as_myself"; then
25501 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25502 { (exit 1); exit 1; }
25503fi
25504
25505# Work around bugs in pre-3.0 UWIN ksh.
25506for as_var in ENV MAIL MAILPATH
25507do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25508done
25509PS1='$ '
25510PS2='> '
25511PS4='+ '
25512
25513# NLS nuisances.
25514for as_var in \
25515 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25516 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25517 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000025518do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025519 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25520 eval $as_var=C; export $as_var
25521 else
25522 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25523 fi
25524done
25525
25526# Required to use basename.
25527if expr a : '\(a\)' >/dev/null 2>&1 &&
25528 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25529 as_expr=expr
25530else
25531 as_expr=false
25532fi
25533
25534if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25535 as_basename=basename
25536else
25537 as_basename=false
25538fi
25539
25540
25541# Name of the executable.
25542as_me=`$as_basename -- "$0" ||
25543$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25544 X"$0" : 'X\(//\)$' \| \
25545 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25546echo X/"$0" |
25547 sed '/^.*\/\([^/][^/]*\)\/*$/{
25548 s//\1/
25549 q
25550 }
25551 /^X\/\(\/\/\)$/{
25552 s//\1/
25553 q
25554 }
25555 /^X\/\(\/\).*/{
25556 s//\1/
25557 q
25558 }
25559 s/.*/./; q'`
25560
25561# CDPATH.
25562$as_unset CDPATH
25563
25564
25565
Martin v. Löwis11437992002-04-12 09:54:03 +000025566 as_lineno_1=$LINENO
25567 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025568 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025569 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025570
Martin v. Löwis11437992002-04-12 09:54:03 +000025571 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25572 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000025573 # line-number line after each line using $LINENO; the second 'sed'
25574 # does the real work. The second script uses 'N' to pair each
25575 # line-number line with the line containing $LINENO, and appends
25576 # trailing '-' during substitution so that $LINENO is not a special
25577 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025578 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025579 # scripts with optimization help from Paolo Bonzini. Blame Lee
25580 # E. McMahon (1931-1989) for sed's syntax. :-)
25581 sed -n '
25582 p
25583 /[$]LINENO/=
25584 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025585 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025586 s/[$]LINENO.*/&-/
25587 t lineno
25588 b
25589 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025590 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000025591 :loop
25592 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025593 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000025594 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025595 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025596 chmod +x "$as_me.lineno" ||
25597 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025598 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025599
Martin v. Löwis11437992002-04-12 09:54:03 +000025600 # Don't try to exec as it changes $[0], causing all sort of problems
25601 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025602 # original and so on. Autoconf is especially sensitive to this).
25603 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025604 # Exit status is that of the last command.
25605 exit
25606}
25607
25608
Martin v. Löwiseba40652007-08-30 20:10:57 +000025609if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25610 as_dirname=dirname
25611else
25612 as_dirname=false
25613fi
25614
25615ECHO_C= ECHO_N= ECHO_T=
25616case `echo -n x` in
25617-n*)
25618 case `echo 'x\c'` in
25619 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25620 *) ECHO_C='\c';;
25621 esac;;
25622*)
25623 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025624esac
25625
Martin v. Löwiseba40652007-08-30 20:10:57 +000025626if expr a : '\(a\)' >/dev/null 2>&1 &&
25627 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025628 as_expr=expr
25629else
25630 as_expr=false
25631fi
25632
25633rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025634if test -d conf$$.dir; then
25635 rm -f conf$$.dir/conf$$.file
25636else
25637 rm -f conf$$.dir
25638 mkdir conf$$.dir
25639fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025640echo >conf$$.file
25641if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025642 as_ln_s='ln -s'
25643 # ... but there are two gotchas:
25644 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25645 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25646 # In both cases, we have to default to `cp -p'.
25647 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025648 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025649elif ln conf$$.file conf$$ 2>/dev/null; then
25650 as_ln_s=ln
25651else
25652 as_ln_s='cp -p'
25653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025654rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25655rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025656
Skip Montanaro6dead952003-09-25 14:50:04 +000025657if mkdir -p . 2>/dev/null; then
25658 as_mkdir_p=:
25659else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025660 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025661 as_mkdir_p=false
25662fi
25663
Martin v. Löwiseba40652007-08-30 20:10:57 +000025664if test -x / >/dev/null 2>&1; then
25665 as_test_x='test -x'
25666else
25667 if ls -dL / >/dev/null 2>&1; then
25668 as_ls_L_option=L
25669 else
25670 as_ls_L_option=
25671 fi
25672 as_test_x='
25673 eval sh -c '\''
25674 if test -d "$1"; then
25675 test -d "$1/.";
25676 else
25677 case $1 in
25678 -*)set "./$1";;
25679 esac;
25680 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25681 ???[sx]*):;;*)false;;esac;fi
25682 '\'' sh
25683 '
25684fi
25685as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025686
25687# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025688as_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 +000025689
25690# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025691as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025692
25693
Martin v. Löwis11437992002-04-12 09:54:03 +000025694exec 6>&1
25695
Martin v. Löwiseba40652007-08-30 20:10:57 +000025696# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025697# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025698# values after options handling.
25699ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000025700This file was extended by python $as_me 2.7, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025701generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025702
25703 CONFIG_FILES = $CONFIG_FILES
25704 CONFIG_HEADERS = $CONFIG_HEADERS
25705 CONFIG_LINKS = $CONFIG_LINKS
25706 CONFIG_COMMANDS = $CONFIG_COMMANDS
25707 $ $0 $@
25708
Martin v. Löwiseba40652007-08-30 20:10:57 +000025709on `(hostname || uname -n) 2>/dev/null | sed 1q`
25710"
25711
Martin v. Löwis11437992002-04-12 09:54:03 +000025712_ACEOF
25713
Martin v. Löwiseba40652007-08-30 20:10:57 +000025714cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025715# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025716config_files="$ac_config_files"
25717config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025718
Martin v. Löwiseba40652007-08-30 20:10:57 +000025719_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025720
25721cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025722ac_cs_usage="\
25723\`$as_me' instantiates files from templates according to the
25724current configuration.
25725
25726Usage: $0 [OPTIONS] [FILE]...
25727
25728 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025729 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025730 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025731 -d, --debug don't remove temporary files
25732 --recheck update $as_me by reconfiguring in the same conditions
25733 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025734 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025735 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025736 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025737
25738Configuration files:
25739$config_files
25740
25741Configuration headers:
25742$config_headers
25743
25744Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025745
Martin v. Löwiseba40652007-08-30 20:10:57 +000025746_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025747cat >>$CONFIG_STATUS <<_ACEOF
25748ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000025749python config.status 2.7
Martin v. Löwiseba40652007-08-30 20:10:57 +000025750configured by $0, generated by GNU Autoconf 2.61,
25751 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025752
Martin v. Löwiseba40652007-08-30 20:10:57 +000025753Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025754This config.status script is free software; the Free Software Foundation
25755gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025756
25757ac_pwd='$ac_pwd'
25758srcdir='$srcdir'
25759INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025760_ACEOF
25761
25762cat >>$CONFIG_STATUS <<\_ACEOF
25763# If no file are specified by the user, then we need to provide default
25764# value. By we need to know if files were specified by the user.
25765ac_need_defaults=:
25766while test $# != 0
25767do
25768 case $1 in
25769 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025770 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25771 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025772 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025773 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025774 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025775 ac_option=$1
25776 ac_optarg=$2
25777 ac_shift=shift
25778 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025779 esac
25780
Skip Montanaro6dead952003-09-25 14:50:04 +000025781 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025782 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025783 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25784 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025785 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25786 echo "$ac_cs_version"; exit ;;
25787 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025788 debug=: ;;
25789 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025790 $ac_shift
25791 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025792 ac_need_defaults=false;;
25793 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025794 $ac_shift
25795 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025796 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025797 --he | --h)
25798 # Conflict between --help and --header
25799 { echo "$as_me: error: ambiguous option: $1
25800Try \`$0 --help' for more information." >&2
25801 { (exit 1); exit 1; }; };;
25802 --help | --hel | -h )
25803 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025804 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25805 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25806 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025807
25808 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025809 -*) { echo "$as_me: error: unrecognized option: $1
25810Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025811 { (exit 1); exit 1; }; } ;;
25812
Martin v. Löwiseba40652007-08-30 20:10:57 +000025813 *) ac_config_targets="$ac_config_targets $1"
25814 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025815
25816 esac
25817 shift
25818done
25819
Skip Montanaro6dead952003-09-25 14:50:04 +000025820ac_configure_extra_args=
25821
25822if $ac_cs_silent; then
25823 exec 6>/dev/null
25824 ac_configure_extra_args="$ac_configure_extra_args --silent"
25825fi
25826
25827_ACEOF
25828cat >>$CONFIG_STATUS <<_ACEOF
25829if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025830 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25831 CONFIG_SHELL=$SHELL
25832 export CONFIG_SHELL
25833 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025834fi
25835
Martin v. Löwis11437992002-04-12 09:54:03 +000025836_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025837cat >>$CONFIG_STATUS <<\_ACEOF
25838exec 5>>config.log
25839{
25840 echo
25841 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25842## Running $as_me. ##
25843_ASBOX
25844 echo "$ac_log"
25845} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025846
Martin v. Löwiseba40652007-08-30 20:10:57 +000025847_ACEOF
25848cat >>$CONFIG_STATUS <<_ACEOF
25849_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025850
25851cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025852
25853# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025854for ac_config_target in $ac_config_targets
25855do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025856 case $ac_config_target in
25857 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25858 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25859 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25860 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025861 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25862 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025863 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25864 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25865
Martin v. Löwis11437992002-04-12 09:54:03 +000025866 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25867echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25868 { (exit 1); exit 1; }; };;
25869 esac
25870done
25871
Martin v. Löwiseba40652007-08-30 20:10:57 +000025872
Martin v. Löwis11437992002-04-12 09:54:03 +000025873# If the user did not use the arguments to specify the items to instantiate,
25874# then the envvar interface is used. Set only those that are not.
25875# We use the long form for the default assignment because of an extremely
25876# bizarre bug on SunOS 4.1.3.
25877if $ac_need_defaults; then
25878 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25879 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25880fi
25881
Skip Montanaro6dead952003-09-25 14:50:04 +000025882# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025883# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025884# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025885# Hook for its removal unless debugging.
25886# Note that there is a small window in which the directory will not be cleaned:
25887# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025888$debug ||
25889{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025890 tmp=
25891 trap 'exit_status=$?
25892 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25893' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025894 trap '{ (exit 1); exit 1; }' 1 2 13 15
25895}
Martin v. Löwis11437992002-04-12 09:54:03 +000025896# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025897
Martin v. Löwis11437992002-04-12 09:54:03 +000025898{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025899 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025900 test -n "$tmp" && test -d "$tmp"
25901} ||
25902{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025903 tmp=./conf$$-$RANDOM
25904 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025905} ||
25906{
Skip Montanaro6dead952003-09-25 14:50:04 +000025907 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025908 { (exit 1); exit 1; }
25909}
25910
Martin v. Löwis11437992002-04-12 09:54:03 +000025911#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025912# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025913#
25914
25915# No need to generate the scripts if there are no CONFIG_FILES.
25916# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025917if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025918
25919_ACEOF
25920
Martin v. Löwiseba40652007-08-30 20:10:57 +000025921
25922
25923ac_delim='%!_!# '
25924for ac_last_try in false false false false false :; do
25925 cat >conf$$subs.sed <<_ACEOF
25926SHELL!$SHELL$ac_delim
25927PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25928PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25929PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25930PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25931PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25932PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25933exec_prefix!$exec_prefix$ac_delim
25934prefix!$prefix$ac_delim
25935program_transform_name!$program_transform_name$ac_delim
25936bindir!$bindir$ac_delim
25937sbindir!$sbindir$ac_delim
25938libexecdir!$libexecdir$ac_delim
25939datarootdir!$datarootdir$ac_delim
25940datadir!$datadir$ac_delim
25941sysconfdir!$sysconfdir$ac_delim
25942sharedstatedir!$sharedstatedir$ac_delim
25943localstatedir!$localstatedir$ac_delim
25944includedir!$includedir$ac_delim
25945oldincludedir!$oldincludedir$ac_delim
25946docdir!$docdir$ac_delim
25947infodir!$infodir$ac_delim
25948htmldir!$htmldir$ac_delim
25949dvidir!$dvidir$ac_delim
25950pdfdir!$pdfdir$ac_delim
25951psdir!$psdir$ac_delim
25952libdir!$libdir$ac_delim
25953localedir!$localedir$ac_delim
25954mandir!$mandir$ac_delim
25955DEFS!$DEFS$ac_delim
25956ECHO_C!$ECHO_C$ac_delim
25957ECHO_N!$ECHO_N$ac_delim
25958ECHO_T!$ECHO_T$ac_delim
25959LIBS!$LIBS$ac_delim
25960build_alias!$build_alias$ac_delim
25961host_alias!$host_alias$ac_delim
25962target_alias!$target_alias$ac_delim
25963VERSION!$VERSION$ac_delim
25964SOVERSION!$SOVERSION$ac_delim
25965CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25966UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025967ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025968PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025969PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025970PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25971PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25972PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25973FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25974FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25975FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25976FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25977FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25978MACHDEP!$MACHDEP$ac_delim
25979SGI_ABI!$SGI_ABI$ac_delim
25980EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25981EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25982CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25983EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25984CC!$CC$ac_delim
25985CFLAGS!$CFLAGS$ac_delim
25986LDFLAGS!$LDFLAGS$ac_delim
25987CPPFLAGS!$CPPFLAGS$ac_delim
25988ac_ct_CC!$ac_ct_CC$ac_delim
25989EXEEXT!$EXEEXT$ac_delim
25990OBJEXT!$OBJEXT$ac_delim
25991CXX!$CXX$ac_delim
25992MAINCC!$MAINCC$ac_delim
25993CPP!$CPP$ac_delim
25994GREP!$GREP$ac_delim
25995EGREP!$EGREP$ac_delim
25996BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25997LIBRARY!$LIBRARY$ac_delim
25998LDLIBRARY!$LDLIBRARY$ac_delim
25999DLLLIBRARY!$DLLLIBRARY$ac_delim
26000BLDLIBRARY!$BLDLIBRARY$ac_delim
26001LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26002INSTSONAME!$INSTSONAME$ac_delim
26003RUNSHARED!$RUNSHARED$ac_delim
26004LINKCC!$LINKCC$ac_delim
26005RANLIB!$RANLIB$ac_delim
26006AR!$AR$ac_delim
26007SVNVERSION!$SVNVERSION$ac_delim
26008INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26009INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26010INSTALL_DATA!$INSTALL_DATA$ac_delim
26011LN!$LN$ac_delim
26012OPT!$OPT$ac_delim
26013BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000026014UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026015OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26016LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26017SO!$SO$ac_delim
26018LDSHARED!$LDSHARED$ac_delim
26019BLDSHARED!$BLDSHARED$ac_delim
26020CCSHARED!$CCSHARED$ac_delim
26021LINKFORSHARED!$LINKFORSHARED$ac_delim
26022CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026023_ACEOF
26024
26025 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
26026 break
26027 elif $ac_last_try; then
26028 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26029echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26030 { (exit 1); exit 1; }; }
26031 else
26032 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026033 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026034done
26035
26036ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26037if test -n "$ac_eof"; then
26038 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26039 ac_eof=`expr $ac_eof + 1`
26040fi
26041
26042cat >>$CONFIG_STATUS <<_ACEOF
26043cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26044/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26045_ACEOF
26046sed '
26047s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26048s/^/s,@/; s/!/@,|#_!!_#|/
26049:n
26050t n
26051s/'"$ac_delim"'$/,g/; t
26052s/$/\\/; p
26053N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26054' >>$CONFIG_STATUS <conf$$subs.sed
26055rm -f conf$$subs.sed
26056cat >>$CONFIG_STATUS <<_ACEOF
26057CEOF$ac_eof
26058_ACEOF
26059
26060
26061ac_delim='%!_!# '
26062for ac_last_try in false false false false false :; do
26063 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000026064SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000026065USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000026066SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026067USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26068LDLAST!$LDLAST$ac_delim
26069THREADOBJ!$THREADOBJ$ac_delim
26070DLINCLDIR!$DLINCLDIR$ac_delim
26071DYNLOADFILE!$DYNLOADFILE$ac_delim
26072MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26073TRUE!$TRUE$ac_delim
26074LIBOBJS!$LIBOBJS$ac_delim
26075HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26076HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26077HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26078HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26079HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26080LIBM!$LIBM$ac_delim
26081LIBC!$LIBC$ac_delim
26082UNICODE_OBJS!$UNICODE_OBJS$ac_delim
26083THREADHEADERS!$THREADHEADERS$ac_delim
26084SRCDIRS!$SRCDIRS$ac_delim
26085LTLIBOBJS!$LTLIBOBJS$ac_delim
26086_ACEOF
26087
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000026088 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 +000026089 break
26090 elif $ac_last_try; then
26091 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26092echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26093 { (exit 1); exit 1; }; }
26094 else
26095 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26096 fi
26097done
26098
26099ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26100if test -n "$ac_eof"; then
26101 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26102 ac_eof=`expr $ac_eof + 1`
26103fi
26104
26105cat >>$CONFIG_STATUS <<_ACEOF
26106cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26107/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26108_ACEOF
26109sed '
26110s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26111s/^/s,@/; s/!/@,|#_!!_#|/
26112:n
26113t n
26114s/'"$ac_delim"'$/,g/; t
26115s/$/\\/; p
26116N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26117' >>$CONFIG_STATUS <conf$$subs.sed
26118rm -f conf$$subs.sed
26119cat >>$CONFIG_STATUS <<_ACEOF
26120:end
26121s/|#_!!_#|//g
26122CEOF$ac_eof
26123_ACEOF
26124
26125
26126# VPATH may cause trouble with some makes, so we remove $(srcdir),
26127# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26128# trailing colons and then remove the whole line if VPATH becomes empty
26129# (actually we leave an empty line to preserve line numbers).
26130if test "x$srcdir" = x.; then
26131 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26132s/:*\$(srcdir):*/:/
26133s/:*\${srcdir}:*/:/
26134s/:*@srcdir@:*/:/
26135s/^\([^=]*=[ ]*\):*/\1/
26136s/:*$//
26137s/^[^=]*=[ ]*$//
26138}'
26139fi
26140
26141cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026142fi # test -n "$CONFIG_FILES"
26143
Martin v. Löwiseba40652007-08-30 20:10:57 +000026144
26145for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
26146do
26147 case $ac_tag in
26148 :[FHLC]) ac_mode=$ac_tag; continue;;
26149 esac
26150 case $ac_mode$ac_tag in
26151 :[FHL]*:*);;
26152 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26153echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26154 { (exit 1); exit 1; }; };;
26155 :[FH]-) ac_tag=-:-;;
26156 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26157 esac
26158 ac_save_IFS=$IFS
26159 IFS=:
26160 set x $ac_tag
26161 IFS=$ac_save_IFS
26162 shift
26163 ac_file=$1
26164 shift
26165
26166 case $ac_mode in
26167 :L) ac_source=$1;;
26168 :[FH])
26169 ac_file_inputs=
26170 for ac_f
26171 do
26172 case $ac_f in
26173 -) ac_f="$tmp/stdin";;
26174 *) # Look for the file first in the build tree, then in the source tree
26175 # (if the path is not absolute). The absolute path cannot be DOS-style,
26176 # because $ac_f cannot contain `:'.
26177 test -f "$ac_f" ||
26178 case $ac_f in
26179 [\\/$]*) false;;
26180 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26181 esac ||
26182 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26183echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26184 { (exit 1); exit 1; }; };;
26185 esac
26186 ac_file_inputs="$ac_file_inputs $ac_f"
26187 done
26188
26189 # Let's still pretend it is `configure' which instantiates (i.e., don't
26190 # use $as_me), people would be surprised to read:
26191 # /* config.h. Generated by config.status. */
26192 configure_input="Generated from "`IFS=:
26193 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26194 if test x"$ac_file" != x-; then
26195 configure_input="$ac_file. $configure_input"
26196 { echo "$as_me:$LINENO: creating $ac_file" >&5
26197echo "$as_me: creating $ac_file" >&6;}
26198 fi
26199
26200 case $ac_tag in
26201 *:-:* | *:-) cat >"$tmp/stdin";;
26202 esac
26203 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026204 esac
26205
Martin v. Löwiseba40652007-08-30 20:10:57 +000026206 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026207$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026208 X"$ac_file" : 'X\(//\)[^/]' \| \
26209 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026210 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026211echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026212 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26213 s//\1/
26214 q
26215 }
26216 /^X\(\/\/\)[^/].*/{
26217 s//\1/
26218 q
26219 }
26220 /^X\(\/\/\)$/{
26221 s//\1/
26222 q
26223 }
26224 /^X\(\/\).*/{
26225 s//\1/
26226 q
26227 }
26228 s/.*/./; q'`
26229 { as_dir="$ac_dir"
26230 case $as_dir in #(
26231 -*) as_dir=./$as_dir;;
26232 esac
26233 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026234 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000026235 while :; do
26236 case $as_dir in #(
26237 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26238 *) as_qdir=$as_dir;;
26239 esac
26240 as_dirs="'$as_qdir' $as_dirs"
26241 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026242$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026243 X"$as_dir" : 'X\(//\)[^/]' \| \
26244 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026245 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026246echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026247 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26248 s//\1/
26249 q
26250 }
26251 /^X\(\/\/\)[^/].*/{
26252 s//\1/
26253 q
26254 }
26255 /^X\(\/\/\)$/{
26256 s//\1/
26257 q
26258 }
26259 /^X\(\/\).*/{
26260 s//\1/
26261 q
26262 }
26263 s/.*/./; q'`
26264 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026265 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026266 test -z "$as_dirs" || eval "mkdir $as_dirs"
26267 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26268echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026269 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026270 ac_builddir=.
26271
Martin v. Löwiseba40652007-08-30 20:10:57 +000026272case "$ac_dir" in
26273.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26274*)
Martin v. Löwis11437992002-04-12 09:54:03 +000026275 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026276 # A ".." for each directory in $ac_dir_suffix.
26277 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
26278 case $ac_top_builddir_sub in
26279 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26280 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26281 esac ;;
26282esac
26283ac_abs_top_builddir=$ac_pwd
26284ac_abs_builddir=$ac_pwd$ac_dir_suffix
26285# for backward compatibility:
26286ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026287
26288case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026289 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026290 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026291 ac_top_srcdir=$ac_top_builddir_sub
26292 ac_abs_top_srcdir=$ac_pwd ;;
26293 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026294 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026295 ac_top_srcdir=$srcdir
26296 ac_abs_top_srcdir=$srcdir ;;
26297 *) # Relative name.
26298 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26299 ac_top_srcdir=$ac_top_build_prefix$srcdir
26300 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026301esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026302ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026303
Martin v. Löwis11437992002-04-12 09:54:03 +000026304
Martin v. Löwiseba40652007-08-30 20:10:57 +000026305 case $ac_mode in
26306 :F)
26307 #
26308 # CONFIG_FILE
26309 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026310
26311 case $INSTALL in
26312 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026313 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026314 esac
Brett Cannon19fab762007-06-02 03:02:29 +000026315_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026316
26317cat >>$CONFIG_STATUS <<\_ACEOF
26318# If the template does not know about datarootdir, expand it.
26319# FIXME: This hack should be removed a few years after 2.60.
26320ac_datarootdir_hack=; ac_datarootdir_seen=
26321
26322case `sed -n '/datarootdir/ {
26323 p
26324 q
26325}
26326/@datadir@/p
26327/@docdir@/p
26328/@infodir@/p
26329/@localedir@/p
26330/@mandir@/p
26331' $ac_file_inputs` in
26332*datarootdir*) ac_datarootdir_seen=yes;;
26333*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26334 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26335echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26336_ACEOF
26337cat >>$CONFIG_STATUS <<_ACEOF
26338 ac_datarootdir_hack='
26339 s&@datadir@&$datadir&g
26340 s&@docdir@&$docdir&g
26341 s&@infodir@&$infodir&g
26342 s&@localedir@&$localedir&g
26343 s&@mandir@&$mandir&g
26344 s&\\\${datarootdir}&$datarootdir&g' ;;
26345esac
26346_ACEOF
26347
26348# Neutralize VPATH when `$srcdir' = `.'.
26349# Shell code in configure.ac might set extrasub.
26350# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000026351cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026352 sed "$ac_vpsub
26353$extrasub
26354_ACEOF
26355cat >>$CONFIG_STATUS <<\_ACEOF
26356:t
26357/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000026358s&@configure_input@&$configure_input&;t t
26359s&@top_builddir@&$ac_top_builddir_sub&;t t
26360s&@srcdir@&$ac_srcdir&;t t
26361s&@abs_srcdir@&$ac_abs_srcdir&;t t
26362s&@top_srcdir@&$ac_top_srcdir&;t t
26363s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26364s&@builddir@&$ac_builddir&;t t
26365s&@abs_builddir@&$ac_abs_builddir&;t t
26366s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26367s&@INSTALL@&$ac_INSTALL&;t t
26368$ac_datarootdir_hack
26369" $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 +000026370
Martin v. Löwiseba40652007-08-30 20:10:57 +000026371test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26372 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26373 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26374 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26375which seems to be undefined. Please make sure it is defined." >&5
26376echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26377which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026378
Martin v. Löwiseba40652007-08-30 20:10:57 +000026379 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026380 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026381 -) cat "$tmp/out"; rm -f "$tmp/out";;
26382 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026383 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026384 ;;
26385 :H)
26386 #
26387 # CONFIG_HEADER
26388 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026389_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026390
Martin v. Löwiseba40652007-08-30 20:10:57 +000026391# Transform confdefs.h into a sed script `conftest.defines', that
26392# substitutes the proper values into config.h.in to produce config.h.
26393rm -f conftest.defines conftest.tail
26394# First, append a space to every undef/define line, to ease matching.
26395echo 's/$/ /' >conftest.defines
26396# Then, protect against being on the right side of a sed subst, or in
26397# an unquoted here document, in config.status. If some macros were
26398# called several times there might be several #defines for the same
26399# symbol, which is useless. But do not sort them, since the last
26400# AC_DEFINE must be honored.
26401ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26402# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26403# NAME is the cpp macro being defined, VALUE is the value it is being given.
26404# PARAMS is the parameter list in the macro definition--in most cases, it's
26405# just an empty string.
26406ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26407ac_dB='\\)[ (].*,\\1define\\2'
26408ac_dC=' '
26409ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026410
Martin v. Löwiseba40652007-08-30 20:10:57 +000026411uniq confdefs.h |
26412 sed -n '
26413 t rset
26414 :rset
26415 s/^[ ]*#[ ]*define[ ][ ]*//
26416 t ok
26417 d
26418 :ok
26419 s/[\\&,]/\\&/g
26420 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26421 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26422 ' >>conftest.defines
26423
26424# Remove the space that was appended to ease matching.
26425# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026426# example, in the case of _POSIX_SOURCE, which is predefined and required
26427# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026428# (The regexp can be short, since the line contains either #define or #undef.)
26429echo 's/ $//
26430s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000026431
Martin v. Löwiseba40652007-08-30 20:10:57 +000026432# Break up conftest.defines:
26433ac_max_sed_lines=50
26434
26435# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26436# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26437# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26438# et cetera.
26439ac_in='$ac_file_inputs'
26440ac_out='"$tmp/out1"'
26441ac_nxt='"$tmp/out2"'
26442
26443while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000026444do
Martin v. Löwiseba40652007-08-30 20:10:57 +000026445 # Write a here document:
26446 cat >>$CONFIG_STATUS <<_ACEOF
26447 # First, check the format of the line:
26448 cat >"\$tmp/defines.sed" <<\\CEOF
26449/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26450/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26451b
26452:def
26453_ACEOF
26454 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000026455 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026456 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26457 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26458 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26459 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000026460 rm -f conftest.defines
26461 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000026462done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026463rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000026464
Martin v. Löwiseba40652007-08-30 20:10:57 +000026465echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026466cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026467 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026468 echo "/* $configure_input */" >"$tmp/config.h"
26469 cat "$ac_result" >>"$tmp/config.h"
26470 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026471 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26472echo "$as_me: $ac_file is unchanged" >&6;}
26473 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026474 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026475 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026476 fi
26477 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026478 echo "/* $configure_input */"
26479 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026480 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026481 rm -f "$tmp/out12"
26482 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026483
Martin v. Löwiseba40652007-08-30 20:10:57 +000026484
26485 esac
26486
26487done # for ac_tag
26488
Guido van Rossum627b2d71993-12-24 10:39:16 +000026489
Martin v. Löwis11437992002-04-12 09:54:03 +000026490{ (exit 0); exit 0; }
26491_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026492chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026493ac_clean_files=$ac_clean_files_save
26494
26495
26496# configure is writing to config.log, and then calls config.status.
26497# config.status does its own redirection, appending to config.log.
26498# Unfortunately, on DOS this fails, as config.log is still kept open
26499# by configure, so config.status won't be able to write to it; its
26500# output is simply discarded. So we exec the FD to /dev/null,
26501# effectively closing config.log, so it can be properly (re)opened and
26502# appended to by config.status. When coming back to configure, we
26503# need to make the FD available again.
26504if test "$no_create" != yes; then
26505 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026506 ac_config_status_args=
26507 test "$silent" = yes &&
26508 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026509 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026510 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026511 exec 5>>config.log
26512 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26513 # would make configure fail if this is the last instruction.
26514 $ac_cs_success || { (exit 1); exit 1; }
26515fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026516
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026517
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026518echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026519if test ! -f Modules/Setup
26520then
26521 cp $srcdir/Modules/Setup.dist Modules/Setup
26522fi
26523
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026524echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026525if test ! -f Modules/Setup.local
26526then
26527 echo "# Edit this file for local setup changes" >Modules/Setup.local
26528fi
26529
26530echo "creating Makefile"
26531$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26532 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026533 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000026534
26535case $ac_sys_system in
26536BeOS)
26537 { echo "$as_me:$LINENO: WARNING:
26538
26539 Support for BeOS is deprecated as of Python 2.6.
26540 See PEP 11 for the gory details.
26541 " >&5
26542echo "$as_me: WARNING:
26543
26544 Support for BeOS is deprecated as of Python 2.6.
26545 See PEP 11 for the gory details.
26546 " >&2;}
26547 ;;
26548*) ;;
26549esac
26550
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026551mv config.c Modules