blob: fb79c063567b8542bc4291eaf2ff5b20dd17135f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002# From configure.in Revision: 59558 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004# Generated by GNU Autoconf 2.61 for python 2.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Neal Norwitz9be57322006-08-18 05:39:20 +0000578PACKAGE_VERSION='2.6'
579PACKAGE_STRING='python 2.6'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660PYTHONFRAMEWORK
661PYTHONFRAMEWORKDIR
662PYTHONFRAMEWORKPREFIX
663PYTHONFRAMEWORKINSTALLDIR
664FRAMEWORKINSTALLFIRST
665FRAMEWORKINSTALLLAST
666FRAMEWORKALTINSTALLFIRST
667FRAMEWORKALTINSTALLLAST
668FRAMEWORKUNIXTOOLSPREFIX
669MACHDEP
670SGI_ABI
671EXTRAPLATDIR
672EXTRAMACHDEPPATH
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696RANLIB
697AR
698SVNVERSION
699INSTALL_PROGRAM
700INSTALL_SCRIPT
701INSTALL_DATA
702LN
703OPT
704BASECFLAGS
705OTHER_LIBTOOL_OPT
706LIBTOOL_CRUFT
707SO
708LDSHARED
709BLDSHARED
710CCSHARED
711LINKFORSHARED
712CFLAGSFORSHARED
713SHLIBS
714USE_SIGNAL_MODULE
715SIGNAL_OBJS
716USE_THREAD_MODULE
717LDLAST
718THREADOBJ
719DLINCLDIR
720DYNLOADFILE
721MACHDEP_OBJS
722TRUE
723LIBOBJS
724HAVE_GETHOSTBYNAME_R_6_ARG
725HAVE_GETHOSTBYNAME_R_5_ARG
726HAVE_GETHOSTBYNAME_R_3_ARG
727HAVE_GETHOSTBYNAME_R
728HAVE_GETHOSTBYNAME
729LIBM
730LIBC
731UNICODE_OBJS
732THREADHEADERS
733SRCDIRS
734LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000735ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000736 ac_precious_vars='build_alias
737host_alias
738target_alias
739CC
740CFLAGS
741LDFLAGS
742LIBS
743CPPFLAGS
744CPP'
745
Guido van Rossum627b2d71993-12-24 10:39:16 +0000746
Guido van Rossum7f43da71994-08-01 12:15:30 +0000747# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000748ac_init_help=
749ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# The variables have the same names as the options, with
751# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000752cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000753exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755no_recursion=
756prefix=NONE
757program_prefix=NONE
758program_suffix=NONE
759program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764x_includes=NONE
765x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000766
767# Installation directory options.
768# These are left unexpanded so users can "make install exec_prefix=/foo"
769# and all the variables that are supposed to be based on exec_prefix
770# by default will actually change.
771# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000772# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000773bindir='${exec_prefix}/bin'
774sbindir='${exec_prefix}/sbin'
775libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000776datarootdir='${prefix}/share'
777datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778sysconfdir='${prefix}/etc'
779sharedstatedir='${prefix}/com'
780localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781includedir='${prefix}/include'
782oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000783docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
784infodir='${datarootdir}/info'
785htmldir='${docdir}'
786dvidir='${docdir}'
787pdfdir='${docdir}'
788psdir='${docdir}'
789libdir='${exec_prefix}/lib'
790localedir='${datarootdir}/locale'
791mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000794ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000796do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797 # If the previous option needs an argument, assign it.
798 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 ac_prev=
801 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 case $ac_option in
805 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
806 *) ac_optarg=yes ;;
807 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809 # Accept the important Cygnus configure options, so we can diagnose typos.
810
Martin v. Löwiseba40652007-08-30 20:10:57 +0000811 case $ac_dashdash$ac_option in
812 --)
813 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815 -bindir | --bindir | --bindi | --bind | --bin | --bi)
816 ac_prev=bindir ;;
817 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000818 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819
820 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825 -cache-file | --cache-file | --cache-fil | --cache-fi \
826 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
827 ac_prev=cache_file ;;
828 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
829 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000830 cache_file=$ac_optarg ;;
831
832 --config-cache | -C)
833 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834
Martin v. Löwiseba40652007-08-30 20:10:57 +0000835 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000838 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
841 | --dataroo | --dataro | --datar)
842 ac_prev=datarootdir ;;
843 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
844 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
845 datarootdir=$ac_optarg ;;
846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000850 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
852 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
854 eval enable_$ac_feature=no ;;
855
856 -docdir | --docdir | --docdi | --doc | --do)
857 ac_prev=docdir ;;
858 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
859 docdir=$ac_optarg ;;
860
861 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
862 ac_prev=dvidir ;;
863 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
864 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
866 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000867 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000869 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
871 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
873 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
876 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
877 | --exec | --exe | --ex)
878 ac_prev=exec_prefix ;;
879 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
880 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
881 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
884 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Obsolete; use --with-gas.
886 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 -help | --help | --hel | --he | -h)
889 ac_init_help=long ;;
890 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
891 ac_init_help=recursive ;;
892 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
893 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
895 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Martin v. Löwiseba40652007-08-30 20:10:57 +0000900 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
901 ac_prev=htmldir ;;
902 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
903 | --ht=*)
904 htmldir=$ac_optarg ;;
905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 -includedir | --includedir | --includedi | --included | --include \
907 | --includ | --inclu | --incl | --inc)
908 ac_prev=includedir ;;
909 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
910 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912
913 -infodir | --infodir | --infodi | --infod | --info | --inf)
914 ac_prev=infodir ;;
915 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -libdir | --libdir | --libdi | --libd)
919 ac_prev=libdir ;;
920 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
924 | --libexe | --libex | --libe)
925 ac_prev=libexecdir ;;
926 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
927 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
Martin v. Löwiseba40652007-08-30 20:10:57 +0000930 -localedir | --localedir | --localedi | --localed | --locale)
931 ac_prev=localedir ;;
932 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
933 localedir=$ac_optarg ;;
934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 ac_prev=localstatedir ;;
938 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
942 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
943 ac_prev=mandir ;;
944 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Obsolete; use --without-fp.
949 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 no_create=yes ;;
954
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
956 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
957 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
960 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
961 | --oldin | --oldi | --old | --ol | --o)
962 ac_prev=oldincludedir ;;
963 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
964 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
965 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
969 ac_prev=prefix ;;
970 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972
973 -program-prefix | --program-prefix | --program-prefi | --program-pref \
974 | --program-pre | --program-pr | --program-p)
975 ac_prev=program_prefix ;;
976 -program-prefix=* | --program-prefix=* | --program-prefi=* \
977 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
980 -program-suffix | --program-suffix | --program-suffi | --program-suff \
981 | --program-suf | --program-su | --program-s)
982 ac_prev=program_suffix ;;
983 -program-suffix=* | --program-suffix=* | --program-suffi=* \
984 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -program-transform-name | --program-transform-name \
988 | --program-transform-nam | --program-transform-na \
989 | --program-transform-n | --program-transform- \
990 | --program-transform | --program-transfor \
991 | --program-transfo | --program-transf \
992 | --program-trans | --program-tran \
993 | --progr-tra | --program-tr | --program-t)
994 ac_prev=program_transform_name ;;
995 -program-transform-name=* | --program-transform-name=* \
996 | --program-transform-nam=* | --program-transform-na=* \
997 | --program-transform-n=* | --program-transform-=* \
998 | --program-transform=* | --program-transfor=* \
999 | --program-transfo=* | --program-transf=* \
1000 | --program-trans=* | --program-tran=* \
1001 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Martin v. Löwiseba40652007-08-30 20:10:57 +00001004 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1005 ac_prev=pdfdir ;;
1006 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1007 pdfdir=$ac_optarg ;;
1008
1009 -psdir | --psdir | --psdi | --psd | --ps)
1010 ac_prev=psdir ;;
1011 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1012 psdir=$ac_optarg ;;
1013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1015 | -silent | --silent | --silen | --sile | --sil)
1016 silent=yes ;;
1017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1019 ac_prev=sbindir ;;
1020 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1021 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1025 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1026 | --sharedst | --shareds | --shared | --share | --shar \
1027 | --sha | --sh)
1028 ac_prev=sharedstatedir ;;
1029 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1030 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1031 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1032 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 -site | --site | --sit)
1036 ac_prev=site ;;
1037 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1041 ac_prev=srcdir ;;
1042 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1046 | --syscon | --sysco | --sysc | --sys | --sy)
1047 ac_prev=sysconfdir ;;
1048 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1049 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1058 verbose=yes ;;
1059
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 -version | --version | --versio | --versi | --vers | -V)
1061 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001066 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 { echo "$as_me: error: invalid package name: $ac_package" >&2
1068 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1070 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001075 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 { echo "$as_me: error: invalid package name: $ac_package" >&2
1077 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1079 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 --x)
1082 # Obsolete; use --with-x.
1083 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1086 | --x-incl | --x-inc | --x-in | --x-i)
1087 ac_prev=x_includes ;;
1088 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1089 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1093 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1094 ac_prev=x_libraries ;;
1095 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1096 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 -*) { echo "$as_me: error: unrecognized option: $ac_option
1100Try \`$0 --help' for more information." >&2
1101 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 ;;
1103
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 *=*)
1105 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1106 # Reject names that are not valid shell variable names.
1107 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1108 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1109 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001110 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 export $ac_envvar ;;
1112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 # FIXME: should be removed in autoconf 3.0.
1115 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1116 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1117 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1118 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 ;;
1120
1121 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001122done
1123
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1126 { echo "$as_me: error: missing argument to $ac_option" >&2
1127 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128fi
1129
Martin v. Löwiseba40652007-08-30 20:10:57 +00001130# Be sure to have absolute directory names.
1131for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1132 datadir sysconfdir sharedstatedir localstatedir includedir \
1133 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1134 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001138 [\\/$]* | ?:[\\/]* ) continue;;
1139 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1142 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001143done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001144
Martin v. Löwis11437992002-04-12 09:54:03 +00001145# There might be people who depend on the old broken behavior: `$host'
1146# used to hold the argument of --host etc.
1147# FIXME: To remove some day.
1148build=$build_alias
1149host=$host_alias
1150target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152# FIXME: To remove some day.
1153if test "x$host_alias" != x; then
1154 if test "x$build_alias" = x; then
1155 cross_compiling=maybe
1156 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1157 If a cross compiler is detected then cross compile mode will be used." >&2
1158 elif test "x$build_alias" != "x$host_alias"; then
1159 cross_compiling=yes
1160 fi
1161fi
1162
1163ac_tool_prefix=
1164test -n "$host_alias" && ac_tool_prefix=$host_alias-
1165
1166test "$silent" = yes && exec 6>/dev/null
1167
Guido van Rossum627b2d71993-12-24 10:39:16 +00001168
Martin v. Löwiseba40652007-08-30 20:10:57 +00001169ac_pwd=`pwd` && test -n "$ac_pwd" &&
1170ac_ls_di=`ls -di .` &&
1171ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1172 { echo "$as_me: error: Working directory cannot be determined" >&2
1173 { (exit 1); exit 1; }; }
1174test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1175 { echo "$as_me: error: pwd does not report name of working directory" >&2
1176 { (exit 1); exit 1; }; }
1177
1178
Guido van Rossum627b2d71993-12-24 10:39:16 +00001179# Find the source files, if location was not specified.
1180if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 # Try the directory containing this script, then the parent directory.
1183 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001184$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001185 X"$0" : 'X\(//\)[^/]' \| \
1186 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001188echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001189 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1190 s//\1/
1191 q
1192 }
1193 /^X\(\/\/\)[^/].*/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)$/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\).*/{
1202 s//\1/
1203 q
1204 }
1205 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001207 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208 srcdir=..
1209 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210else
1211 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001213if test ! -r "$srcdir/$ac_unique_file"; then
1214 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1215 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1219ac_abs_confdir=`(
1220 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001221 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001222 pwd)`
1223# When building in place, set srcdir=.
1224if test "$ac_abs_confdir" = "$ac_pwd"; then
1225 srcdir=.
1226fi
1227# Remove unnecessary trailing slashes from srcdir.
1228# Double slashes in file names in object file debugging info
1229# mess up M-x gdb in Emacs.
1230case $srcdir in
1231*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1232esac
1233for ac_var in $ac_precious_vars; do
1234 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1235 eval ac_env_${ac_var}_value=\$${ac_var}
1236 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1238done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240#
1241# Report the --help message.
1242#
1243if test "$ac_init_help" = "long"; then
1244 # Omit some internal or obsolete options to make the list less imposing.
1245 # This message is too long to be a string in the A/UX 3.1 sh.
1246 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001247\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001248
1249Usage: $0 [OPTION]... [VAR=VALUE]...
1250
1251To assign environment variables (e.g., CC, CFLAGS...), specify them as
1252VAR=VALUE. See below for descriptions of some of the useful variables.
1253
1254Defaults for the options are specified in brackets.
1255
1256Configuration:
1257 -h, --help display this help and exit
1258 --help=short display options specific to this package
1259 --help=recursive display the short help of all the included packages
1260 -V, --version display version information and exit
1261 -q, --quiet, --silent do not print \`checking...' messages
1262 --cache-file=FILE cache test results in FILE [disabled]
1263 -C, --config-cache alias for \`--cache-file=config.cache'
1264 -n, --no-create do not create output files
1265 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1266
Martin v. Löwis11437992002-04-12 09:54:03 +00001267Installation directories:
1268 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001269 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001271 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272
1273By default, \`make install' will install all the files in
1274\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1275an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1276for instance \`--prefix=\$HOME'.
1277
1278For better control, use the options below.
1279
1280Fine tuning of the installation directories:
1281 --bindir=DIR user executables [EPREFIX/bin]
1282 --sbindir=DIR system admin executables [EPREFIX/sbin]
1283 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1285 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1286 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1287 --libdir=DIR object code libraries [EPREFIX/lib]
1288 --includedir=DIR C header files [PREFIX/include]
1289 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001290 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1291 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1292 --infodir=DIR info documentation [DATAROOTDIR/info]
1293 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1294 --mandir=DIR man documentation [DATAROOTDIR/man]
1295 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1296 --htmldir=DIR html documentation [DOCDIR]
1297 --dvidir=DIR dvi documentation [DOCDIR]
1298 --pdfdir=DIR pdf documentation [DOCDIR]
1299 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001300_ACEOF
1301
1302 cat <<\_ACEOF
1303_ACEOF
1304fi
1305
1306if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001307 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001308 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001310 cat <<\_ACEOF
1311
1312Optional Features:
1313 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1314 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Ronald Oussoren988117f2006-04-29 11:31:35 +00001315 --enable-universalsdk[SDKDIR]
1316 Build agains Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001317 --enable-framework[=INSTALLDIR]
1318 Build (MacOSX|Darwin) framework
1319 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001320 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001321 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1322 --enable-ipv6 Enable ipv6 (with ipv4) support
1323 --disable-ipv6 Disable ipv6 support
1324 --enable-unicode[=ucs[24]]
1325 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
1327Optional Packages:
1328 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1329 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001331 --with-cxx-main=<compiler>
1332 compile main() and link python executable with C++
1333 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --with-suffix=.exe set executable suffix
1335 --with-pydebug build with Py_DEBUG defined
1336 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001337 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --with-signal-module disable/enable signal module
1339 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1340 --with(out)-threads[=DIRECTORY]
1341 disable/enable thread support
1342 --with(out)-thread[=DIRECTORY]
1343 deprecated; use --with(out)-threads
1344 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001346 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with(out)-pymalloc disable/enable specialized mallocs
1348 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-fpectl enable SIGFPE catching
1350 --with-libm=STRING math library
1351 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001352
1353Some influential environment variables:
1354 CC C compiler command
1355 CFLAGS C compiler flags
1356 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1357 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001358 LIBS libraries to pass to the linker, e.g. -l<library>
1359 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1360 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001361 CPP C preprocessor
1362
1363Use these variables to override the choices made by `configure' or to help
1364it to find libraries and programs with nonstandard names/locations.
1365
Martin v. Löwis1d459062005-03-14 21:23:33 +00001366Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001367_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001368ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001369fi
1370
1371if test "$ac_init_help" = "recursive"; then
1372 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001374 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 ac_builddir=.
1376
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377case "$ac_dir" in
1378.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1379*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381 # A ".." for each directory in $ac_dir_suffix.
1382 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1383 case $ac_top_builddir_sub in
1384 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1385 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1386 esac ;;
1387esac
1388ac_abs_top_builddir=$ac_pwd
1389ac_abs_builddir=$ac_pwd$ac_dir_suffix
1390# for backward compatibility:
1391ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001396 ac_top_srcdir=$ac_top_builddir_sub
1397 ac_abs_top_srcdir=$ac_pwd ;;
1398 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 ac_top_srcdir=$srcdir
1401 ac_abs_top_srcdir=$srcdir ;;
1402 *) # Relative name.
1403 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1404 ac_top_srcdir=$ac_top_build_prefix$srcdir
1405 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001406esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001408
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 cd "$ac_dir" || { ac_status=$?; continue; }
1410 # Check for guested configure.
1411 if test -f "$ac_srcdir/configure.gnu"; then
1412 echo &&
1413 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1414 elif test -f "$ac_srcdir/configure"; then
1415 echo &&
1416 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 else
1418 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001419 fi || ac_status=$?
1420 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 done
1422fi
1423
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001425if $ac_init_version; then
1426 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001427python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14312002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001432This configure script is free software; the Free Software Foundation
1433gives unlimited permission to copy, distribute and modify it.
1434_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001435 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001438This file contains any messages produced by compilers while
1439running configure, to aid debugging if configure makes a mistake.
1440
Neal Norwitz9be57322006-08-18 05:39:20 +00001441It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001442generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444 $ $0 $@
1445
1446_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001448{
1449cat <<_ASUNAME
1450## --------- ##
1451## Platform. ##
1452## --------- ##
1453
1454hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1455uname -m = `(uname -m) 2>/dev/null || echo unknown`
1456uname -r = `(uname -r) 2>/dev/null || echo unknown`
1457uname -s = `(uname -s) 2>/dev/null || echo unknown`
1458uname -v = `(uname -v) 2>/dev/null || echo unknown`
1459
1460/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1461/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1462
1463/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1464/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1465/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001466/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001467/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1468/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1469/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1470
1471_ASUNAME
1472
1473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1474for as_dir in $PATH
1475do
1476 IFS=$as_save_IFS
1477 test -z "$as_dir" && as_dir=.
1478 echo "PATH: $as_dir"
1479done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001480IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001481
1482} >&5
1483
1484cat >&5 <<_ACEOF
1485
1486
1487## ----------- ##
1488## Core tests. ##
1489## ----------- ##
1490
1491_ACEOF
1492
1493
1494# Keep a trace of the command line.
1495# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001496# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001497# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001498# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001500ac_configure_args0=
1501ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001502ac_must_keep_next=false
1503for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001504do
Skip Montanaro6dead952003-09-25 14:50:04 +00001505 for ac_arg
1506 do
1507 case $ac_arg in
1508 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510 | -silent | --silent | --silen | --sile | --sil)
1511 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001512 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001513 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1514 esac
1515 case $ac_pass in
1516 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1517 2)
1518 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1519 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001520 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001522 case $ac_arg in
1523 *=* | --config-cache | -C | -disable-* | --disable-* \
1524 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1525 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1526 | -with-* | --with-* | -without-* | --without-* | --x)
1527 case "$ac_configure_args0 " in
1528 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1529 esac
1530 ;;
1531 -* ) ac_must_keep_next=true ;;
1532 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001534 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 ;;
1536 esac
1537 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001538done
Skip Montanaro6dead952003-09-25 14:50:04 +00001539$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1540$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542# When interrupted or exit'd, cleanup temporary files, and complete
1543# config.log. We remove comments because anyway the quotes in there
1544# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545# WARNING: Use '\'' to represent an apostrophe within the trap.
1546# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547trap 'exit_status=$?
1548 # Save into config.log some information that might help in debugging.
1549 {
1550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001551
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 cat <<\_ASBOX
1553## ---------------- ##
1554## Cache variables. ##
1555## ---------------- ##
1556_ASBOX
1557 echo
1558 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001559(
1560 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1561 eval ac_val=\$$ac_var
1562 case $ac_val in #(
1563 *${as_nl}*)
1564 case $ac_var in #(
1565 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1566echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1567 esac
1568 case $ac_var in #(
1569 _ | IFS | as_nl) ;; #(
1570 *) $as_unset $ac_var ;;
1571 esac ;;
1572 esac
1573 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1576 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 "s/'\''/'\''\\\\'\'''\''/g;
1579 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1580 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001581 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001583 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac |
1585 sort
1586)
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001588
1589 cat <<\_ASBOX
1590## ----------------- ##
1591## Output variables. ##
1592## ----------------- ##
1593_ASBOX
1594 echo
1595 for ac_var in $ac_subst_vars
1596 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001597 eval ac_val=\$$ac_var
1598 case $ac_val in
1599 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1600 esac
1601 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001602 done | sort
1603 echo
1604
1605 if test -n "$ac_subst_files"; then
1606 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001607## ------------------- ##
1608## File substitutions. ##
1609## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_files
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
1616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1617 esac
1618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621 fi
1622
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 if test -s confdefs.h; then
1624 cat <<\_ASBOX
1625## ----------- ##
1626## confdefs.h. ##
1627## ----------- ##
1628_ASBOX
1629 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001630 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 echo
1632 fi
1633 test "$ac_signal" != 0 &&
1634 echo "$as_me: caught signal $ac_signal"
1635 echo "$as_me: exit $exit_status"
1636 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001637 rm -f core *.core core.conftest.* &&
1638 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001640' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001641for ac_signal in 1 2 13 15; do
1642 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1643done
1644ac_signal=0
1645
1646# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648
1649# Predefined preprocessor variables.
1650
1651cat >>confdefs.h <<_ACEOF
1652#define PACKAGE_NAME "$PACKAGE_NAME"
1653_ACEOF
1654
1655
1656cat >>confdefs.h <<_ACEOF
1657#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1658_ACEOF
1659
1660
1661cat >>confdefs.h <<_ACEOF
1662#define PACKAGE_VERSION "$PACKAGE_VERSION"
1663_ACEOF
1664
1665
1666cat >>confdefs.h <<_ACEOF
1667#define PACKAGE_STRING "$PACKAGE_STRING"
1668_ACEOF
1669
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1673_ACEOF
1674
1675
1676# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001678if test -n "$CONFIG_SITE"; then
1679 set x "$CONFIG_SITE"
1680elif test "x$prefix" != xNONE; then
1681 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1682else
1683 set x "$ac_default_prefix/share/config.site" \
1684 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001686shift
1687for ac_site_file
1688do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001690 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1691echo "$as_me: loading site script $ac_site_file" >&6;}
1692 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 . "$ac_site_file"
1694 fi
1695done
1696
1697if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001698 # Some versions of bash will fail to source /dev/null (special
1699 # files actually), so we avoid doing that.
1700 if test -f "$cache_file"; then
1701 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1702echo "$as_me: loading cache $cache_file" >&6;}
1703 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001704 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1705 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 esac
1707 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708else
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1710echo "$as_me: creating cache $cache_file" >&6;}
1711 >$cache_file
1712fi
1713
1714# Check that the precious variables saved in the cache have kept the same
1715# value.
1716ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001717for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1719 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001720 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1721 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $ac_old_set,$ac_new_set in
1723 set,)
1724 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1725echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1726 ac_cache_corrupted=: ;;
1727 ,set)
1728 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1729echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,);;
1732 *)
1733 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001734 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001735echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001736 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001737echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001738 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001739echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001740 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 fi;;
1742 esac
1743 # Pass precious variables to config.status.
1744 if test "$ac_new_set" = set; then
1745 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001746 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 *) ac_arg=$ac_var=$ac_new_val ;;
1748 esac
1749 case " $ac_configure_args " in
1750 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1751 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1752 esac
1753 fi
1754done
1755if $ac_cache_corrupted; then
1756 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1757echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1758 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1759echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1760 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761fi
1762
Martin v. Löwiseba40652007-08-30 20:10:57 +00001763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
Guido van Rossum7f43da71994-08-01 12:15:30 +00001787ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1791ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792
Guido van Rossum627b2d71993-12-24 10:39:16 +00001793
Michael W. Hudson54241132001-12-07 15:38:26 +00001794
Martin v. Löwiseba40652007-08-30 20:10:57 +00001795ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001796
1797
Martin v. Löwis11437992002-04-12 09:54:03 +00001798
1799
1800
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001801
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001802
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001803# We don't use PACKAGE_ variables, and they cause conflicts
1804# with other autoconf-based packages that include Python.h
1805grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1806rm confdefs.h
1807mv confdefs.h.new confdefs.h
1808
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001809
Neal Norwitz9be57322006-08-18 05:39:20 +00001810VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001811
Martin v. Löwis1142de32002-03-29 16:28:31 +00001812
1813SOVERSION=1.0
1814
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001815# The later defininition of _XOPEN_SOURCE disables certain features
1816# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1817
1818cat >>confdefs.h <<\_ACEOF
1819#define _GNU_SOURCE 1
1820_ACEOF
1821
1822
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001823# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1824# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1825# them.
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _NETBSD_SOURCE 1
1829_ACEOF
1830
1831
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define __BSD_VISIBLE 1
1838_ACEOF
1839
1840
Martin v. Löwisd6320502004-08-12 13:45:08 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define _BSD_TYPES 1
1846_ACEOF
1847
1848
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001849define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001850
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001851# Arguments passed to configure.
1852
1853CONFIG_ARGS="$ac_configure_args"
1854
Martin v. Löwiseba40652007-08-30 20:10:57 +00001855# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001856if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001857 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001858 case $enableval in
1859 yes)
1860 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1861 ;;
1862 esac
1863 case $enableval in
1864 no)
1865 UNIVERSALSDK=
1866 enable_universalsdk=
1867 ;;
1868 *)
1869 UNIVERSALSDK=$enableval
1870 ;;
1871 esac
1872
1873else
1874
1875 UNIVERSALSDK=
1876 enable_universalsdk=
1877
Martin v. Löwiseba40652007-08-30 20:10:57 +00001878fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001879
1880
Martin v. Löwiseba40652007-08-30 20:10:57 +00001881
1882# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001883if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001884 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001885 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001886 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001887 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001888 esac
1889 case $enableval in
1890 no)
1891 PYTHONFRAMEWORK=
1892 PYTHONFRAMEWORKDIR=no-framework
1893 PYTHONFRAMEWORKPREFIX=
1894 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001895 FRAMEWORKINSTALLFIRST=
1896 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001897 FRAMEWORKALTINSTALLFIRST=
1898 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001899 if test "x${prefix}" = "xNONE"; then
1900 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1901 else
1902 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1903 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001904 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001905 ;;
1906 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001907 PYTHONFRAMEWORK=Python
1908 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001909 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001910 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001911 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1912 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001913 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1914 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001915 if test "x${prefix}" = "xNONE" ; then
1916 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1917 else
1918 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1919 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001920 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001921
1922 # Add makefiles for Mac specific code to the list of output
1923 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001924 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001925
Martin v. Löwiseba40652007-08-30 20:10:57 +00001926 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001927
Martin v. Löwiseba40652007-08-30 20:10:57 +00001928 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001929
Jack Jansene578a632001-08-15 01:27:14 +00001930 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001931
Guido van Rossum563e7081996-09-10 18:20:48 +00001932else
Martin v. Löwis11437992002-04-12 09:54:03 +00001933
Jack Jansene578a632001-08-15 01:27:14 +00001934 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001935 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001936 PYTHONFRAMEWORKPREFIX=
1937 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001938 FRAMEWORKINSTALLFIRST=
1939 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001940 FRAMEWORKALTINSTALLFIRST=
1941 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001942 if test "x${prefix}" = "xNONE" ; then
1943 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1944 else
1945 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1946 fi
Jack Jansene578a632001-08-15 01:27:14 +00001947 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001948
Martin v. Löwiseba40652007-08-30 20:10:57 +00001949fi
1950
Michael W. Hudson54241132001-12-07 15:38:26 +00001951
1952
1953
1954
Jack Jansene578a632001-08-15 01:27:14 +00001955
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001956
1957
Ronald Oussoren5b787322006-06-06 19:50:24 +00001958
1959
1960
Jack Jansene578a632001-08-15 01:27:14 +00001961##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001962## AC_HELP_STRING(--with-dyld,
1963## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001964##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001965# Set name for machine-dependent library files
1966
Martin v. Löwiseba40652007-08-30 20:10:57 +00001967{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1968echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001969if test -z "$MACHDEP"
1970then
Guido van Rossum563e7081996-09-10 18:20:48 +00001971 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001972 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1973 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001974 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001975 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001976 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001977 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001978 ac_md_system=`echo $ac_sys_system |
1979 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1980 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001981 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001982 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001983
Guido van Rossum07397971997-04-29 21:49:50 +00001984 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001985 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001986 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001987 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001988 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001989 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001990 esac
1991fi
Guido van Rossum91922671997-10-09 20:24:13 +00001992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001993# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1994# disable features if it is defined, without any means to access these
1995# features as extensions. For these systems, we skip the definition of
1996# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1997# some feature, make sure there is no alternative way to access this
1998# feature. Also, when using wildcards, make sure you have verified the
1999# need for not defining _XOPEN_SOURCE on all systems matching the
2000# wildcard, and that the wildcard does not include future systems
2001# (which may remove their limitations).
2002case $ac_sys_system/$ac_sys_release in
2003 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2004 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002005 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00002006 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002007 define_xopen_source=no
2008 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2009 # also defined. This can be overridden by defining _BSD_SOURCE
2010 # As this has a different meaning on Linux, only define it on OpenBSD
2011
2012cat >>confdefs.h <<\_ACEOF
2013#define _BSD_SOURCE 1
2014_ACEOF
2015
2016 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002017 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2018 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2019 # Marc Recht
2020 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2021 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002022 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2023 # of union __?sigval. Reported by Stuart Bishop.
2024 SunOS/5.6)
2025 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002026 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2027 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002028 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002029 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002030 define_xopen_source=no;;
2031 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002032 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002033 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002034 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002035 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2036 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2037 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2038 # This should hopefully be fixed in FreeBSD 4.9
2039 FreeBSD/4.8* | Darwin/6* )
2040 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002041 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2042 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2043 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002044 AIX/4)
2045 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002046 AIX/5)
2047 if test `uname -r` -eq 1; then
2048 define_xopen_source=no
2049 fi
2050 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002051 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2052 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002053 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002054 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002055 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002056 define_xopen_source=no
2057 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002058
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002059esac
2060
2061if test $define_xopen_source = yes
2062then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002063 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2064 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002065 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2066 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002067 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002068 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002069
2070cat >>confdefs.h <<\_ACEOF
2071#define _XOPEN_SOURCE 500
2072_ACEOF
2073
2074 ;;
2075 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002076
2077cat >>confdefs.h <<\_ACEOF
2078#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002079_ACEOF
2080
Skip Montanarof0d5f792004-08-15 14:08:23 +00002081 ;;
2082 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002083
2084 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2085 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2086 # several APIs are not declared. Since this is also needed in some
2087 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002088 # except for Solaris 10, where it must not be defined,
2089 # as it implies XPG4.2
2090 case $ac_sys_system/$ac_sys_release in
2091 SunOS/5.10)
2092 ;;
2093 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002094
2095cat >>confdefs.h <<\_ACEOF
2096#define _XOPEN_SOURCE_EXTENDED 1
2097_ACEOF
2098
Martin v. Löwis7dece662005-11-26 11:38:24 +00002099 ;;
2100 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002101
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002102
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002103cat >>confdefs.h <<\_ACEOF
2104#define _POSIX_C_SOURCE 200112L
2105_ACEOF
2106
2107
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002108fi
2109
Guido van Rossum91922671997-10-09 20:24:13 +00002110#
2111# SGI compilers allow the specification of the both the ABI and the
2112# ISA on the command line. Depending on the values of these switches,
2113# different and often incompatable code will be generated.
2114#
2115# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2116# thus supply support for various ABI/ISA combinations. The MACHDEP
2117# variable is also adjusted.
2118#
2119
2120if test ! -z "$SGI_ABI"
2121then
2122 CC="cc $SGI_ABI"
2123 LDFLAGS="$SGI_ABI $LDFLAGS"
2124 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002126{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2127echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002128
Jack Jansen83f898c2002-12-30 22:23:40 +00002129# And add extra plat-mac for darwin
2130
Jack Jansen7b59b422003-03-17 15:44:10 +00002131
Martin v. Löwiseba40652007-08-30 20:10:57 +00002132{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2133echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002134if test -z "$EXTRAPLATDIR"
2135then
2136 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002137 darwin)
2138 EXTRAPLATDIR="\$(PLATMACDIRS)"
2139 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2140 ;;
2141 *)
2142 EXTRAPLATDIR=""
2143 EXTRAMACHDEPPATH=""
2144 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002145 esac
2146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002147{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2148echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002149
Jack Jansen6b08a402004-06-03 12:41:45 +00002150# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2151# it may influence the way we can build extensions, so distutils
2152# needs to check it
2153
Ronald Oussoren988117f2006-04-29 11:31:35 +00002154
Jack Jansen6b08a402004-06-03 12:41:45 +00002155CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002156EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002157
Guido van Rossum627b2d71993-12-24 10:39:16 +00002158# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002159
2160# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2161# for debug/optimization stuff. BASECFLAGS is for flags that are required
2162# just to get things to compile and link. Users are free to override OPT
2163# when running configure or make. The build should not break if they do.
2164# BASECFLAGS should generally not be messed with, however.
2165
2166# XXX shouldn't some/most/all of this code be merged with the stuff later
2167# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002168{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2169echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002170
Martin v. Löwiseba40652007-08-30 20:10:57 +00002171# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002172if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002173 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002174 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002175 no) CC=cc
2176 without_gcc=yes;;
2177 yes) CC=gcc
2178 without_gcc=no;;
2179 *) CC=$withval
2180 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002181 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002182else
Martin v. Löwis11437992002-04-12 09:54:03 +00002183
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002184 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002185 AIX*) CC=cc_r
2186 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002187 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002188 case $BE_HOST_CPU in
2189 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002190 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002191 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002192 BASECFLAGS="$BASECFLAGS -export pragma"
2193 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002194 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002195 ;;
2196 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002197 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002198 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002199 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002200 ;;
2201 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002202 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2203echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2204 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002205 ;;
2206 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002207 AR="\$(srcdir)/Modules/ar_beos"
2208 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002209 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002210 Monterey*)
2211 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002212 without_gcc=;;
2213 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002214 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002215fi
2216
2217{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2218echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002219
Guido van Rossum8b131c51995-03-09 14:10:13 +00002220# If the user switches compilers, we can't believe the cache
2221if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2222then
Martin v. Löwis11437992002-04-12 09:54:03 +00002223 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2224(it is also a good idea to do 'make clean' before compiling)" >&5
2225echo "$as_me: error: cached CC is different -- throw away $cache_file
2226(it is also a good idea to do 'make clean' before compiling)" >&2;}
2227 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002228fi
2229
Martin v. Löwis11437992002-04-12 09:54:03 +00002230ac_ext=c
2231ac_cpp='$CPP $CPPFLAGS'
2232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2234ac_compiler_gnu=$ac_cv_c_compiler_gnu
2235if test -n "$ac_tool_prefix"; then
2236 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2237set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002238{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002240if test "${ac_cv_prog_CC+set}" = set; then
2241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242else
2243 if test -n "$CC"; then
2244 ac_cv_prog_CC="$CC" # Let the user override the test.
2245else
Martin v. Löwis11437992002-04-12 09:54:03 +00002246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2247for as_dir in $PATH
2248do
2249 IFS=$as_save_IFS
2250 test -z "$as_dir" && as_dir=.
2251 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002253 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2255 break 2
2256 fi
2257done
2258done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002259IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002260
Jack Jansendd19cf82001-12-06 22:36:17 +00002261fi
2262fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002263CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002264if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002265 { echo "$as_me:$LINENO: result: $CC" >&5
2266echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002267else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002268 { echo "$as_me:$LINENO: result: no" >&5
2269echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002270fi
2271
Martin v. Löwiseba40652007-08-30 20:10:57 +00002272
Martin v. Löwis11437992002-04-12 09:54:03 +00002273fi
2274if test -z "$ac_cv_prog_CC"; then
2275 ac_ct_CC=$CC
2276 # Extract the first word of "gcc", so it can be a program name with args.
2277set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002280if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2281 echo $ECHO_N "(cached) $ECHO_C" >&6
2282else
2283 if test -n "$ac_ct_CC"; then
2284 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2285else
2286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2287for as_dir in $PATH
2288do
2289 IFS=$as_save_IFS
2290 test -z "$as_dir" && as_dir=.
2291 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002292 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002293 ac_cv_prog_ac_ct_CC="gcc"
2294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2295 break 2
2296 fi
2297done
2298done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002299IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002300
2301fi
2302fi
2303ac_ct_CC=$ac_cv_prog_ac_ct_CC
2304if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002305 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2306echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002307else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002308 { echo "$as_me:$LINENO: result: no" >&5
2309echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002310fi
2311
Martin v. Löwiseba40652007-08-30 20:10:57 +00002312 if test "x$ac_ct_CC" = x; then
2313 CC=""
2314 else
2315 case $cross_compiling:$ac_tool_warned in
2316yes:)
2317{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2318whose name does not start with the host triplet. If you think this
2319configuration is useful to you, please write to autoconf@gnu.org." >&5
2320echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2321whose name does not start with the host triplet. If you think this
2322configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2323ac_tool_warned=yes ;;
2324esac
2325 CC=$ac_ct_CC
2326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002327else
2328 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002329fi
2330
Jack Jansendd19cf82001-12-06 22:36:17 +00002331if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002332 if test -n "$ac_tool_prefix"; then
2333 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002334set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002335{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002337if test "${ac_cv_prog_CC+set}" = set; then
2338 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002339else
2340 if test -n "$CC"; then
2341 ac_cv_prog_CC="$CC" # Let the user override the test.
2342else
Martin v. Löwis11437992002-04-12 09:54:03 +00002343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2344for as_dir in $PATH
2345do
2346 IFS=$as_save_IFS
2347 test -z "$as_dir" && as_dir=.
2348 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002350 ac_cv_prog_CC="${ac_tool_prefix}cc"
2351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2352 break 2
2353 fi
2354done
2355done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002357
2358fi
2359fi
2360CC=$ac_cv_prog_CC
2361if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362 { echo "$as_me:$LINENO: result: $CC" >&5
2363echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002364else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002365 { echo "$as_me:$LINENO: result: no" >&5
2366echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002367fi
2368
Martin v. Löwiseba40652007-08-30 20:10:57 +00002369
Martin v. Löwis11437992002-04-12 09:54:03 +00002370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002371fi
2372if test -z "$CC"; then
2373 # Extract the first word of "cc", so it can be a program name with args.
2374set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002375{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002377if test "${ac_cv_prog_CC+set}" = set; then
2378 echo $ECHO_N "(cached) $ECHO_C" >&6
2379else
2380 if test -n "$CC"; then
2381 ac_cv_prog_CC="$CC" # Let the user override the test.
2382else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002383 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
2389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2392 ac_prog_rejected=yes
2393 continue
2394 fi
2395 ac_cv_prog_CC="cc"
2396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2397 break 2
2398 fi
2399done
2400done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002403if test $ac_prog_rejected = yes; then
2404 # We found a bogon in the path, so make sure we never use it.
2405 set dummy $ac_cv_prog_CC
2406 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002407 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002408 # We chose a different compiler from the bogus one.
2409 # However, it has the same basename, so the bogon will be chosen
2410 # first if we set CC to just the basename; use the full file name.
2411 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002413 fi
2414fi
2415fi
2416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002417CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002418if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419 { echo "$as_me:$LINENO: result: $CC" >&5
2420echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002421else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002422 { echo "$as_me:$LINENO: result: no" >&5
2423echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002424fi
2425
Martin v. Löwiseba40652007-08-30 20:10:57 +00002426
Martin v. Löwis11437992002-04-12 09:54:03 +00002427fi
2428if test -z "$CC"; then
2429 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 do
2432 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2433set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2435echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002436if test "${ac_cv_prog_CC+set}" = set; then
2437 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002438else
2439 if test -n "$CC"; then
2440 ac_cv_prog_CC="$CC" # Let the user override the test.
2441else
Martin v. Löwis11437992002-04-12 09:54:03 +00002442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445 IFS=$as_save_IFS
2446 test -z "$as_dir" && as_dir=.
2447 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2450 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2451 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002453done
2454done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002456
2457fi
2458fi
2459CC=$ac_cv_prog_CC
2460if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461 { echo "$as_me:$LINENO: result: $CC" >&5
2462echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464 { echo "$as_me:$LINENO: result: no" >&5
2465echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002466fi
2467
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 test -n "$CC" && break
2470 done
2471fi
2472if test -z "$CC"; then
2473 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002475do
2476 # Extract the first word of "$ac_prog", so it can be a program name with args.
2477set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2481 echo $ECHO_N "(cached) $ECHO_C" >&6
2482else
2483 if test -n "$ac_ct_CC"; then
2484 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2485else
2486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2487for as_dir in $PATH
2488do
2489 IFS=$as_save_IFS
2490 test -z "$as_dir" && as_dir=.
2491 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002492 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 ac_cv_prog_ac_ct_CC="$ac_prog"
2494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2495 break 2
2496 fi
2497done
2498done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002500
Martin v. Löwis11437992002-04-12 09:54:03 +00002501fi
2502fi
2503ac_ct_CC=$ac_cv_prog_ac_ct_CC
2504if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2506echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002510fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002511
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 test -n "$ac_ct_CC" && break
2514done
Michael W. Hudson54241132001-12-07 15:38:26 +00002515
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 if test "x$ac_ct_CC" = x; then
2517 CC=""
2518 else
2519 case $cross_compiling:$ac_tool_warned in
2520yes:)
2521{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2522whose name does not start with the host triplet. If you think this
2523configuration is useful to you, please write to autoconf@gnu.org." >&5
2524echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2525whose name does not start with the host triplet. If you think this
2526configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2527ac_tool_warned=yes ;;
2528esac
2529 CC=$ac_ct_CC
2530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002531fi
2532
2533fi
2534
2535
Skip Montanaro6dead952003-09-25 14:50:04 +00002536test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2537See \`config.log' for more details." >&5
2538echo "$as_me: error: no acceptable C compiler found in \$PATH
2539See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 { (exit 1); exit 1; }; }
2541
2542# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002544ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545{ (ac_try="$ac_compiler --version >&5"
2546case "(($ac_try" in
2547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2548 *) ac_try_echo=$ac_try;;
2549esac
2550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2551 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 ac_status=$?
2553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002555{ (ac_try="$ac_compiler -v >&5"
2556case "(($ac_try" in
2557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2558 *) ac_try_echo=$ac_try;;
2559esac
2560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2561 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 ac_status=$?
2563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2564 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565{ (ac_try="$ac_compiler -V >&5"
2566case "(($ac_try" in
2567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2568 *) ac_try_echo=$ac_try;;
2569esac
2570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2571 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); }
2575
2576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002577/* confdefs.h. */
2578_ACEOF
2579cat confdefs.h >>conftest.$ac_ext
2580cat >>conftest.$ac_ext <<_ACEOF
2581/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583int
2584main ()
2585{
2586
2587 ;
2588 return 0;
2589}
2590_ACEOF
2591ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002592ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593# Try to create an executable without -o first, disregard a.out.
2594# It will help us diagnose broken compilers, and finding out an intuition
2595# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2597echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002598ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002599#
2600# List of possible output files, starting from the most likely.
2601# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2602# only as a last resort. b.out is created by i960 compilers.
2603ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2604#
2605# The IRIX 6 linker writes into existing files which may not be
2606# executable, retaining their permissions. Remove them first so a
2607# subsequent execution test works.
2608ac_rmfiles=
2609for ac_file in $ac_files
2610do
2611 case $ac_file in
2612 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2613 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2614 esac
2615done
2616rm -f $ac_rmfiles
2617
2618if { (ac_try="$ac_link_default"
2619case "(($ac_try" in
2620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2621 *) ac_try_echo=$ac_try;;
2622esac
2623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2624 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_status=$?
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2629# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2630# in a Makefile. We should not override ac_cv_exeext if it was cached,
2631# so that the user can short-circuit this test for compilers unknown to
2632# Autoconf.
2633for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002634do
2635 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002638 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002639 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002640 # We found the default executable, but exeext='' is most
2641 # certainly right.
2642 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002643 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2645 then :; else
2646 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2647 fi
2648 # We set ac_cv_exeext here because the later test for it is not
2649 # safe: cross compilers may not add the suffix if given an `-o'
2650 # argument, so we may need to know it at that point already.
2651 # Even if this section looks crufty: it has the advantage of
2652 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002653 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002654 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002655 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 esac
2657done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658test "$ac_cv_exeext" = no && ac_cv_exeext=
2659
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002660else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002661 ac_file=''
2662fi
2663
2664{ echo "$as_me:$LINENO: result: $ac_file" >&5
2665echo "${ECHO_T}$ac_file" >&6; }
2666if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002668sed 's/^/| /' conftest.$ac_ext >&5
2669
2670{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2671See \`config.log' for more details." >&5
2672echo "$as_me: error: C compiler cannot create executables
2673See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002675fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002678
Martin v. Löwiseba40652007-08-30 20:10:57 +00002679# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002680# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002681{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2682echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002683# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2684# If not cross compiling, check that we can run a simple program.
2685if test "$cross_compiling" != yes; then
2686 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687 { (case "(($ac_try" in
2688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2689 *) ac_try_echo=$ac_try;;
2690esac
2691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2692 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 ac_status=$?
2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695 (exit $ac_status); }; }; then
2696 cross_compiling=no
2697 else
2698 if test "$cross_compiling" = maybe; then
2699 cross_compiling=yes
2700 else
2701 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002702If you meant to cross compile, use \`--host'.
2703See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002705If you meant to cross compile, use \`--host'.
2706See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 { (exit 1); exit 1; }; }
2708 fi
2709 fi
2710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002711{ echo "$as_me:$LINENO: result: yes" >&5
2712echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002713
Skip Montanaro6dead952003-09-25 14:50:04 +00002714rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002715ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002716# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002717# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002718{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2719echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2720{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2721echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002722
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2724echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2725if { (ac_try="$ac_link"
2726case "(($ac_try" in
2727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2728 *) ac_try_echo=$ac_try;;
2729esac
2730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2731 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 ac_status=$?
2733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734 (exit $ac_status); }; then
2735 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2736# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2737# work properly (i.e., refer to `conftest.exe'), while it won't with
2738# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002739for ac_file in conftest.exe conftest conftest.*; do
2740 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002742 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002744 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 * ) break;;
2746 esac
2747done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748else
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2750See \`config.log' for more details." >&5
2751echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2752See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002754fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002755
Martin v. Löwis11437992002-04-12 09:54:03 +00002756rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002757{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2758echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
2760rm -f conftest.$ac_ext
2761EXEEXT=$ac_cv_exeext
2762ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2764echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002765if test "${ac_cv_objext+set}" = set; then
2766 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002767else
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002769/* confdefs.h. */
2770_ACEOF
2771cat confdefs.h >>conftest.$ac_ext
2772cat >>conftest.$ac_ext <<_ACEOF
2773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002774
Martin v. Löwis11437992002-04-12 09:54:03 +00002775int
2776main ()
2777{
2778
2779 ;
2780 return 0;
2781}
2782_ACEOF
2783rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002784if { (ac_try="$ac_compile"
2785case "(($ac_try" in
2786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2787 *) ac_try_echo=$ac_try;;
2788esac
2789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2790 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 ac_status=$?
2792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794 for ac_file in conftest.o conftest.obj conftest.*; do
2795 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2799 break;;
2800 esac
2801done
2802else
2803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002804sed 's/^/| /' conftest.$ac_ext >&5
2805
2806{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2807See \`config.log' for more details." >&5
2808echo "$as_me: error: cannot compute suffix of object files: cannot compile
2809See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 { (exit 1); exit 1; }; }
2811fi
2812
2813rm -f conftest.$ac_cv_objext conftest.$ac_ext
2814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002815{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2816echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817OBJEXT=$ac_cv_objext
2818ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002819{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2820echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002821if test "${ac_cv_c_compiler_gnu+set}" = set; then
2822 echo $ECHO_N "(cached) $ECHO_C" >&6
2823else
2824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002825/* confdefs.h. */
2826_ACEOF
2827cat confdefs.h >>conftest.$ac_ext
2828cat >>conftest.$ac_ext <<_ACEOF
2829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002830
Martin v. Löwis11437992002-04-12 09:54:03 +00002831int
2832main ()
2833{
2834#ifndef __GNUC__
2835 choke me
2836#endif
2837
2838 ;
2839 return 0;
2840}
2841_ACEOF
2842rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002843if { (ac_try="$ac_compile"
2844case "(($ac_try" in
2845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2846 *) ac_try_echo=$ac_try;;
2847esac
2848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002851 grep -v '^ *+' conftest.er1 >conftest.err
2852 rm -f conftest.er1
2853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002855 (exit $ac_status); } && {
2856 test -z "$ac_c_werror_flag" ||
2857 test ! -s conftest.err
2858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002859 ac_compiler_gnu=yes
2860else
2861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002862sed 's/^/| /' conftest.$ac_ext >&5
2863
Martin v. Löwiseba40652007-08-30 20:10:57 +00002864 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002866
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002868ac_cv_c_compiler_gnu=$ac_compiler_gnu
2869
2870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002871{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2872echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002873GCC=`test $ac_compiler_gnu = yes && echo yes`
2874ac_test_CFLAGS=${CFLAGS+set}
2875ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002876{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2877echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002878if test "${ac_cv_prog_cc_g+set}" = set; then
2879 echo $ECHO_N "(cached) $ECHO_C" >&6
2880else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002881 ac_save_c_werror_flag=$ac_c_werror_flag
2882 ac_c_werror_flag=yes
2883 ac_cv_prog_cc_g=no
2884 CFLAGS="-g"
2885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002886/* confdefs.h. */
2887_ACEOF
2888cat confdefs.h >>conftest.$ac_ext
2889cat >>conftest.$ac_ext <<_ACEOF
2890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002891
Martin v. Löwis11437992002-04-12 09:54:03 +00002892int
2893main ()
2894{
2895
2896 ;
2897 return 0;
2898}
2899_ACEOF
2900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002901if { (ac_try="$ac_compile"
2902case "(($ac_try" in
2903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2904 *) ac_try_echo=$ac_try;;
2905esac
2906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002909 grep -v '^ *+' conftest.er1 >conftest.err
2910 rm -f conftest.er1
2911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002913 (exit $ac_status); } && {
2914 test -z "$ac_c_werror_flag" ||
2915 test ! -s conftest.err
2916 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002917 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002918else
Martin v. Löwis11437992002-04-12 09:54:03 +00002919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002920sed 's/^/| /' conftest.$ac_ext >&5
2921
Martin v. Löwiseba40652007-08-30 20:10:57 +00002922 CFLAGS=""
2923 cat >conftest.$ac_ext <<_ACEOF
2924/* confdefs.h. */
2925_ACEOF
2926cat confdefs.h >>conftest.$ac_ext
2927cat >>conftest.$ac_ext <<_ACEOF
2928/* end confdefs.h. */
2929
2930int
2931main ()
2932{
2933
2934 ;
2935 return 0;
2936}
2937_ACEOF
2938rm -f conftest.$ac_objext
2939if { (ac_try="$ac_compile"
2940case "(($ac_try" in
2941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2942 *) ac_try_echo=$ac_try;;
2943esac
2944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2945 (eval "$ac_compile") 2>conftest.er1
2946 ac_status=$?
2947 grep -v '^ *+' conftest.er1 >conftest.err
2948 rm -f conftest.er1
2949 cat conftest.err >&5
2950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951 (exit $ac_status); } && {
2952 test -z "$ac_c_werror_flag" ||
2953 test ! -s conftest.err
2954 } && test -s conftest.$ac_objext; then
2955 :
2956else
2957 echo "$as_me: failed program was:" >&5
2958sed 's/^/| /' conftest.$ac_ext >&5
2959
2960 ac_c_werror_flag=$ac_save_c_werror_flag
2961 CFLAGS="-g"
2962 cat >conftest.$ac_ext <<_ACEOF
2963/* confdefs.h. */
2964_ACEOF
2965cat confdefs.h >>conftest.$ac_ext
2966cat >>conftest.$ac_ext <<_ACEOF
2967/* end confdefs.h. */
2968
2969int
2970main ()
2971{
2972
2973 ;
2974 return 0;
2975}
2976_ACEOF
2977rm -f conftest.$ac_objext
2978if { (ac_try="$ac_compile"
2979case "(($ac_try" in
2980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2981 *) ac_try_echo=$ac_try;;
2982esac
2983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2984 (eval "$ac_compile") 2>conftest.er1
2985 ac_status=$?
2986 grep -v '^ *+' conftest.er1 >conftest.err
2987 rm -f conftest.er1
2988 cat conftest.err >&5
2989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2990 (exit $ac_status); } && {
2991 test -z "$ac_c_werror_flag" ||
2992 test ! -s conftest.err
2993 } && test -s conftest.$ac_objext; then
2994 ac_cv_prog_cc_g=yes
2995else
2996 echo "$as_me: failed program was:" >&5
2997sed 's/^/| /' conftest.$ac_ext >&5
2998
2999
Guido van Rossum627b2d71993-12-24 10:39:16 +00003000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003001
3002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003004
3005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006fi
3007
3008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3009 ac_c_werror_flag=$ac_save_c_werror_flag
3010fi
3011{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3012echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003013if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003014 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003015elif test $ac_cv_prog_cc_g = yes; then
3016 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003017 CFLAGS="-g -O2"
3018 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003019 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020 fi
3021else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003022 if test "$GCC" = yes; then
3023 CFLAGS="-O2"
3024 else
3025 CFLAGS=
3026 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003028{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3029echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3030if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003031 echo $ECHO_N "(cached) $ECHO_C" >&6
3032else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003033 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003034ac_save_CC=$CC
3035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003036/* confdefs.h. */
3037_ACEOF
3038cat confdefs.h >>conftest.$ac_ext
3039cat >>conftest.$ac_ext <<_ACEOF
3040/* end confdefs.h. */
3041#include <stdarg.h>
3042#include <stdio.h>
3043#include <sys/types.h>
3044#include <sys/stat.h>
3045/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3046struct buf { int x; };
3047FILE * (*rcsopen) (struct buf *, struct stat *, int);
3048static char *e (p, i)
3049 char **p;
3050 int i;
3051{
3052 return p[i];
3053}
3054static char *f (char * (*g) (char **, int), char **p, ...)
3055{
3056 char *s;
3057 va_list v;
3058 va_start (v,p);
3059 s = g (p, va_arg (v,int));
3060 va_end (v);
3061 return s;
3062}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003063
3064/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3065 function prototypes and stuff, but not '\xHH' hex character constants.
3066 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003068 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3069 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003070 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003071int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3072
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3074 inside strings and character constants. */
3075#define FOO(x) 'x'
3076int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3077
Skip Montanaro6dead952003-09-25 14:50:04 +00003078int test (int i, double x);
3079struct s1 {int (*f) (int a);};
3080struct s2 {int (*f) (double a);};
3081int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3082int argc;
3083char **argv;
3084int
3085main ()
3086{
3087return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3088 ;
3089 return 0;
3090}
3091_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3093 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003094do
3095 CC="$ac_save_CC $ac_arg"
3096 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003097if { (ac_try="$ac_compile"
3098case "(($ac_try" in
3099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3100 *) ac_try_echo=$ac_try;;
3101esac
3102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3103 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003105 grep -v '^ *+' conftest.er1 >conftest.err
3106 rm -f conftest.er1
3107 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003109 (exit $ac_status); } && {
3110 test -z "$ac_c_werror_flag" ||
3111 test ! -s conftest.err
3112 } && test -s conftest.$ac_objext; then
3113 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003114else
3115 echo "$as_me: failed program was:" >&5
3116sed 's/^/| /' conftest.$ac_ext >&5
3117
Martin v. Löwiseba40652007-08-30 20:10:57 +00003118
Skip Montanaro6dead952003-09-25 14:50:04 +00003119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003120
3121rm -f core conftest.err conftest.$ac_objext
3122 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003123done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003124rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003125CC=$ac_save_CC
3126
3127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128# AC_CACHE_VAL
3129case "x$ac_cv_prog_cc_c89" in
3130 x)
3131 { echo "$as_me:$LINENO: result: none needed" >&5
3132echo "${ECHO_T}none needed" >&6; } ;;
3133 xno)
3134 { echo "$as_me:$LINENO: result: unsupported" >&5
3135echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003136 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003137 CC="$CC $ac_cv_prog_cc_c89"
3138 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3139echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003140esac
3141
Skip Montanaro6dead952003-09-25 14:50:04 +00003142
Martin v. Löwis11437992002-04-12 09:54:03 +00003143ac_ext=c
3144ac_cpp='$CPP $CPPFLAGS'
3145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3147ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003149
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003150
3151
Martin v. Löwiseba40652007-08-30 20:10:57 +00003152{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3153echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003154
Martin v. Löwiseba40652007-08-30 20:10:57 +00003155# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003156if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003157 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003158
3159 case $withval in
3160 no) with_cxx_main=no
3161 MAINCC='$(CC)';;
3162 yes) with_cxx_main=yes
3163 MAINCC='$(CXX)';;
3164 *) with_cxx_main=yes
3165 MAINCC=$withval
3166 if test -z "$CXX"
3167 then
3168 CXX=$withval
3169 fi;;
3170 esac
3171else
3172
3173 with_cxx_main=no
3174 MAINCC='$(CC)'
3175
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176fi
3177
3178{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3179echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003180
3181preset_cxx="$CXX"
3182if test -z "$CXX"
3183then
3184 case "$CC" in
3185 gcc) # Extract the first word of "g++", so it can be a program name with args.
3186set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3188echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003189if test "${ac_cv_path_CXX+set}" = set; then
3190 echo $ECHO_N "(cached) $ECHO_C" >&6
3191else
3192 case $CXX in
3193 [\\/]* | ?:[\\/]*)
3194 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3195 ;;
3196 *)
3197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3198for as_dir in notfound
3199do
3200 IFS=$as_save_IFS
3201 test -z "$as_dir" && as_dir=.
3202 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003203 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003204 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3205 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3206 break 2
3207 fi
3208done
3209done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003211
3212 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3213 ;;
3214esac
3215fi
3216CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003217if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218 { echo "$as_me:$LINENO: result: $CXX" >&5
3219echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003220else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221 { echo "$as_me:$LINENO: result: no" >&5
3222echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003224
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003225 ;;
3226 cc) # Extract the first word of "c++", so it can be a program name with args.
3227set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3229echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003230if test "${ac_cv_path_CXX+set}" = set; then
3231 echo $ECHO_N "(cached) $ECHO_C" >&6
3232else
3233 case $CXX in
3234 [\\/]* | ?:[\\/]*)
3235 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3236 ;;
3237 *)
3238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239for as_dir in notfound
3240do
3241 IFS=$as_save_IFS
3242 test -z "$as_dir" && as_dir=.
3243 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003245 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3247 break 2
3248 fi
3249done
3250done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003252
3253 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3254 ;;
3255esac
3256fi
3257CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003258if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003259 { echo "$as_me:$LINENO: result: $CXX" >&5
3260echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003261else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262 { echo "$as_me:$LINENO: result: no" >&5
3263echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003265
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003266 ;;
3267 esac
3268 if test "$CXX" = "notfound"
3269 then
3270 CXX=""
3271 fi
3272fi
3273if test -z "$CXX"
3274then
3275 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3276do
3277 # Extract the first word of "$ac_prog", so it can be a program name with args.
3278set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003281if test "${ac_cv_prog_CXX+set}" = set; then
3282 echo $ECHO_N "(cached) $ECHO_C" >&6
3283else
3284 if test -n "$CXX"; then
3285 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3286else
3287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3288for as_dir in $PATH
3289do
3290 IFS=$as_save_IFS
3291 test -z "$as_dir" && as_dir=.
3292 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003294 ac_cv_prog_CXX="$ac_prog"
3295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3296 break 2
3297 fi
3298done
3299done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003300IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301
3302fi
3303fi
3304CXX=$ac_cv_prog_CXX
3305if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 { echo "$as_me:$LINENO: result: $CXX" >&5
3307echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003308else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003309 { echo "$as_me:$LINENO: result: no" >&5
3310echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003311fi
3312
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003314 test -n "$CXX" && break
3315done
3316test -n "$CXX" || CXX="notfound"
3317
3318 if test "$CXX" = "notfound"
3319 then
3320 CXX=""
3321 fi
3322fi
3323if test "$preset_cxx" != "$CXX"
3324then
3325 { echo "$as_me:$LINENO: WARNING:
3326
3327 By default, distutils will build C++ extension modules with \"$CXX\".
3328 If this is not intended, then set CXX on the configure command line.
3329 " >&5
3330echo "$as_me: WARNING:
3331
3332 By default, distutils will build C++ extension modules with \"$CXX\".
3333 If this is not intended, then set CXX on the configure command line.
3334 " >&2;}
3335fi
3336
3337
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003338# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003339
3340ac_ext=c
3341ac_cpp='$CPP $CPPFLAGS'
3342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3344ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3346echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003347# On Suns, sometimes $CPP names a directory.
3348if test -n "$CPP" && test -d "$CPP"; then
3349 CPP=
3350fi
3351if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003352 if test "${ac_cv_prog_CPP+set}" = set; then
3353 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003354else
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 # Double quotes because CPP needs to be expanded
3356 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3357 do
3358 ac_preproc_ok=false
3359for ac_c_preproc_warn_flag in '' yes
3360do
3361 # Use a header file that comes with gcc, so configuring glibc
3362 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003363 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3364 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003365 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 # not just through cpp. "Syntax error" is here to catch this case.
3367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003368/* confdefs.h. */
3369_ACEOF
3370cat confdefs.h >>conftest.$ac_ext
3371cat >>conftest.$ac_ext <<_ACEOF
3372/* end confdefs.h. */
3373#ifdef __STDC__
3374# include <limits.h>
3375#else
3376# include <assert.h>
3377#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003378 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003379_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003380if { (ac_try="$ac_cpp conftest.$ac_ext"
3381case "(($ac_try" in
3382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3383 *) ac_try_echo=$ac_try;;
3384esac
3385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3386 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003388 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003389 rm -f conftest.er1
3390 cat conftest.err >&5
3391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392 (exit $ac_status); } >/dev/null && {
3393 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3394 test ! -s conftest.err
3395 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003396 :
3397else
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003399sed 's/^/| /' conftest.$ac_ext >&5
3400
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 # Broken: fails on valid input.
3402continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003404
Martin v. Löwis11437992002-04-12 09:54:03 +00003405rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003406
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003408 # can be detected and how.
3409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003410/* confdefs.h. */
3411_ACEOF
3412cat confdefs.h >>conftest.$ac_ext
3413cat >>conftest.$ac_ext <<_ACEOF
3414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003415#include <ac_nonexistent.h>
3416_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003417if { (ac_try="$ac_cpp conftest.$ac_ext"
3418case "(($ac_try" in
3419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3420 *) ac_try_echo=$ac_try;;
3421esac
3422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3423 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003425 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 rm -f conftest.er1
3427 cat conftest.err >&5
3428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429 (exit $ac_status); } >/dev/null && {
3430 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3431 test ! -s conftest.err
3432 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 # Broken: success on invalid input.
3434continue
3435else
3436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003437sed 's/^/| /' conftest.$ac_ext >&5
3438
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # Passes both tests.
3440ac_preproc_ok=:
3441break
3442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444rm -f conftest.err conftest.$ac_ext
3445
3446done
3447# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3448rm -f conftest.err conftest.$ac_ext
3449if $ac_preproc_ok; then
3450 break
3451fi
3452
3453 done
3454 ac_cv_prog_CPP=$CPP
3455
3456fi
3457 CPP=$ac_cv_prog_CPP
3458else
3459 ac_cv_prog_CPP=$CPP
3460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003461{ echo "$as_me:$LINENO: result: $CPP" >&5
3462echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463ac_preproc_ok=false
3464for ac_c_preproc_warn_flag in '' yes
3465do
3466 # Use a header file that comes with gcc, so configuring glibc
3467 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003468 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3469 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 # On the NeXT, cc -E runs the code through the compiler's parser,
3471 # not just through cpp. "Syntax error" is here to catch this case.
3472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003473/* confdefs.h. */
3474_ACEOF
3475cat confdefs.h >>conftest.$ac_ext
3476cat >>conftest.$ac_ext <<_ACEOF
3477/* end confdefs.h. */
3478#ifdef __STDC__
3479# include <limits.h>
3480#else
3481# include <assert.h>
3482#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003483 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003484_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485if { (ac_try="$ac_cpp conftest.$ac_ext"
3486case "(($ac_try" in
3487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488 *) ac_try_echo=$ac_try;;
3489esac
3490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3491 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003493 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 rm -f conftest.er1
3495 cat conftest.err >&5
3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003497 (exit $ac_status); } >/dev/null && {
3498 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3499 test ! -s conftest.err
3500 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 :
3502else
3503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003504sed 's/^/| /' conftest.$ac_ext >&5
3505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # Broken: fails on valid input.
3507continue
3508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510rm -f conftest.err conftest.$ac_ext
3511
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 # can be detected and how.
3514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003515/* confdefs.h. */
3516_ACEOF
3517cat confdefs.h >>conftest.$ac_ext
3518cat >>conftest.$ac_ext <<_ACEOF
3519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003520#include <ac_nonexistent.h>
3521_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522if { (ac_try="$ac_cpp conftest.$ac_ext"
3523case "(($ac_try" in
3524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3525 *) ac_try_echo=$ac_try;;
3526esac
3527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3528 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003530 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 rm -f conftest.er1
3532 cat conftest.err >&5
3533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003534 (exit $ac_status); } >/dev/null && {
3535 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3536 test ! -s conftest.err
3537 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Broken: success on invalid input.
3539continue
3540else
3541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Passes both tests.
3545ac_preproc_ok=:
3546break
3547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003548
Martin v. Löwis11437992002-04-12 09:54:03 +00003549rm -f conftest.err conftest.$ac_ext
3550
3551done
3552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553rm -f conftest.err conftest.$ac_ext
3554if $ac_preproc_ok; then
3555 :
3556else
Skip Montanaro6dead952003-09-25 14:50:04 +00003557 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3558See \`config.log' for more details." >&5
3559echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3560See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 { (exit 1); exit 1; }; }
3562fi
3563
3564ac_ext=c
3565ac_cpp='$CPP $CPPFLAGS'
3566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3568ac_compiler_gnu=$ac_cv_c_compiler_gnu
3569
3570
Martin v. Löwiseba40652007-08-30 20:10:57 +00003571{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3572echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3573if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003574 echo $ECHO_N "(cached) $ECHO_C" >&6
3575else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003576 # Extract the first word of "grep ggrep" to use in msg output
3577if test -z "$GREP"; then
3578set dummy grep ggrep; ac_prog_name=$2
3579if test "${ac_cv_path_GREP+set}" = set; then
3580 echo $ECHO_N "(cached) $ECHO_C" >&6
3581else
3582 ac_path_GREP_found=false
3583# Loop through the user's path and test for each of PROGNAME-LIST
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
3589 for ac_prog in grep ggrep; do
3590 for ac_exec_ext in '' $ac_executable_extensions; do
3591 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3592 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3593 # Check for GNU ac_path_GREP and select it if it is found.
3594 # Check for GNU $ac_path_GREP
3595case `"$ac_path_GREP" --version 2>&1` in
3596*GNU*)
3597 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3598*)
3599 ac_count=0
3600 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3601 while :
3602 do
3603 cat "conftest.in" "conftest.in" >"conftest.tmp"
3604 mv "conftest.tmp" "conftest.in"
3605 cp "conftest.in" "conftest.nl"
3606 echo 'GREP' >> "conftest.nl"
3607 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3608 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3609 ac_count=`expr $ac_count + 1`
3610 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3611 # Best one so far, save it but keep looking for a better one
3612 ac_cv_path_GREP="$ac_path_GREP"
3613 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003614 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615 # 10*(2^10) chars as input seems more than enough
3616 test $ac_count -gt 10 && break
3617 done
3618 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3619esac
3620
3621
3622 $ac_path_GREP_found && break 3
3623 done
3624done
3625
3626done
3627IFS=$as_save_IFS
3628
3629
Skip Montanaro6dead952003-09-25 14:50:04 +00003630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631
3632GREP="$ac_cv_path_GREP"
3633if test -z "$GREP"; then
3634 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3635echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3636 { (exit 1); exit 1; }; }
3637fi
3638
3639else
3640 ac_cv_path_GREP=$GREP
3641fi
3642
3643
3644fi
3645{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3646echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3647 GREP="$ac_cv_path_GREP"
3648
3649
3650{ echo "$as_me:$LINENO: checking for egrep" >&5
3651echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3652if test "${ac_cv_path_EGREP+set}" = set; then
3653 echo $ECHO_N "(cached) $ECHO_C" >&6
3654else
3655 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3656 then ac_cv_path_EGREP="$GREP -E"
3657 else
3658 # Extract the first word of "egrep" to use in msg output
3659if test -z "$EGREP"; then
3660set dummy egrep; ac_prog_name=$2
3661if test "${ac_cv_path_EGREP+set}" = set; then
3662 echo $ECHO_N "(cached) $ECHO_C" >&6
3663else
3664 ac_path_EGREP_found=false
3665# Loop through the user's path and test for each of PROGNAME-LIST
3666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
3671 for ac_prog in egrep; do
3672 for ac_exec_ext in '' $ac_executable_extensions; do
3673 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3674 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3675 # Check for GNU ac_path_EGREP and select it if it is found.
3676 # Check for GNU $ac_path_EGREP
3677case `"$ac_path_EGREP" --version 2>&1` in
3678*GNU*)
3679 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3680*)
3681 ac_count=0
3682 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3683 while :
3684 do
3685 cat "conftest.in" "conftest.in" >"conftest.tmp"
3686 mv "conftest.tmp" "conftest.in"
3687 cp "conftest.in" "conftest.nl"
3688 echo 'EGREP' >> "conftest.nl"
3689 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3690 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3691 ac_count=`expr $ac_count + 1`
3692 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3693 # Best one so far, save it but keep looking for a better one
3694 ac_cv_path_EGREP="$ac_path_EGREP"
3695 ac_path_EGREP_max=$ac_count
3696 fi
3697 # 10*(2^10) chars as input seems more than enough
3698 test $ac_count -gt 10 && break
3699 done
3700 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3701esac
3702
3703
3704 $ac_path_EGREP_found && break 3
3705 done
3706done
3707
3708done
3709IFS=$as_save_IFS
3710
3711
3712fi
3713
3714EGREP="$ac_cv_path_EGREP"
3715if test -z "$EGREP"; then
3716 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3717echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3718 { (exit 1); exit 1; }; }
3719fi
3720
3721else
3722 ac_cv_path_EGREP=$EGREP
3723fi
3724
3725
3726 fi
3727fi
3728{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3729echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3730 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003731
3732
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734{ echo "$as_me:$LINENO: checking for AIX" >&5
3735echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003737/* confdefs.h. */
3738_ACEOF
3739cat confdefs.h >>conftest.$ac_ext
3740cat >>conftest.$ac_ext <<_ACEOF
3741/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003742#ifdef _AIX
3743 yes
3744#endif
3745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003748 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749 { echo "$as_me:$LINENO: result: yes" >&5
3750echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003752#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003753_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003754
3755else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003756 { echo "$as_me:$LINENO: result: no" >&5
3757echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003758fi
3759rm -f conftest*
3760
Michael W. Hudson54241132001-12-07 15:38:26 +00003761
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003762
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003763# Check for unsupported systems
3764case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003765atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003766 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3767 echo See README for details.
3768 exit 1;;
3769esac
3770
Michael W. Hudson54241132001-12-07 15:38:26 +00003771
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3773echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003774
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003776if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003778 case $withval in
3779 no) EXEEXT=;;
3780 yes) EXEEXT=.exe;;
3781 *) EXEEXT=$withval;;
3782 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783fi
3784
3785{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3786echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003787
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003788# Test whether we're running on a non-case-sensitive system, in which
3789# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003790
Martin v. Löwiseba40652007-08-30 20:10:57 +00003791{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3792echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003793if test ! -d CaseSensitiveTestDir; then
3794mkdir CaseSensitiveTestDir
3795fi
3796
3797if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003798then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003799 { echo "$as_me:$LINENO: result: yes" >&5
3800echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003801 BUILDEXEEXT=.exe
3802else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803 { echo "$as_me:$LINENO: result: no" >&5
3804echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003805 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003806fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003807rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003808
Guido van Rossumdd997f71998-10-07 19:58:26 +00003809case $MACHDEP in
3810bsdos*)
3811 case $CC in
3812 gcc) CC="$CC -D_HAVE_BSDI";;
3813 esac;;
3814esac
3815
Guido van Rossum24b1e751997-08-21 02:29:16 +00003816case $ac_sys_system in
3817hp*|HP*)
3818 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003819 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003820 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003821Monterey*)
3822 case $CC in
3823 cc) CC="$CC -Wl,-Bexport";;
3824 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003825SunOS*)
3826 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003827
3828cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003829#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003830_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003831
3832 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003833esac
3834
Michael W. Hudson54241132001-12-07 15:38:26 +00003835
3836
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3838echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003839if test -z "$LIBRARY"
3840then
3841 LIBRARY='libpython$(VERSION).a'
3842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003843{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3844echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003845
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003846# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003847# name of the library into which to insert object files). BLDLIBRARY is also
3848# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3849# is blank as the main program is not linked directly against LDLIBRARY.
3850# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3851# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3852# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3853# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003854#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003855# RUNSHARED is used to run shared python without installed libraries
3856#
3857# INSTSONAME is the name of the shared library that will be use to install
3858# on the system - some systems like version suffix, others don't
3859
3860
Michael W. Hudson54241132001-12-07 15:38:26 +00003861
3862
3863
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003864
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003865LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003866BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003867INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003868DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003869LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003870RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003871
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003872# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003873# If CXX is set, and if it is needed to link a main function that was
3874# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3875# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003876# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003877# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003878
Martin v. Löwiseba40652007-08-30 20:10:57 +00003879{ echo "$as_me:$LINENO: checking LINKCC" >&5
3880echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003881if test -z "$LINKCC"
3882then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003883 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003884 case $ac_sys_system in
3885 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003886 exp_extra="\"\""
3887 if test $ac_sys_release -ge 5 -o \
3888 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3889 exp_extra="."
3890 fi
3891 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003892 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003893 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003894 esac
3895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3897echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003898
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3900echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3901# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003902if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003903 enableval=$enable_shared;
3904fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003905
Martin v. Löwis1142de32002-03-29 16:28:31 +00003906
3907if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003908then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003909 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003910 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003911 enable_shared="yes";;
3912 *)
3913 enable_shared="no";;
3914 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003916{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3917echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003918
Martin v. Löwiseba40652007-08-30 20:10:57 +00003919{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3920echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3921# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003922if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003924 CC="$CC -pg"
3925 if test "$cross_compiling" = yes; then
3926 ac_enable_profiling="no"
3927else
3928 cat >conftest.$ac_ext <<_ACEOF
3929/* confdefs.h. */
3930_ACEOF
3931cat confdefs.h >>conftest.$ac_ext
3932cat >>conftest.$ac_ext <<_ACEOF
3933/* end confdefs.h. */
3934int main() { return 0; }
3935_ACEOF
3936rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003937if { (ac_try="$ac_link"
3938case "(($ac_try" in
3939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3940 *) ac_try_echo=$ac_try;;
3941esac
3942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3943 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003947 { (case "(($ac_try" in
3948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3949 *) ac_try_echo=$ac_try;;
3950esac
3951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3952 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003953 ac_status=$?
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955 (exit $ac_status); }; }; then
3956 ac_enable_profiling="yes"
3957else
3958 echo "$as_me: program exited with status $ac_status" >&5
3959echo "$as_me: failed program was:" >&5
3960sed 's/^/| /' conftest.$ac_ext >&5
3961
3962( exit $ac_status )
3963ac_enable_profiling="no"
3964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003967
3968
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003969 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003970fi
3971
3972{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3973echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003974
3975case "$ac_enable_profiling" in
3976 "yes")
3977 BASECFLAGS="-pg $BASECFLAGS"
3978 LDFLAGS="-pg $LDFLAGS"
3979 ;;
3980esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003981
Martin v. Löwiseba40652007-08-30 20:10:57 +00003982{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3983echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00003984
Guido van Rossumb8552162001-09-05 14:58:11 +00003985# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3986# library that we build, but we do not want to link against it (we
3987# will find it with a -framework option). For this reason there is an
3988# extra variable BLDLIBRARY against which Python and the extension
3989# modules are linked, BLDLIBRARY. This is normally the same as
3990# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003991if test "$enable_framework"
3992then
3993 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003994 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003995 BLDLIBRARY=''
3996else
3997 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003998fi
Jack Jansene578a632001-08-15 01:27:14 +00003999
Martin v. Löwis1142de32002-03-29 16:28:31 +00004000# Other platforms follow
4001if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004002
4003cat >>confdefs.h <<\_ACEOF
4004#define Py_ENABLE_SHARED 1
4005_ACEOF
4006
Martin v. Löwis1142de32002-03-29 16:28:31 +00004007 case $ac_sys_system in
4008 BeOS*)
4009 LDLIBRARY='libpython$(VERSION).so'
4010 ;;
4011 CYGWIN*)
4012 LDLIBRARY='libpython$(VERSION).dll.a'
4013 DLLLIBRARY='libpython$(VERSION).dll'
4014 ;;
4015 SunOS*)
4016 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004017 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004018 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004019 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004020 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004021 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004022 LDLIBRARY='libpython$(VERSION).so'
4023 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004024 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004025 case $ac_sys_system in
4026 FreeBSD*)
4027 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4028 ;;
4029 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004030 INSTSONAME="$LDLIBRARY".$SOVERSION
4031 ;;
4032 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004033 case `uname -m` in
4034 ia64)
4035 LDLIBRARY='libpython$(VERSION).so'
4036 ;;
4037 *)
4038 LDLIBRARY='libpython$(VERSION).sl'
4039 ;;
4040 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004041 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004042 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004043 ;;
4044 OSF*)
4045 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004046 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004047 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004048 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004049 atheos*)
4050 LDLIBRARY='libpython$(VERSION).so'
4051 BLDLIBRARY='-L. -lpython$(VERSION)'
4052 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4053 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004054 esac
Jason Tishler30765592003-09-04 11:04:06 +00004055else # shared is disabled
4056 case $ac_sys_system in
4057 CYGWIN*)
4058 BLDLIBRARY='$(LIBRARY)'
4059 LDLIBRARY='libpython$(VERSION).dll.a'
4060 ;;
4061 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004062fi
4063
Martin v. Löwiseba40652007-08-30 20:10:57 +00004064{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4065echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004066
Martin v. Löwis11437992002-04-12 09:54:03 +00004067if test -n "$ac_tool_prefix"; then
4068 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4069set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004070{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4071echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004072if test "${ac_cv_prog_RANLIB+set}" = set; then
4073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074else
4075 if test -n "$RANLIB"; then
4076 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4077else
Martin v. Löwis11437992002-04-12 09:54:03 +00004078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4079for as_dir in $PATH
4080do
4081 IFS=$as_save_IFS
4082 test -z "$as_dir" && as_dir=.
4083 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4086 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4087 break 2
4088 fi
4089done
4090done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004091IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004092
Guido van Rossum627b2d71993-12-24 10:39:16 +00004093fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004095RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004097 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4098echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004100 { echo "$as_me:$LINENO: result: no" >&5
4101echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004102fi
4103
Martin v. Löwiseba40652007-08-30 20:10:57 +00004104
Martin v. Löwis11437992002-04-12 09:54:03 +00004105fi
4106if test -z "$ac_cv_prog_RANLIB"; then
4107 ac_ct_RANLIB=$RANLIB
4108 # Extract the first word of "ranlib", so it can be a program name with args.
4109set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004110{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4111echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004112if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4113 echo $ECHO_N "(cached) $ECHO_C" >&6
4114else
4115 if test -n "$ac_ct_RANLIB"; then
4116 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4117else
4118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4119for as_dir in $PATH
4120do
4121 IFS=$as_save_IFS
4122 test -z "$as_dir" && as_dir=.
4123 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 ac_cv_prog_ac_ct_RANLIB="ranlib"
4126 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4127 break 2
4128 fi
4129done
4130done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004131IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004132
Martin v. Löwis11437992002-04-12 09:54:03 +00004133fi
4134fi
4135ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4136if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4138echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004139else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004140 { echo "$as_me:$LINENO: result: no" >&5
4141echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004142fi
4143
Martin v. Löwiseba40652007-08-30 20:10:57 +00004144 if test "x$ac_ct_RANLIB" = x; then
4145 RANLIB=":"
4146 else
4147 case $cross_compiling:$ac_tool_warned in
4148yes:)
4149{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4150whose name does not start with the host triplet. If you think this
4151configuration is useful to you, please write to autoconf@gnu.org." >&5
4152echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4153whose name does not start with the host triplet. If you think this
4154configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4155ac_tool_warned=yes ;;
4156esac
4157 RANLIB=$ac_ct_RANLIB
4158 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159else
4160 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004162
4163
Guido van Rossum7f43da71994-08-01 12:15:30 +00004164for ac_prog in ar aal
4165do
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4169echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004170if test "${ac_cv_prog_AR+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else
4173 if test -n "$AR"; then
4174 ac_cv_prog_AR="$AR" # Let the user override the test.
4175else
Martin v. Löwis11437992002-04-12 09:54:03 +00004176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177for as_dir in $PATH
4178do
4179 IFS=$as_save_IFS
4180 test -z "$as_dir" && as_dir=.
4181 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 ac_cv_prog_AR="$ac_prog"
4184 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4185 break 2
4186 fi
4187done
4188done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004190
Guido van Rossum7f43da71994-08-01 12:15:30 +00004191fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004193AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195 { echo "$as_me:$LINENO: result: $AR" >&5
4196echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004198 { echo "$as_me:$LINENO: result: no" >&5
4199echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004201
Martin v. Löwiseba40652007-08-30 20:10:57 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004204done
4205test -n "$AR" || AR="ar"
4206
Michael W. Hudson54241132001-12-07 15:38:26 +00004207
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004208
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004209# Extract the first word of "svnversion", so it can be a program name with args.
4210set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004211{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004213if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4214 echo $ECHO_N "(cached) $ECHO_C" >&6
4215else
4216 if test -n "$SVNVERSION"; then
4217 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4218else
4219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220for as_dir in $PATH
4221do
4222 IFS=$as_save_IFS
4223 test -z "$as_dir" && as_dir=.
4224 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004226 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004227 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4228 break 2
4229 fi
4230done
4231done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004232IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004233
Martin v. Löwisff600232006-04-03 19:12:32 +00004234 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004235fi
4236fi
4237SVNVERSION=$ac_cv_prog_SVNVERSION
4238if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4240echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004241else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242 { echo "$as_me:$LINENO: result: no" >&5
4243echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004244fi
4245
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004247if test $SVNVERSION = found
4248then
4249 SVNVERSION="svnversion \$(srcdir)"
4250else
4251 SVNVERSION="echo exported"
4252fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004253
Neil Schemenauera42c8272001-03-31 00:01:55 +00004254case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004255bsdos*|hp*|HP*)
4256 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004257 if test -z "$INSTALL"
4258 then
4259 INSTALL="${srcdir}/install-sh -c"
4260 fi
4261esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004262ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004263for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4264 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004265 ac_aux_dir=$ac_dir
4266 ac_install_sh="$ac_aux_dir/install-sh -c"
4267 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004268 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004269 ac_aux_dir=$ac_dir
4270 ac_install_sh="$ac_aux_dir/install.sh -c"
4271 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 ac_aux_dir=$ac_dir
4274 ac_install_sh="$ac_aux_dir/shtool install -c"
4275 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004276 fi
4277done
4278if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4280echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283
4284# These three variables are undocumented and unsupported,
4285# and are intended to be withdrawn in a future Autoconf release.
4286# They can cause serious problems if a builder's source tree is in a directory
4287# whose full name contains unusual characters.
4288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4291
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004292
4293# Find a good install program. We prefer a C program (faster),
4294# so one script is as good as another. But avoid the broken or
4295# incompatible versions:
4296# SysV /etc/install, /usr/sbin/install
4297# SunOS /usr/etc/install
4298# IRIX /sbin/install
4299# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004300# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004305# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4307echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004308if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004309if test "${ac_cv_path_install+set}" = set; then
4310 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004311else
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4313for as_dir in $PATH
4314do
4315 IFS=$as_save_IFS
4316 test -z "$as_dir" && as_dir=.
4317 # Account for people who put trailing slashes in PATH elements.
4318case $as_dir/ in
4319 ./ | .// | /cC/* | \
4320 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004322 /usr/ucb/* ) ;;
4323 *)
4324 # OSF1 and SCO ODT 3.0 have their own names for install.
4325 # Don't use installbsd from OSF since it installs stuff as root
4326 # by default.
4327 for ac_prog in ginstall scoinst install; do
4328 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004329 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00004330 if test $ac_prog = install &&
4331 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4332 # AIX install. It has an incompatible calling convention.
4333 :
4334 elif test $ac_prog = install &&
4335 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4336 # program-specific install script used by HP pwplus--don't use.
4337 :
4338 else
4339 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4340 break 3
4341 fi
4342 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004343 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 done
4345 ;;
4346esac
4347done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004348IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004349
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004350
4351fi
4352 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004353 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004354 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004355 # As a last resort, use the slow shell script. Don't cache a
4356 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004357 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004358 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360 fi
4361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004362{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4363echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004364
4365# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4366# It thinks the first close brace ends the variable substitution.
4367test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4368
Martin v. Löwis11437992002-04-12 09:54:03 +00004369test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004370
4371test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4372
Michael W. Hudson54241132001-12-07 15:38:26 +00004373
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004374# Not every filesystem supports hard links
4375
4376if test -z "$LN" ; then
4377 case $ac_sys_system in
4378 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004379 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004380 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004381 *) LN=ln;;
4382 esac
4383fi
4384
Fred Drake109d9862001-07-11 06:27:56 +00004385# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4387echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004388
Martin v. Löwiseba40652007-08-30 20:10:57 +00004389# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004390if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004392if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004393then
4394
4395cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004396#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004397_ACEOF
4398
Martin v. Löwiseba40652007-08-30 20:10:57 +00004399 { echo "$as_me:$LINENO: result: yes" >&5
4400echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004401 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402else { echo "$as_me:$LINENO: result: no" >&5
4403echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004404fi
4405else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004406 { echo "$as_me:$LINENO: result: no" >&5
4407echo "${ECHO_T}no" >&6; }
4408fi
4409
Fred Drake109d9862001-07-11 06:27:56 +00004410
Skip Montanarodecc6a42003-01-01 20:07:49 +00004411# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4412# merged with this chunk of code?
4413
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004414# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004415# ------------------------
4416# (The following bit of code is complicated enough - please keep things
4417# indented properly. Just pretend you're editing Python code. ;-)
4418
4419# There are two parallel sets of case statements below, one that checks to
4420# see if OPT was set and one that does BASECFLAGS setting based upon
4421# compiler and platform. BASECFLAGS tweaks need to be made even if the
4422# user set OPT.
4423
4424# tweak OPT based on compiler and platform, only if the user didn't set
4425# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004426
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004427if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004428then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004429 case $GCC in
4430 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004431 if test "$CC" != 'g++' ; then
4432 STRICT_PROTO="-Wstrict-prototypes"
4433 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004434 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4435 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4436 WRAP="-fwrapv"
4437 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004438 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004439 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004440 if test "$Py_DEBUG" = 'true' ; then
4441 # Optimization messes up debuggers, so turn it off for
4442 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004443 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004444 else
Thomas Hellere5529592007-12-13 21:20:29 +00004445 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004446 fi
4447 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004448 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004449 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004450 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004451 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004452 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004453 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4454 ;;
4455 esac
Fred Drake109d9862001-07-11 06:27:56 +00004456 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004457
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004458 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004459 OPT="-O"
4460 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004461 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004462
4463 # The current (beta) Monterey compiler dies with optimizations
4464 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004465 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004466 Monterey*)
4467 OPT=""
4468 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004469 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004470
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004471fi
4472
Skip Montanarodecc6a42003-01-01 20:07:49 +00004473
4474# tweak BASECFLAGS based on compiler and platform
4475case $GCC in
4476yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004477 # Python violates C99 rules, by casting between incompatible
4478 # pointer types. GCC may generate bad code as a result of that,
4479 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4481echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004482 ac_save_cc="$CC"
4483 CC="$CC -fno-strict-aliasing"
4484 if test "$cross_compiling" = yes; then
4485 ac_cv_no_strict_aliasing_ok=no
4486else
4487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004488/* confdefs.h. */
4489_ACEOF
4490cat confdefs.h >>conftest.$ac_ext
4491cat >>conftest.$ac_ext <<_ACEOF
4492/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004493int main() { return 0; }
4494_ACEOF
4495rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004496if { (ac_try="$ac_link"
4497case "(($ac_try" in
4498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4499 *) ac_try_echo=$ac_try;;
4500esac
4501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4502 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004503 ac_status=$?
4504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004506 { (case "(($ac_try" in
4507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4508 *) ac_try_echo=$ac_try;;
4509esac
4510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4511 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004512 ac_status=$?
4513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514 (exit $ac_status); }; }; then
4515 ac_cv_no_strict_aliasing_ok=yes
4516else
4517 echo "$as_me: program exited with status $ac_status" >&5
4518echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004519sed 's/^/| /' conftest.$ac_ext >&5
4520
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004521( exit $ac_status )
4522ac_cv_no_strict_aliasing_ok=no
4523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004526
4527
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004528 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004529 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4530echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004531 if test $ac_cv_no_strict_aliasing_ok = yes
4532 then
4533 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4534 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004535 case $ac_sys_system in
4536 SCO_SV*)
4537 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4538 ;;
4539 # is there any other compiler on Darwin besides gcc?
4540 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004541 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Ronald Oussoren988117f2006-04-29 11:31:35 +00004542 if test "${enable_universalsdk}"; then
4543 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4544 fi
4545
Skip Montanarodecc6a42003-01-01 20:07:49 +00004546 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004547 OSF*)
4548 BASECFLAGS="$BASECFLAGS -mieee"
4549 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004550 esac
4551 ;;
4552
4553*)
4554 case $ac_sys_system in
4555 OpenUNIX*|UnixWare*)
4556 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4557 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004558 OSF*)
4559 BASECFLAGS="$BASECFLAGS -ieee -std"
4560 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004561 SCO_SV*)
4562 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4563 ;;
4564 esac
4565 ;;
4566esac
4567
Fred Drakee1ceaa02001-12-04 20:55:47 +00004568if test "$Py_DEBUG" = 'true'; then
4569 :
4570else
4571 OPT="-DNDEBUG $OPT"
4572fi
4573
Guido van Rossum563e7081996-09-10 18:20:48 +00004574if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004575then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004576 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004577fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004578
Neal Norwitz020c46a2006-01-07 21:39:28 +00004579# disable check for icc since it seems to pass, but generates a warning
4580if test "$CC" = icc
4581then
4582 ac_cv_opt_olimit_ok=no
4583fi
4584
Martin v. Löwiseba40652007-08-30 20:10:57 +00004585{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4586echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004587if test "${ac_cv_opt_olimit_ok+set}" = set; then
4588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004589else
4590 ac_save_cc="$CC"
4591CC="$CC -OPT:Olimit=0"
4592if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004593 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004594else
Martin v. Löwis11437992002-04-12 09:54:03 +00004595 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. */
Guido van Rossum91922671997-10-09 20:24:13 +00004601int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004602_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öwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +00004620 ac_status=$?
4621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4622 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004623 ac_cv_opt_olimit_ok=yes
4624else
Martin v. Löwis11437992002-04-12 09:54:03 +00004625 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öwis11437992002-04-12 09:54:03 +00004629( exit $ac_status )
4630ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004631fi
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
Guido van Rossum91922671997-10-09 20:24:13 +00004633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004634
4635
Guido van Rossum91922671997-10-09 20:24:13 +00004636CC="$ac_save_cc"
4637fi
4638
Martin v. Löwiseba40652007-08-30 20:10:57 +00004639{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4640echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004641if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004642 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004643 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4644 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4645 # environment?
4646 Darwin*)
4647 ;;
4648 *)
4649 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4650 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004651 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004652else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004653 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4654echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004655 if test "${ac_cv_olimit_ok+set}" = set; then
4656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004657else
4658 ac_save_cc="$CC"
4659 CC="$CC -Olimit 1500"
4660 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004661 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004662else
Martin v. Löwis11437992002-04-12 09:54:03 +00004663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004664/* confdefs.h. */
4665_ACEOF
4666cat confdefs.h >>conftest.$ac_ext
4667cat >>conftest.$ac_ext <<_ACEOF
4668/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004669int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004670_ACEOF
4671rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004672if { (ac_try="$ac_link"
4673case "(($ac_try" in
4674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4675 *) ac_try_echo=$ac_try;;
4676esac
4677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4678 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004679 ac_status=$?
4680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4681 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004682 { (case "(($ac_try" in
4683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4684 *) ac_try_echo=$ac_try;;
4685esac
4686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4687 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004688 ac_status=$?
4689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4690 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004691 ac_cv_olimit_ok=yes
4692else
Martin v. Löwis11437992002-04-12 09:54:03 +00004693 echo "$as_me: program exited with status $ac_status" >&5
4694echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004695sed 's/^/| /' conftest.$ac_ext >&5
4696
Martin v. Löwis11437992002-04-12 09:54:03 +00004697( exit $ac_status )
4698ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004700rm -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 +00004701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004702
4703
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004704 CC="$ac_save_cc"
4705fi
4706
Martin v. Löwiseba40652007-08-30 20:10:57 +00004707 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4708echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004709 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004710 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004711 fi
4712fi
4713
Martin v. Löwisaac13162006-10-19 10:58:46 +00004714# Check whether GCC supports PyArg_ParseTuple format
4715if test "$GCC" = "yes"
4716then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004717 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4718echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004719 save_CFLAGS=$CFLAGS
4720 CFLAGS="$CFLAGS -Werror"
4721 cat >conftest.$ac_ext <<_ACEOF
4722/* confdefs.h. */
4723_ACEOF
4724cat confdefs.h >>conftest.$ac_ext
4725cat >>conftest.$ac_ext <<_ACEOF
4726/* end confdefs.h. */
4727
4728 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4729
4730int
4731main ()
4732{
4733
4734 ;
4735 return 0;
4736}
4737_ACEOF
4738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004739if { (ac_try="$ac_compile"
4740case "(($ac_try" in
4741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4742 *) ac_try_echo=$ac_try;;
4743esac
4744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004746 ac_status=$?
4747 grep -v '^ *+' conftest.er1 >conftest.err
4748 rm -f conftest.er1
4749 cat conftest.err >&5
4750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004751 (exit $ac_status); } && {
4752 test -z "$ac_c_werror_flag" ||
4753 test ! -s conftest.err
4754 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004755
4756cat >>confdefs.h <<\_ACEOF
4757#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4758_ACEOF
4759
Martin v. Löwiseba40652007-08-30 20:10:57 +00004760 { echo "$as_me:$LINENO: result: yes" >&5
4761echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004762else
4763 echo "$as_me: failed program was:" >&5
4764sed 's/^/| /' conftest.$ac_ext >&5
4765
Martin v. Löwiseba40652007-08-30 20:10:57 +00004766 { echo "$as_me:$LINENO: result: no" >&5
4767echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004768
4769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004770
4771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004772 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004773fi
4774
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004775# On some compilers, pthreads are available without further options
4776# (e.g. MacOS X). On some of these systems, the compiler will not
4777# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4778# So we have to see first whether pthreads are available without
4779# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004780{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4781echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004782if test "${ac_cv_pthread_is_default+set}" = set; then
4783 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004784else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004785 if test "$cross_compiling" = yes; then
4786 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004787else
Martin v. Löwis11437992002-04-12 09:54:03 +00004788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004789/* confdefs.h. */
4790_ACEOF
4791cat confdefs.h >>conftest.$ac_ext
4792cat >>conftest.$ac_ext <<_ACEOF
4793/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004794
Martin v. Löwis130fb172001-07-19 11:00:41 +00004795#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004796
4797void* routine(void* p){return NULL;}
4798
4799int main(){
4800 pthread_t p;
4801 if(pthread_create(&p,NULL,routine,NULL)!=0)
4802 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004803 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004804 return 0;
4805}
4806
Martin v. Löwis11437992002-04-12 09:54:03 +00004807_ACEOF
4808rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004809if { (ac_try="$ac_link"
4810case "(($ac_try" in
4811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4812 *) ac_try_echo=$ac_try;;
4813esac
4814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4815 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004816 ac_status=$?
4817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004819 { (case "(($ac_try" in
4820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4821 *) ac_try_echo=$ac_try;;
4822esac
4823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4824 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 ac_status=$?
4826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004828
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004829 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004830 ac_cv_kthread=no
4831 ac_cv_pthread=no
4832
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004833else
Martin v. Löwis11437992002-04-12 09:54:03 +00004834 echo "$as_me: program exited with status $ac_status" >&5
4835echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004836sed 's/^/| /' conftest.$ac_ext >&5
4837
Martin v. Löwis11437992002-04-12 09:54:03 +00004838( exit $ac_status )
4839ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004841rm -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 +00004842fi
4843
Martin v. Löwiseba40652007-08-30 20:10:57 +00004844
4845
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004846fi
4847
Martin v. Löwiseba40652007-08-30 20:10:57 +00004848{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4849echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004850
Michael W. Hudson54241132001-12-07 15:38:26 +00004851
Martin v. Löwis11437992002-04-12 09:54:03 +00004852if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004853then
4854 ac_cv_kpthread=no
4855else
4856# -Kpthread, if available, provides the right #defines
4857# and linker options to make pthread_create available
4858# Some compilers won't report that they do not support -Kpthread,
4859# so we need to run a program to see whether it really made the
4860# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004861{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4862echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004863if test "${ac_cv_kpthread+set}" = set; then
4864 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004865else
4866 ac_save_cc="$CC"
4867CC="$CC -Kpthread"
4868if test "$cross_compiling" = yes; then
4869 ac_cv_kpthread=no
4870else
Martin v. Löwis11437992002-04-12 09:54:03 +00004871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004872/* confdefs.h. */
4873_ACEOF
4874cat confdefs.h >>conftest.$ac_ext
4875cat >>conftest.$ac_ext <<_ACEOF
4876/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004877
4878#include <pthread.h>
4879
4880void* routine(void* p){return NULL;}
4881
4882int main(){
4883 pthread_t p;
4884 if(pthread_create(&p,NULL,routine,NULL)!=0)
4885 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004886 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004887 return 0;
4888}
4889
Martin v. Löwis11437992002-04-12 09:54:03 +00004890_ACEOF
4891rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004892if { (ac_try="$ac_link"
4893case "(($ac_try" in
4894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4895 *) ac_try_echo=$ac_try;;
4896esac
4897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4898 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004899 ac_status=$?
4900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004902 { (case "(($ac_try" in
4903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4904 *) ac_try_echo=$ac_try;;
4905esac
4906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4907 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004908 ac_status=$?
4909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4910 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004911 ac_cv_kpthread=yes
4912else
Martin v. Löwis11437992002-04-12 09:54:03 +00004913 echo "$as_me: program exited with status $ac_status" >&5
4914echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004915sed 's/^/| /' conftest.$ac_ext >&5
4916
Martin v. Löwis11437992002-04-12 09:54:03 +00004917( exit $ac_status )
4918ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004920rm -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 +00004921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922
4923
Martin v. Löwis130fb172001-07-19 11:00:41 +00004924CC="$ac_save_cc"
4925fi
4926
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4928echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004929fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004930
Skip Montanarod8d39a02003-07-10 20:44:10 +00004931if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004932then
4933# -Kthread, if available, provides the right #defines
4934# and linker options to make pthread_create available
4935# Some compilers won't report that they do not support -Kthread,
4936# so we need to run a program to see whether it really made the
4937# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4939echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004940if test "${ac_cv_kthread+set}" = set; then
4941 echo $ECHO_N "(cached) $ECHO_C" >&6
4942else
4943 ac_save_cc="$CC"
4944CC="$CC -Kthread"
4945if test "$cross_compiling" = yes; then
4946 ac_cv_kthread=no
4947else
4948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004949/* confdefs.h. */
4950_ACEOF
4951cat confdefs.h >>conftest.$ac_ext
4952cat >>conftest.$ac_ext <<_ACEOF
4953/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004954
4955#include <pthread.h>
4956
4957void* routine(void* p){return NULL;}
4958
4959int main(){
4960 pthread_t p;
4961 if(pthread_create(&p,NULL,routine,NULL)!=0)
4962 return 1;
4963 (void)pthread_detach(p);
4964 return 0;
4965}
4966
4967_ACEOF
4968rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004969if { (ac_try="$ac_link"
4970case "(($ac_try" in
4971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4972 *) ac_try_echo=$ac_try;;
4973esac
4974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4975 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004976 ac_status=$?
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004979 { (case "(($ac_try" in
4980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4981 *) ac_try_echo=$ac_try;;
4982esac
4983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4984 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004985 ac_status=$?
4986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4987 (exit $ac_status); }; }; then
4988 ac_cv_kthread=yes
4989else
4990 echo "$as_me: program exited with status $ac_status" >&5
4991echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004992sed 's/^/| /' conftest.$ac_ext >&5
4993
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004994( exit $ac_status )
4995ac_cv_kthread=no
4996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004997rm -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 +00004998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004999
5000
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005001CC="$ac_save_cc"
5002fi
5003
Martin v. Löwiseba40652007-08-30 20:10:57 +00005004{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5005echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005006fi
5007
Skip Montanarod8d39a02003-07-10 20:44:10 +00005008if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005009then
5010# -pthread, if available, provides the right #defines
5011# and linker options to make pthread_create available
5012# Some compilers won't report that they do not support -pthread,
5013# so we need to run a program to see whether it really made the
5014# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005015{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5016echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005017if test "${ac_cv_thread+set}" = set; then
5018 echo $ECHO_N "(cached) $ECHO_C" >&6
5019else
5020 ac_save_cc="$CC"
5021CC="$CC -pthread"
5022if test "$cross_compiling" = yes; then
5023 ac_cv_pthread=no
5024else
5025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005026/* confdefs.h. */
5027_ACEOF
5028cat confdefs.h >>conftest.$ac_ext
5029cat >>conftest.$ac_ext <<_ACEOF
5030/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005031
5032#include <pthread.h>
5033
5034void* routine(void* p){return NULL;}
5035
5036int main(){
5037 pthread_t p;
5038 if(pthread_create(&p,NULL,routine,NULL)!=0)
5039 return 1;
5040 (void)pthread_detach(p);
5041 return 0;
5042}
5043
5044_ACEOF
5045rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005046if { (ac_try="$ac_link"
5047case "(($ac_try" in
5048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5049 *) ac_try_echo=$ac_try;;
5050esac
5051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5052 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005053 ac_status=$?
5054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005056 { (case "(($ac_try" in
5057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5058 *) ac_try_echo=$ac_try;;
5059esac
5060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5061 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005062 ac_status=$?
5063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064 (exit $ac_status); }; }; then
5065 ac_cv_pthread=yes
5066else
5067 echo "$as_me: program exited with status $ac_status" >&5
5068echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005069sed 's/^/| /' conftest.$ac_ext >&5
5070
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005071( exit $ac_status )
5072ac_cv_pthread=no
5073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005074rm -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 +00005075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005076
5077
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005078CC="$ac_save_cc"
5079fi
5080
Martin v. Löwiseba40652007-08-30 20:10:57 +00005081{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5082echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005083fi
5084
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005085# If we have set a CC compiler flag for thread support then
5086# check if it works for CXX, too.
5087ac_cv_cxx_thread=no
5088if test ! -z "$CXX"
5089then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005090{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5091echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005092ac_save_cxx="$CXX"
5093
5094if test "$ac_cv_kpthread" = "yes"
5095then
5096 CXX="$CXX -Kpthread"
5097 ac_cv_cxx_thread=yes
5098elif test "$ac_cv_kthread" = "yes"
5099then
5100 CXX="$CXX -Kthread"
5101 ac_cv_cxx_thread=yes
5102elif test "$ac_cv_pthread" = "yes"
5103then
5104 CXX="$CXX -pthread"
5105 ac_cv_cxx_thread=yes
5106fi
5107
5108if test $ac_cv_cxx_thread = yes
5109then
5110 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5111 $CXX -c conftest.$ac_ext 2>&5
5112 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5113 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5114 then
5115 ac_cv_cxx_thread=yes
5116 else
5117 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005118 fi
5119 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005121{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5122echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005123fi
5124CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005125
Michael W. Hudson54241132001-12-07 15:38:26 +00005126
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005127# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005128{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5129echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005130if test "${ac_cv_header_stdc+set}" = set; then
5131 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005132else
Martin v. Löwis11437992002-04-12 09:54:03 +00005133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005134/* confdefs.h. */
5135_ACEOF
5136cat confdefs.h >>conftest.$ac_ext
5137cat >>conftest.$ac_ext <<_ACEOF
5138/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005139#include <stdlib.h>
5140#include <stdarg.h>
5141#include <string.h>
5142#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005143
Skip Montanaro6dead952003-09-25 14:50:04 +00005144int
5145main ()
5146{
5147
5148 ;
5149 return 0;
5150}
Martin v. Löwis11437992002-04-12 09:54:03 +00005151_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005152rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005153if { (ac_try="$ac_compile"
5154case "(($ac_try" in
5155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5156 *) ac_try_echo=$ac_try;;
5157esac
5158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005161 grep -v '^ *+' conftest.er1 >conftest.err
5162 rm -f conftest.er1
5163 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005165 (exit $ac_status); } && {
5166 test -z "$ac_c_werror_flag" ||
5167 test ! -s conftest.err
5168 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005169 ac_cv_header_stdc=yes
5170else
Martin v. Löwis11437992002-04-12 09:54:03 +00005171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005172sed 's/^/| /' conftest.$ac_ext >&5
5173
Martin v. Löwiseba40652007-08-30 20:10:57 +00005174 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005176
5177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005178
5179if test $ac_cv_header_stdc = yes; then
5180 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005182/* confdefs.h. */
5183_ACEOF
5184cat confdefs.h >>conftest.$ac_ext
5185cat >>conftest.$ac_ext <<_ACEOF
5186/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005188
5189_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005191 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005192 :
5193else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005194 ac_cv_header_stdc=no
5195fi
5196rm -f conftest*
5197
5198fi
5199
5200if test $ac_cv_header_stdc = yes; then
5201 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005203/* confdefs.h. */
5204_ACEOF
5205cat confdefs.h >>conftest.$ac_ext
5206cat >>conftest.$ac_ext <<_ACEOF
5207/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005208#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005209
5210_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005212 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005213 :
5214else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005215 ac_cv_header_stdc=no
5216fi
5217rm -f conftest*
5218
5219fi
5220
5221if test $ac_cv_header_stdc = yes; then
5222 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005223 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005224 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005225else
Martin v. Löwis11437992002-04-12 09:54:03 +00005226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005227/* confdefs.h. */
5228_ACEOF
5229cat confdefs.h >>conftest.$ac_ext
5230cat >>conftest.$ac_ext <<_ACEOF
5231/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005232#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005233#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005234#if ((' ' & 0x0FF) == 0x020)
5235# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5236# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5237#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005238# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005239 (('a' <= (c) && (c) <= 'i') \
5240 || ('j' <= (c) && (c) <= 'r') \
5241 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005242# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5243#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005244
Martin v. Löwis11437992002-04-12 09:54:03 +00005245#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5246int
5247main ()
5248{
5249 int i;
5250 for (i = 0; i < 256; i++)
5251 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005252 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005253 return 2;
5254 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005255}
5256_ACEOF
5257rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005258if { (ac_try="$ac_link"
5259case "(($ac_try" in
5260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5261 *) ac_try_echo=$ac_try;;
5262esac
5263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5264 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005265 ac_status=$?
5266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005268 { (case "(($ac_try" in
5269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5270 *) ac_try_echo=$ac_try;;
5271esac
5272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5273 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005274 ac_status=$?
5275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005277 :
5278else
Martin v. Löwis11437992002-04-12 09:54:03 +00005279 echo "$as_me: program exited with status $ac_status" >&5
5280echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005281sed 's/^/| /' conftest.$ac_ext >&5
5282
Martin v. Löwis11437992002-04-12 09:54:03 +00005283( exit $ac_status )
5284ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5287fi
5288
5289
Michael W. Hudson54241132001-12-07 15:38:26 +00005290fi
5291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005292{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5293echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005294if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005295
5296cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005297#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005298_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005299
5300fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005301
Skip Montanarob9820a32004-01-17 00:16:12 +00005302# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005313 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005314do
5315as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005316{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5317echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5318if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005319 echo $ECHO_N "(cached) $ECHO_C" >&6
5320else
5321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005322/* confdefs.h. */
5323_ACEOF
5324cat confdefs.h >>conftest.$ac_ext
5325cat >>conftest.$ac_ext <<_ACEOF
5326/* end confdefs.h. */
5327$ac_includes_default
5328
5329#include <$ac_header>
5330_ACEOF
5331rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005332if { (ac_try="$ac_compile"
5333case "(($ac_try" in
5334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5335 *) ac_try_echo=$ac_try;;
5336esac
5337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5338 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005340 grep -v '^ *+' conftest.er1 >conftest.err
5341 rm -f conftest.er1
5342 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005344 (exit $ac_status); } && {
5345 test -z "$ac_c_werror_flag" ||
5346 test ! -s conftest.err
5347 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005348 eval "$as_ac_Header=yes"
5349else
5350 echo "$as_me: failed program was:" >&5
5351sed 's/^/| /' conftest.$ac_ext >&5
5352
Martin v. Löwiseba40652007-08-30 20:10:57 +00005353 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005355
5356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005358ac_res=`eval echo '${'$as_ac_Header'}'`
5359 { echo "$as_me:$LINENO: result: $ac_res" >&5
5360echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005361if test `eval echo '${'$as_ac_Header'}'` = yes; then
5362 cat >>confdefs.h <<_ACEOF
5363#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5364_ACEOF
5365
5366fi
5367
5368done
5369
5370
Martin v. Löwis11437992002-04-12 09:54:03 +00005371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
Anthony Baxter8a560de2004-10-13 15:30:56 +00005407
Martin v. Löwisc3001752005-01-23 09:27:24 +00005408
Martin v. Löwis11017b12006-01-14 18:12:57 +00005409
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005410
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005411
5412
5413
5414
5415
5416
5417
5418
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005419
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005420for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5421fcntl.h grp.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005422io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
5423shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005424unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00005425sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
5426sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005427sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5428sys/time.h \
5429sys/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 +00005430sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00005431bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005432do
Martin v. Löwis11437992002-04-12 09:54:03 +00005433as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005434if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5435 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5436echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5437if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005438 echo $ECHO_N "(cached) $ECHO_C" >&6
5439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005440ac_res=`eval echo '${'$as_ac_Header'}'`
5441 { echo "$as_me:$LINENO: result: $ac_res" >&5
5442echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005443else
Martin v. Löwis11437992002-04-12 09:54:03 +00005444 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005445{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5446echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005447cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005448/* confdefs.h. */
5449_ACEOF
5450cat confdefs.h >>conftest.$ac_ext
5451cat >>conftest.$ac_ext <<_ACEOF
5452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005453$ac_includes_default
5454#include <$ac_header>
5455_ACEOF
5456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005457if { (ac_try="$ac_compile"
5458case "(($ac_try" in
5459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5460 *) ac_try_echo=$ac_try;;
5461esac
5462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5463 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005465 grep -v '^ *+' conftest.er1 >conftest.err
5466 rm -f conftest.er1
5467 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005469 (exit $ac_status); } && {
5470 test -z "$ac_c_werror_flag" ||
5471 test ! -s conftest.err
5472 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005473 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005474else
Martin v. Löwis11437992002-04-12 09:54:03 +00005475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005476sed 's/^/| /' conftest.$ac_ext >&5
5477
Martin v. Löwiseba40652007-08-30 20:10:57 +00005478 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005480
5481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5482{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5483echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005484
5485# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005486{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5487echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005488cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005489/* confdefs.h. */
5490_ACEOF
5491cat confdefs.h >>conftest.$ac_ext
5492cat >>conftest.$ac_ext <<_ACEOF
5493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005494#include <$ac_header>
5495_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005496if { (ac_try="$ac_cpp conftest.$ac_ext"
5497case "(($ac_try" in
5498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5499 *) ac_try_echo=$ac_try;;
5500esac
5501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5502 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005503 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005504 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005505 rm -f conftest.er1
5506 cat conftest.err >&5
5507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005508 (exit $ac_status); } >/dev/null && {
5509 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5510 test ! -s conftest.err
5511 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005512 ac_header_preproc=yes
5513else
5514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005515sed 's/^/| /' conftest.$ac_ext >&5
5516
Martin v. Löwis11437992002-04-12 09:54:03 +00005517 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005519
Martin v. Löwis11437992002-04-12 09:54:03 +00005520rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005521{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5522echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005523
5524# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005525case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5526 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005527 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5528echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005529 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5530echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5531 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005532 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005533 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005534 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5535echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005536 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5537echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5538 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5539echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5540 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5541echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005542 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5543echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005544 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5545echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005546 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005547## ------------------------------------------------ ##
5548## Report this to http://www.python.org/python-bugs ##
5549## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005550_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005551 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005552 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005553esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005554{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5555echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5556if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005557 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005558else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005559 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005561ac_res=`eval echo '${'$as_ac_Header'}'`
5562 { echo "$as_me:$LINENO: result: $ac_res" >&5
5563echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005564
5565fi
5566if test `eval echo '${'$as_ac_Header'}'` = yes; then
5567 cat >>confdefs.h <<_ACEOF
5568#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5569_ACEOF
5570
5571fi
5572
Guido van Rossum627b2d71993-12-24 10:39:16 +00005573done
5574
Martin v. Löwis11437992002-04-12 09:54:03 +00005575
5576
5577
5578
5579
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005580ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005581for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5582 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005583{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5584echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5585if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005586 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005587else
Martin v. Löwis11437992002-04-12 09:54:03 +00005588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005589/* confdefs.h. */
5590_ACEOF
5591cat confdefs.h >>conftest.$ac_ext
5592cat >>conftest.$ac_ext <<_ACEOF
5593/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005594#include <sys/types.h>
5595#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005596
Martin v. Löwis11437992002-04-12 09:54:03 +00005597int
5598main ()
5599{
5600if ((DIR *) 0)
5601return 0;
5602 ;
5603 return 0;
5604}
5605_ACEOF
5606rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005607if { (ac_try="$ac_compile"
5608case "(($ac_try" in
5609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5610 *) ac_try_echo=$ac_try;;
5611esac
5612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005615 grep -v '^ *+' conftest.er1 >conftest.err
5616 rm -f conftest.er1
5617 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005619 (exit $ac_status); } && {
5620 test -z "$ac_c_werror_flag" ||
5621 test ! -s conftest.err
5622 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005623 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005624else
Martin v. Löwis11437992002-04-12 09:54:03 +00005625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005626sed 's/^/| /' conftest.$ac_ext >&5
5627
Martin v. Löwiseba40652007-08-30 20:10:57 +00005628 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005630
5631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005633ac_res=`eval echo '${'$as_ac_Header'}'`
5634 { echo "$as_me:$LINENO: result: $ac_res" >&5
5635echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005636if test `eval echo '${'$as_ac_Header'}'` = yes; then
5637 cat >>confdefs.h <<_ACEOF
5638#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5639_ACEOF
5640
5641ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005642fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005643
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005644done
5645# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5646if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005647 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5648echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005649if test "${ac_cv_search_opendir+set}" = set; then
5650 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005651else
Martin v. Löwis11437992002-04-12 09:54:03 +00005652 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005654/* confdefs.h. */
5655_ACEOF
5656cat confdefs.h >>conftest.$ac_ext
5657cat >>conftest.$ac_ext <<_ACEOF
5658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005659
Martin v. Löwiseba40652007-08-30 20:10:57 +00005660/* Override any GCC internal prototype to avoid an error.
5661 Use char because int might match the return type of a GCC
5662 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005663#ifdef __cplusplus
5664extern "C"
5665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005666char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005667int
5668main ()
5669{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005670return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005671 ;
5672 return 0;
5673}
5674_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005675for ac_lib in '' dir; do
5676 if test -z "$ac_lib"; then
5677 ac_res="none required"
5678 else
5679 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005680 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005681 fi
5682 rm -f conftest.$ac_objext conftest$ac_exeext
5683if { (ac_try="$ac_link"
5684case "(($ac_try" in
5685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5686 *) ac_try_echo=$ac_try;;
5687esac
5688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5689 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005690 ac_status=$?
5691 grep -v '^ *+' conftest.er1 >conftest.err
5692 rm -f conftest.er1
5693 cat conftest.err >&5
5694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005695 (exit $ac_status); } && {
5696 test -z "$ac_c_werror_flag" ||
5697 test ! -s conftest.err
5698 } && test -s conftest$ac_exeext &&
5699 $as_test_x conftest$ac_exeext; then
5700 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005701else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005702 echo "$as_me: failed program was:" >&5
5703sed 's/^/| /' conftest.$ac_ext >&5
5704
Martin v. Löwiseba40652007-08-30 20:10:57 +00005705
Brett Cannon19fab762007-06-02 03:02:29 +00005706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005707
5708rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5709 conftest$ac_exeext
5710 if test "${ac_cv_search_opendir+set}" = set; then
5711 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005713done
5714if test "${ac_cv_search_opendir+set}" = set; then
5715 :
5716else
5717 ac_cv_search_opendir=no
5718fi
5719rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005720LIBS=$ac_func_search_save_LIBS
5721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005722{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5723echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5724ac_res=$ac_cv_search_opendir
5725if test "$ac_res" != no; then
5726 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005727
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005729
Michael W. Hudson54241132001-12-07 15:38:26 +00005730else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005731 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5732echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005733if test "${ac_cv_search_opendir+set}" = set; then
5734 echo $ECHO_N "(cached) $ECHO_C" >&6
5735else
5736 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005737cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005738/* confdefs.h. */
5739_ACEOF
5740cat confdefs.h >>conftest.$ac_ext
5741cat >>conftest.$ac_ext <<_ACEOF
5742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005743
Martin v. Löwiseba40652007-08-30 20:10:57 +00005744/* Override any GCC internal prototype to avoid an error.
5745 Use char because int might match the return type of a GCC
5746 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005747#ifdef __cplusplus
5748extern "C"
5749#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005750char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005751int
5752main ()
5753{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005754return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005755 ;
5756 return 0;
5757}
5758_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005759for ac_lib in '' x; do
5760 if test -z "$ac_lib"; then
5761 ac_res="none required"
5762 else
5763 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005764 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005765 fi
5766 rm -f conftest.$ac_objext conftest$ac_exeext
5767if { (ac_try="$ac_link"
5768case "(($ac_try" in
5769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5770 *) ac_try_echo=$ac_try;;
5771esac
5772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5773 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005774 ac_status=$?
5775 grep -v '^ *+' conftest.er1 >conftest.err
5776 rm -f conftest.er1
5777 cat conftest.err >&5
5778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005779 (exit $ac_status); } && {
5780 test -z "$ac_c_werror_flag" ||
5781 test ! -s conftest.err
5782 } && test -s conftest$ac_exeext &&
5783 $as_test_x conftest$ac_exeext; then
5784 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005785else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005786 echo "$as_me: failed program was:" >&5
5787sed 's/^/| /' conftest.$ac_ext >&5
5788
Martin v. Löwiseba40652007-08-30 20:10:57 +00005789
Brett Cannon19fab762007-06-02 03:02:29 +00005790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005791
5792rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5793 conftest$ac_exeext
5794 if test "${ac_cv_search_opendir+set}" = set; then
5795 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005797done
5798if test "${ac_cv_search_opendir+set}" = set; then
5799 :
5800else
5801 ac_cv_search_opendir=no
5802fi
5803rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005804LIBS=$ac_func_search_save_LIBS
5805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005806{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5807echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5808ac_res=$ac_cv_search_opendir
5809if test "$ac_res" != no; then
5810 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005811
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005812fi
5813
5814fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005815
Martin v. Löwiseba40652007-08-30 20:10:57 +00005816{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5817echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005818if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5819 echo $ECHO_N "(cached) $ECHO_C" >&6
5820else
5821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005822/* confdefs.h. */
5823_ACEOF
5824cat confdefs.h >>conftest.$ac_ext
5825cat >>conftest.$ac_ext <<_ACEOF
5826/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005827#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005828int
5829main ()
5830{
5831return makedev(0, 0);
5832 ;
5833 return 0;
5834}
5835_ACEOF
5836rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005837if { (ac_try="$ac_link"
5838case "(($ac_try" in
5839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5840 *) ac_try_echo=$ac_try;;
5841esac
5842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5843 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005845 grep -v '^ *+' conftest.er1 >conftest.err
5846 rm -f conftest.er1
5847 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005849 (exit $ac_status); } && {
5850 test -z "$ac_c_werror_flag" ||
5851 test ! -s conftest.err
5852 } && test -s conftest$ac_exeext &&
5853 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005854 ac_cv_header_sys_types_h_makedev=yes
5855else
5856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005857sed 's/^/| /' conftest.$ac_ext >&5
5858
Martin v. Löwiseba40652007-08-30 20:10:57 +00005859 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005861
5862rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005863 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005864
5865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005866{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5867echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005868
5869if test $ac_cv_header_sys_types_h_makedev = no; then
5870if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005871 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5872echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005873if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5874 echo $ECHO_N "(cached) $ECHO_C" >&6
5875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005876{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5877echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005878else
5879 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005880{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5881echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005882cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005883/* confdefs.h. */
5884_ACEOF
5885cat confdefs.h >>conftest.$ac_ext
5886cat >>conftest.$ac_ext <<_ACEOF
5887/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005888$ac_includes_default
5889#include <sys/mkdev.h>
5890_ACEOF
5891rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005892if { (ac_try="$ac_compile"
5893case "(($ac_try" in
5894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5895 *) ac_try_echo=$ac_try;;
5896esac
5897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005900 grep -v '^ *+' conftest.er1 >conftest.err
5901 rm -f conftest.er1
5902 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005904 (exit $ac_status); } && {
5905 test -z "$ac_c_werror_flag" ||
5906 test ! -s conftest.err
5907 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005908 ac_header_compiler=yes
5909else
5910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005911sed 's/^/| /' conftest.$ac_ext >&5
5912
Martin v. Löwiseba40652007-08-30 20:10:57 +00005913 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915
5916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5917{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5918echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005919
5920# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005921{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5922echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005923cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005924/* confdefs.h. */
5925_ACEOF
5926cat confdefs.h >>conftest.$ac_ext
5927cat >>conftest.$ac_ext <<_ACEOF
5928/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005929#include <sys/mkdev.h>
5930_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005931if { (ac_try="$ac_cpp conftest.$ac_ext"
5932case "(($ac_try" in
5933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5934 *) ac_try_echo=$ac_try;;
5935esac
5936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5937 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005938 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005939 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005940 rm -f conftest.er1
5941 cat conftest.err >&5
5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005943 (exit $ac_status); } >/dev/null && {
5944 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5945 test ! -s conftest.err
5946 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005947 ac_header_preproc=yes
5948else
5949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005950sed 's/^/| /' conftest.$ac_ext >&5
5951
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005952 ac_header_preproc=no
5953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005954
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005955rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005956{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5957echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005958
5959# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005960case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5961 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005962 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5963echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005964 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5965echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5966 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005967 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005968 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005969 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5970echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005971 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5972echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5973 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5974echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5975 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5976echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005977 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5978echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005979 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5980echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005981 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005982## ------------------------------------------------ ##
5983## Report this to http://www.python.org/python-bugs ##
5984## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005985_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005986 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005987 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005988esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005989{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5990echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005991if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5992 echo $ECHO_N "(cached) $ECHO_C" >&6
5993else
5994 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005996{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5997echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005998
5999fi
6000if test $ac_cv_header_sys_mkdev_h = yes; then
6001
6002cat >>confdefs.h <<\_ACEOF
6003#define MAJOR_IN_MKDEV 1
6004_ACEOF
6005
6006fi
6007
6008
6009
6010 if test $ac_cv_header_sys_mkdev_h = no; then
6011 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006012 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6013echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006014if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6015 echo $ECHO_N "(cached) $ECHO_C" >&6
6016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006017{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6018echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019else
6020 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6022echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006024/* confdefs.h. */
6025_ACEOF
6026cat confdefs.h >>conftest.$ac_ext
6027cat >>conftest.$ac_ext <<_ACEOF
6028/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029$ac_includes_default
6030#include <sys/sysmacros.h>
6031_ACEOF
6032rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006033if { (ac_try="$ac_compile"
6034case "(($ac_try" in
6035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6036 *) ac_try_echo=$ac_try;;
6037esac
6038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6039 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006041 grep -v '^ *+' conftest.er1 >conftest.err
6042 rm -f conftest.er1
6043 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006045 (exit $ac_status); } && {
6046 test -z "$ac_c_werror_flag" ||
6047 test ! -s conftest.err
6048 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049 ac_header_compiler=yes
6050else
6051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006052sed 's/^/| /' conftest.$ac_ext >&5
6053
Martin v. Löwiseba40652007-08-30 20:10:57 +00006054 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006056
6057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6058{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6059echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060
6061# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006062{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6063echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006065/* confdefs.h. */
6066_ACEOF
6067cat confdefs.h >>conftest.$ac_ext
6068cat >>conftest.$ac_ext <<_ACEOF
6069/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070#include <sys/sysmacros.h>
6071_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006072if { (ac_try="$ac_cpp conftest.$ac_ext"
6073case "(($ac_try" in
6074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6075 *) ac_try_echo=$ac_try;;
6076esac
6077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6078 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006080 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081 rm -f conftest.er1
6082 cat conftest.err >&5
6083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006084 (exit $ac_status); } >/dev/null && {
6085 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6086 test ! -s conftest.err
6087 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088 ac_header_preproc=yes
6089else
6090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006091sed 's/^/| /' conftest.$ac_ext >&5
6092
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093 ac_header_preproc=no
6094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006095
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006096rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006097{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6098echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099
6100# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006101case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6102 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6104echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006105 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6106echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6107 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006108 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006109 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006110 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6111echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006112 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6113echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6114 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6115echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6116 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6117echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006118 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6119echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006120 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6121echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006122 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006123## ------------------------------------------------ ##
6124## Report this to http://www.python.org/python-bugs ##
6125## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006126_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006127 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006128 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006129esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006130{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6131echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6133 echo $ECHO_N "(cached) $ECHO_C" >&6
6134else
6135 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006137{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6138echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139
6140fi
6141if test $ac_cv_header_sys_sysmacros_h = yes; then
6142
6143cat >>confdefs.h <<\_ACEOF
6144#define MAJOR_IN_SYSMACROS 1
6145_ACEOF
6146
6147fi
6148
6149
6150 fi
6151fi
6152
Michael W. Hudson54241132001-12-07 15:38:26 +00006153
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006154# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006155
6156for ac_header in term.h
6157do
6158as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006159{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6160echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6161if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006162 echo $ECHO_N "(cached) $ECHO_C" >&6
6163else
6164 cat >conftest.$ac_ext <<_ACEOF
6165/* confdefs.h. */
6166_ACEOF
6167cat confdefs.h >>conftest.$ac_ext
6168cat >>conftest.$ac_ext <<_ACEOF
6169/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006170
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006171#ifdef HAVE_CURSES_H
6172#include <curses.h>
6173#endif
6174
6175
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006176#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006177_ACEOF
6178rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006179if { (ac_try="$ac_compile"
6180case "(($ac_try" in
6181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6182 *) ac_try_echo=$ac_try;;
6183esac
6184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6185 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006186 ac_status=$?
6187 grep -v '^ *+' conftest.er1 >conftest.err
6188 rm -f conftest.er1
6189 cat conftest.err >&5
6190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006191 (exit $ac_status); } && {
6192 test -z "$ac_c_werror_flag" ||
6193 test ! -s conftest.err
6194 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006195 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006196else
6197 echo "$as_me: failed program was:" >&5
6198sed 's/^/| /' conftest.$ac_ext >&5
6199
Martin v. Löwiseba40652007-08-30 20:10:57 +00006200 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006202
6203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006205ac_res=`eval echo '${'$as_ac_Header'}'`
6206 { echo "$as_me:$LINENO: result: $ac_res" >&5
6207echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006208if test `eval echo '${'$as_ac_Header'}'` = yes; then
6209 cat >>confdefs.h <<_ACEOF
6210#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6211_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006212
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006213fi
6214
6215done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006216
6217
Martin v. Löwis11017b12006-01-14 18:12:57 +00006218# On Linux, netlink.h requires asm/types.h
6219
6220for ac_header in linux/netlink.h
6221do
6222as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006223{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6224echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6225if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006226 echo $ECHO_N "(cached) $ECHO_C" >&6
6227else
6228 cat >conftest.$ac_ext <<_ACEOF
6229/* confdefs.h. */
6230_ACEOF
6231cat confdefs.h >>conftest.$ac_ext
6232cat >>conftest.$ac_ext <<_ACEOF
6233/* end confdefs.h. */
6234
6235#ifdef HAVE_ASM_TYPES_H
6236#include <asm/types.h>
6237#endif
6238#ifdef HAVE_SYS_SOCKET_H
6239#include <sys/socket.h>
6240#endif
6241
6242
6243#include <$ac_header>
6244_ACEOF
6245rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006246if { (ac_try="$ac_compile"
6247case "(($ac_try" in
6248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6249 *) ac_try_echo=$ac_try;;
6250esac
6251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006253 ac_status=$?
6254 grep -v '^ *+' conftest.er1 >conftest.err
6255 rm -f conftest.er1
6256 cat conftest.err >&5
6257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006258 (exit $ac_status); } && {
6259 test -z "$ac_c_werror_flag" ||
6260 test ! -s conftest.err
6261 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006262 eval "$as_ac_Header=yes"
6263else
6264 echo "$as_me: failed program was:" >&5
6265sed 's/^/| /' conftest.$ac_ext >&5
6266
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006269
6270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006272ac_res=`eval echo '${'$as_ac_Header'}'`
6273 { echo "$as_me:$LINENO: result: $ac_res" >&5
6274echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006275if test `eval echo '${'$as_ac_Header'}'` = yes; then
6276 cat >>confdefs.h <<_ACEOF
6277#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6278_ACEOF
6279
6280fi
6281
6282done
6283
6284
Guido van Rossum627b2d71993-12-24 10:39:16 +00006285# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006286was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006287{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6288echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006290/* confdefs.h. */
6291_ACEOF
6292cat confdefs.h >>conftest.$ac_ext
6293cat >>conftest.$ac_ext <<_ACEOF
6294/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006295#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006296
6297_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006299 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006300 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006301else
Martin v. Löwis11437992002-04-12 09:54:03 +00006302
6303
6304cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006305#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006306_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006307
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006308
Guido van Rossum627b2d71993-12-24 10:39:16 +00006309fi
6310rm -f conftest*
6311
Martin v. Löwiseba40652007-08-30 20:10:57 +00006312{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6313echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006314
Neal Norwitz11690112002-07-30 01:08:28 +00006315# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006316{ echo "$as_me:$LINENO: checking for makedev" >&5
6317echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006318cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006319/* confdefs.h. */
6320_ACEOF
6321cat confdefs.h >>conftest.$ac_ext
6322cat >>conftest.$ac_ext <<_ACEOF
6323/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006324#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006325int
6326main ()
6327{
6328 makedev(0, 0)
6329 ;
6330 return 0;
6331}
6332_ACEOF
6333rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006334if { (ac_try="$ac_link"
6335case "(($ac_try" in
6336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6337 *) ac_try_echo=$ac_try;;
6338esac
6339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6340 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006342 grep -v '^ *+' conftest.er1 >conftest.err
6343 rm -f conftest.er1
6344 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006346 (exit $ac_status); } && {
6347 test -z "$ac_c_werror_flag" ||
6348 test ! -s conftest.err
6349 } && test -s conftest$ac_exeext &&
6350 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006351 ac_cv_has_makedev=yes
6352else
6353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006354sed 's/^/| /' conftest.$ac_ext >&5
6355
Martin v. Löwiseba40652007-08-30 20:10:57 +00006356 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006358
6359rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006360 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006361if test "$ac_cv_has_makedev" = "no"; then
6362 # we didn't link, try if _OSF_SOURCE will allow us to link
6363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006364/* confdefs.h. */
6365_ACEOF
6366cat confdefs.h >>conftest.$ac_ext
6367cat >>conftest.$ac_ext <<_ACEOF
6368/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006369
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006370#define _OSF_SOURCE 1
6371#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006372
Neal Norwitz11690112002-07-30 01:08:28 +00006373int
6374main ()
6375{
6376 makedev(0, 0)
6377 ;
6378 return 0;
6379}
6380_ACEOF
6381rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006382if { (ac_try="$ac_link"
6383case "(($ac_try" in
6384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6385 *) ac_try_echo=$ac_try;;
6386esac
6387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6388 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006390 grep -v '^ *+' conftest.er1 >conftest.err
6391 rm -f conftest.er1
6392 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006394 (exit $ac_status); } && {
6395 test -z "$ac_c_werror_flag" ||
6396 test ! -s conftest.err
6397 } && test -s conftest$ac_exeext &&
6398 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006399 ac_cv_has_makedev=yes
6400else
6401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006402sed 's/^/| /' conftest.$ac_ext >&5
6403
Martin v. Löwiseba40652007-08-30 20:10:57 +00006404 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006406
6407rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006408 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006409 if test "$ac_cv_has_makedev" = "yes"; then
6410
6411cat >>confdefs.h <<\_ACEOF
6412#define _OSF_SOURCE 1
6413_ACEOF
6414
6415 fi
6416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006417{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6418echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006419if test "$ac_cv_has_makedev" = "yes"; then
6420
6421cat >>confdefs.h <<\_ACEOF
6422#define HAVE_MAKEDEV 1
6423_ACEOF
6424
6425fi
6426
Martin v. Löwis399a6892002-10-04 10:22:02 +00006427# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6428# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6429# defined, but the compiler does not support pragma redefine_extname,
6430# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6431# structures (such as rlimit64) without declaring them. As a
6432# work-around, disable LFS on such configurations
6433
6434use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006435{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6436echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006437cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006438/* confdefs.h. */
6439_ACEOF
6440cat confdefs.h >>conftest.$ac_ext
6441cat >>conftest.$ac_ext <<_ACEOF
6442/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006443
6444#define _LARGEFILE_SOURCE 1
6445#define _FILE_OFFSET_BITS 64
6446#include <sys/resource.h>
6447
Martin v. Löwis399a6892002-10-04 10:22:02 +00006448int
6449main ()
6450{
6451struct rlimit foo;
6452 ;
6453 return 0;
6454}
6455_ACEOF
6456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006457if { (ac_try="$ac_compile"
6458case "(($ac_try" in
6459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6460 *) ac_try_echo=$ac_try;;
6461esac
6462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6463 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006465 grep -v '^ *+' conftest.er1 >conftest.err
6466 rm -f conftest.er1
6467 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006469 (exit $ac_status); } && {
6470 test -z "$ac_c_werror_flag" ||
6471 test ! -s conftest.err
6472 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006473 sol_lfs_bug=no
6474else
6475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006476sed 's/^/| /' conftest.$ac_ext >&5
6477
Martin v. Löwiseba40652007-08-30 20:10:57 +00006478 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006480
6481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6482{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6483echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006484if test "$sol_lfs_bug" = "yes"; then
6485 use_lfs=no
6486fi
6487
6488if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006489# Two defines needed to enable largefile support on various platforms
6490# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006491
Martin v. Löwis11437992002-04-12 09:54:03 +00006492cat >>confdefs.h <<\_ACEOF
6493#define _LARGEFILE_SOURCE 1
6494_ACEOF
6495
6496
6497cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006498#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006499_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006500
Martin v. Löwis399a6892002-10-04 10:22:02 +00006501fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006502
Guido van Rossum84e7b241996-08-19 21:59:00 +00006503# Add some code to confdefs.h so that the test for off_t works on SCO
6504cat >> confdefs.h <<\EOF
6505#if defined(SCO_DS)
6506#undef _OFF_T
6507#endif
6508EOF
6509
Guido van Rossumef2255b2000-03-10 22:30:29 +00006510# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006511{ echo "$as_me:$LINENO: checking for mode_t" >&5
6512echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006513if test "${ac_cv_type_mode_t+set}" = set; then
6514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006515else
Martin v. Löwis11437992002-04-12 09:54:03 +00006516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006517/* confdefs.h. */
6518_ACEOF
6519cat confdefs.h >>conftest.$ac_ext
6520cat >>conftest.$ac_ext <<_ACEOF
6521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006522$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006523typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006524int
6525main ()
6526{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006527if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006528 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006529if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006530 return 0;
6531 ;
6532 return 0;
6533}
6534_ACEOF
6535rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006536if { (ac_try="$ac_compile"
6537case "(($ac_try" in
6538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6539 *) ac_try_echo=$ac_try;;
6540esac
6541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006544 grep -v '^ *+' conftest.er1 >conftest.err
6545 rm -f conftest.er1
6546 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006548 (exit $ac_status); } && {
6549 test -z "$ac_c_werror_flag" ||
6550 test ! -s conftest.err
6551 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006552 ac_cv_type_mode_t=yes
6553else
Martin v. Löwis11437992002-04-12 09:54:03 +00006554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006555sed 's/^/| /' conftest.$ac_ext >&5
6556
Martin v. Löwiseba40652007-08-30 20:10:57 +00006557 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006559
6560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006562{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6563echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006564if test $ac_cv_type_mode_t = yes; then
6565 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006566else
Martin v. Löwis11437992002-04-12 09:54:03 +00006567
6568cat >>confdefs.h <<_ACEOF
6569#define mode_t int
6570_ACEOF
6571
6572fi
6573
Martin v. Löwiseba40652007-08-30 20:10:57 +00006574{ echo "$as_me:$LINENO: checking for off_t" >&5
6575echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006576if test "${ac_cv_type_off_t+set}" = set; then
6577 echo $ECHO_N "(cached) $ECHO_C" >&6
6578else
6579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006580/* confdefs.h. */
6581_ACEOF
6582cat confdefs.h >>conftest.$ac_ext
6583cat >>conftest.$ac_ext <<_ACEOF
6584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006585$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006586typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006587int
6588main ()
6589{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006590if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006591 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006592if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006593 return 0;
6594 ;
6595 return 0;
6596}
6597_ACEOF
6598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006599if { (ac_try="$ac_compile"
6600case "(($ac_try" in
6601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6602 *) ac_try_echo=$ac_try;;
6603esac
6604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006607 grep -v '^ *+' conftest.er1 >conftest.err
6608 rm -f conftest.er1
6609 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006611 (exit $ac_status); } && {
6612 test -z "$ac_c_werror_flag" ||
6613 test ! -s conftest.err
6614 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006615 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006616else
Martin v. Löwis11437992002-04-12 09:54:03 +00006617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006618sed 's/^/| /' conftest.$ac_ext >&5
6619
Martin v. Löwiseba40652007-08-30 20:10:57 +00006620 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006622
6623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006625{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6626echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006627if test $ac_cv_type_off_t = yes; then
6628 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006629else
Martin v. Löwis11437992002-04-12 09:54:03 +00006630
6631cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006632#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006633_ACEOF
6634
6635fi
6636
Martin v. Löwiseba40652007-08-30 20:10:57 +00006637{ echo "$as_me:$LINENO: checking for pid_t" >&5
6638echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006639if test "${ac_cv_type_pid_t+set}" = set; then
6640 echo $ECHO_N "(cached) $ECHO_C" >&6
6641else
6642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006643/* confdefs.h. */
6644_ACEOF
6645cat confdefs.h >>conftest.$ac_ext
6646cat >>conftest.$ac_ext <<_ACEOF
6647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006648$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006649typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006650int
6651main ()
6652{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006653if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006654 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006655if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006656 return 0;
6657 ;
6658 return 0;
6659}
6660_ACEOF
6661rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006662if { (ac_try="$ac_compile"
6663case "(($ac_try" in
6664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6665 *) ac_try_echo=$ac_try;;
6666esac
6667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006670 grep -v '^ *+' conftest.er1 >conftest.err
6671 rm -f conftest.er1
6672 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006674 (exit $ac_status); } && {
6675 test -z "$ac_c_werror_flag" ||
6676 test ! -s conftest.err
6677 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006678 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006679else
Martin v. Löwis11437992002-04-12 09:54:03 +00006680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006681sed 's/^/| /' conftest.$ac_ext >&5
6682
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006685
6686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006688{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6689echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006690if test $ac_cv_type_pid_t = yes; then
6691 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006692else
Martin v. Löwis11437992002-04-12 09:54:03 +00006693
6694cat >>confdefs.h <<_ACEOF
6695#define pid_t int
6696_ACEOF
6697
6698fi
6699
Martin v. Löwiseba40652007-08-30 20:10:57 +00006700{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6701echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006702if test "${ac_cv_type_signal+set}" = set; then
6703 echo $ECHO_N "(cached) $ECHO_C" >&6
6704else
6705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006706/* confdefs.h. */
6707_ACEOF
6708cat confdefs.h >>conftest.$ac_ext
6709cat >>conftest.$ac_ext <<_ACEOF
6710/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006711#include <sys/types.h>
6712#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006713
Martin v. Löwis11437992002-04-12 09:54:03 +00006714int
6715main ()
6716{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006717return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006718 ;
6719 return 0;
6720}
6721_ACEOF
6722rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006723if { (ac_try="$ac_compile"
6724case "(($ac_try" in
6725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6726 *) ac_try_echo=$ac_try;;
6727esac
6728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006731 grep -v '^ *+' conftest.er1 >conftest.err
6732 rm -f conftest.er1
6733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006735 (exit $ac_status); } && {
6736 test -z "$ac_c_werror_flag" ||
6737 test ! -s conftest.err
6738 } && test -s conftest.$ac_objext; then
6739 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006740else
Martin v. Löwis11437992002-04-12 09:54:03 +00006741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006742sed 's/^/| /' conftest.$ac_ext >&5
6743
Martin v. Löwiseba40652007-08-30 20:10:57 +00006744 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006746
6747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6750echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006751
Martin v. Löwis11437992002-04-12 09:54:03 +00006752cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006753#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006754_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006755
Michael W. Hudson54241132001-12-07 15:38:26 +00006756
Martin v. Löwiseba40652007-08-30 20:10:57 +00006757{ echo "$as_me:$LINENO: checking for size_t" >&5
6758echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006759if test "${ac_cv_type_size_t+set}" = set; then
6760 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006761else
Martin v. Löwis11437992002-04-12 09:54:03 +00006762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006763/* confdefs.h. */
6764_ACEOF
6765cat confdefs.h >>conftest.$ac_ext
6766cat >>conftest.$ac_ext <<_ACEOF
6767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006768$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006769typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006770int
6771main ()
6772{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006773if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006774 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006775if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006776 return 0;
6777 ;
6778 return 0;
6779}
6780_ACEOF
6781rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006782if { (ac_try="$ac_compile"
6783case "(($ac_try" in
6784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6785 *) ac_try_echo=$ac_try;;
6786esac
6787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6788 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006790 grep -v '^ *+' conftest.er1 >conftest.err
6791 rm -f conftest.er1
6792 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006794 (exit $ac_status); } && {
6795 test -z "$ac_c_werror_flag" ||
6796 test ! -s conftest.err
6797 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006798 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006799else
Martin v. Löwis11437992002-04-12 09:54:03 +00006800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006801sed 's/^/| /' conftest.$ac_ext >&5
6802
Martin v. Löwiseba40652007-08-30 20:10:57 +00006803 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006805
6806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6809echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006810if test $ac_cv_type_size_t = yes; then
6811 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006812else
Martin v. Löwis11437992002-04-12 09:54:03 +00006813
6814cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006815#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006816_ACEOF
6817
6818fi
6819
Martin v. Löwiseba40652007-08-30 20:10:57 +00006820{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6821echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006822if test "${ac_cv_type_uid_t+set}" = set; then
6823 echo $ECHO_N "(cached) $ECHO_C" >&6
6824else
6825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006826/* confdefs.h. */
6827_ACEOF
6828cat confdefs.h >>conftest.$ac_ext
6829cat >>conftest.$ac_ext <<_ACEOF
6830/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006831#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006832
6833_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006835 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006836 ac_cv_type_uid_t=yes
6837else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006838 ac_cv_type_uid_t=no
6839fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006840rm -f conftest*
6841
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006843{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6844echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006845if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006846
Martin v. Löwis11437992002-04-12 09:54:03 +00006847cat >>confdefs.h <<\_ACEOF
6848#define uid_t int
6849_ACEOF
6850
6851
6852cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006853#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006854_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006855
6856fi
6857
Martin v. Löwiseba40652007-08-30 20:10:57 +00006858{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6859echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006860if test "${ac_cv_type_ssize_t+set}" = set; then
6861 echo $ECHO_N "(cached) $ECHO_C" >&6
6862else
6863 cat >conftest.$ac_ext <<_ACEOF
6864/* confdefs.h. */
6865_ACEOF
6866cat confdefs.h >>conftest.$ac_ext
6867cat >>conftest.$ac_ext <<_ACEOF
6868/* end confdefs.h. */
6869$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006870typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006871int
6872main ()
6873{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006874if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006875 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006876if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006877 return 0;
6878 ;
6879 return 0;
6880}
6881_ACEOF
6882rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006883if { (ac_try="$ac_compile"
6884case "(($ac_try" in
6885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6886 *) ac_try_echo=$ac_try;;
6887esac
6888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006890 ac_status=$?
6891 grep -v '^ *+' conftest.er1 >conftest.err
6892 rm -f conftest.er1
6893 cat conftest.err >&5
6894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006895 (exit $ac_status); } && {
6896 test -z "$ac_c_werror_flag" ||
6897 test ! -s conftest.err
6898 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006899 ac_cv_type_ssize_t=yes
6900else
6901 echo "$as_me: failed program was:" >&5
6902sed 's/^/| /' conftest.$ac_ext >&5
6903
Martin v. Löwiseba40652007-08-30 20:10:57 +00006904 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006906
6907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006909{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6910echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006911if test $ac_cv_type_ssize_t = yes; then
6912
6913cat >>confdefs.h <<\_ACEOF
6914#define HAVE_SSIZE_T 1
6915_ACEOF
6916
6917fi
6918
Jack Jansendd19cf82001-12-06 22:36:17 +00006919
Michael W. Hudson54241132001-12-07 15:38:26 +00006920# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006921# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006922{ echo "$as_me:$LINENO: checking for int" >&5
6923echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006924if test "${ac_cv_type_int+set}" = set; then
6925 echo $ECHO_N "(cached) $ECHO_C" >&6
6926else
6927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006928/* confdefs.h. */
6929_ACEOF
6930cat confdefs.h >>conftest.$ac_ext
6931cat >>conftest.$ac_ext <<_ACEOF
6932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006933$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006934typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006935int
6936main ()
6937{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006939 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006940if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006941 return 0;
6942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006947if { (ac_try="$ac_compile"
6948case "(($ac_try" in
6949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6950 *) ac_try_echo=$ac_try;;
6951esac
6952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006955 grep -v '^ *+' conftest.er1 >conftest.err
6956 rm -f conftest.er1
6957 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006959 (exit $ac_status); } && {
6960 test -z "$ac_c_werror_flag" ||
6961 test ! -s conftest.err
6962 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006963 ac_cv_type_int=yes
6964else
6965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006966sed 's/^/| /' conftest.$ac_ext >&5
6967
Martin v. Löwiseba40652007-08-30 20:10:57 +00006968 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006969fi
Brett Cannon19fab762007-06-02 03:02:29 +00006970
Martin v. Löwiseba40652007-08-30 20:10:57 +00006971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6972fi
6973{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6974echo "${ECHO_T}$ac_cv_type_int" >&6; }
6975
6976# The cast to long int works around a bug in the HP C Compiler
6977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6979# This bug is HP SR number 8606223364.
6980{ echo "$as_me:$LINENO: checking size of int" >&5
6981echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006982if test "${ac_cv_sizeof_int+set}" = set; then
6983 echo $ECHO_N "(cached) $ECHO_C" >&6
6984else
Martin v. Löwis11437992002-04-12 09:54:03 +00006985 if test "$cross_compiling" = yes; then
6986 # Depending upon the size, compute the lo and hi bounds.
6987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006988/* confdefs.h. */
6989_ACEOF
6990cat confdefs.h >>conftest.$ac_ext
6991cat >>conftest.$ac_ext <<_ACEOF
6992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006993$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006994 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006995int
6996main ()
6997{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006998static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006999test_array [0] = 0
7000
7001 ;
7002 return 0;
7003}
7004_ACEOF
7005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007006if { (ac_try="$ac_compile"
7007case "(($ac_try" in
7008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7009 *) ac_try_echo=$ac_try;;
7010esac
7011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007014 grep -v '^ *+' conftest.er1 >conftest.err
7015 rm -f conftest.er1
7016 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007018 (exit $ac_status); } && {
7019 test -z "$ac_c_werror_flag" ||
7020 test ! -s conftest.err
7021 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007022 ac_lo=0 ac_mid=0
7023 while :; do
7024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007025/* confdefs.h. */
7026_ACEOF
7027cat confdefs.h >>conftest.$ac_ext
7028cat >>conftest.$ac_ext <<_ACEOF
7029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007030$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007031 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007032int
7033main ()
7034{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007035static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007036test_array [0] = 0
7037
7038 ;
7039 return 0;
7040}
7041_ACEOF
7042rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007043if { (ac_try="$ac_compile"
7044case "(($ac_try" in
7045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7046 *) ac_try_echo=$ac_try;;
7047esac
7048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007051 grep -v '^ *+' conftest.er1 >conftest.err
7052 rm -f conftest.er1
7053 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007055 (exit $ac_status); } && {
7056 test -z "$ac_c_werror_flag" ||
7057 test ! -s conftest.err
7058 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007059 ac_hi=$ac_mid; break
7060else
7061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007062sed 's/^/| /' conftest.$ac_ext >&5
7063
Martin v. Löwiseba40652007-08-30 20:10:57 +00007064 ac_lo=`expr $ac_mid + 1`
7065 if test $ac_lo -le $ac_mid; then
7066 ac_lo= ac_hi=
7067 break
7068 fi
7069 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007071
7072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007073 done
7074else
7075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007076sed 's/^/| /' conftest.$ac_ext >&5
7077
Martin v. Löwiseba40652007-08-30 20:10:57 +00007078 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007079/* confdefs.h. */
7080_ACEOF
7081cat confdefs.h >>conftest.$ac_ext
7082cat >>conftest.$ac_ext <<_ACEOF
7083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007084$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007085 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007086int
7087main ()
7088{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007090test_array [0] = 0
7091
7092 ;
7093 return 0;
7094}
7095_ACEOF
7096rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007097if { (ac_try="$ac_compile"
7098case "(($ac_try" in
7099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7100 *) ac_try_echo=$ac_try;;
7101esac
7102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007105 grep -v '^ *+' conftest.er1 >conftest.err
7106 rm -f conftest.er1
7107 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007109 (exit $ac_status); } && {
7110 test -z "$ac_c_werror_flag" ||
7111 test ! -s conftest.err
7112 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007113 ac_hi=-1 ac_mid=-1
7114 while :; do
7115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007116/* confdefs.h. */
7117_ACEOF
7118cat confdefs.h >>conftest.$ac_ext
7119cat >>conftest.$ac_ext <<_ACEOF
7120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007121$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007122 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007123int
7124main ()
7125{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007126static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007127test_array [0] = 0
7128
7129 ;
7130 return 0;
7131}
7132_ACEOF
7133rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007134if { (ac_try="$ac_compile"
7135case "(($ac_try" in
7136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7137 *) ac_try_echo=$ac_try;;
7138esac
7139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007142 grep -v '^ *+' conftest.er1 >conftest.err
7143 rm -f conftest.er1
7144 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007146 (exit $ac_status); } && {
7147 test -z "$ac_c_werror_flag" ||
7148 test ! -s conftest.err
7149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007150 ac_lo=$ac_mid; break
7151else
7152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007153sed 's/^/| /' conftest.$ac_ext >&5
7154
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155 ac_hi=`expr '(' $ac_mid ')' - 1`
7156 if test $ac_mid -le $ac_hi; then
7157 ac_lo= ac_hi=
7158 break
7159 fi
7160 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007162
7163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007164 done
7165else
7166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007167sed 's/^/| /' conftest.$ac_ext >&5
7168
Martin v. Löwiseba40652007-08-30 20:10:57 +00007169 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007171
7172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007174
7175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007176# Binary search between lo and hi bounds.
7177while test "x$ac_lo" != "x$ac_hi"; do
7178 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007180/* confdefs.h. */
7181_ACEOF
7182cat confdefs.h >>conftest.$ac_ext
7183cat >>conftest.$ac_ext <<_ACEOF
7184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007185$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007186 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007187int
7188main ()
7189{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007190static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007191test_array [0] = 0
7192
7193 ;
7194 return 0;
7195}
7196_ACEOF
7197rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007198if { (ac_try="$ac_compile"
7199case "(($ac_try" in
7200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7201 *) ac_try_echo=$ac_try;;
7202esac
7203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007206 grep -v '^ *+' conftest.er1 >conftest.err
7207 rm -f conftest.er1
7208 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007210 (exit $ac_status); } && {
7211 test -z "$ac_c_werror_flag" ||
7212 test ! -s conftest.err
7213 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007214 ac_hi=$ac_mid
7215else
7216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007217sed 's/^/| /' conftest.$ac_ext >&5
7218
Martin v. Löwiseba40652007-08-30 20:10:57 +00007219 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007221
7222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007223done
7224case $ac_lo in
7225?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007226'') if test "$ac_cv_type_int" = yes; then
7227 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007228See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007229echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007230See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007231 { (exit 77); exit 77; }; }
7232 else
7233 ac_cv_sizeof_int=0
7234 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007235esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007236else
Martin v. Löwis11437992002-04-12 09:54:03 +00007237 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007238/* confdefs.h. */
7239_ACEOF
7240cat confdefs.h >>conftest.$ac_ext
7241cat >>conftest.$ac_ext <<_ACEOF
7242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007243$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007244 typedef int ac__type_sizeof_;
7245static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7246static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007247#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007248#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007249int
7250main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007251{
Martin v. Löwis11437992002-04-12 09:54:03 +00007252
7253 FILE *f = fopen ("conftest.val", "w");
7254 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007255 return 1;
7256 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007257 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007258 long int i = longval ();
7259 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7260 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007261 fprintf (f, "%ld\n", i);
7262 }
7263 else
7264 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007265 unsigned long int i = ulongval ();
7266 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7267 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007268 fprintf (f, "%lu\n", i);
7269 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007270 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007271
7272 ;
7273 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007274}
Martin v. Löwis11437992002-04-12 09:54:03 +00007275_ACEOF
7276rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007277if { (ac_try="$ac_link"
7278case "(($ac_try" in
7279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7280 *) ac_try_echo=$ac_try;;
7281esac
7282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7283 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007284 ac_status=$?
7285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7286 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007287 { (case "(($ac_try" in
7288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7289 *) ac_try_echo=$ac_try;;
7290esac
7291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7292 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007293 ac_status=$?
7294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7295 (exit $ac_status); }; }; then
7296 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007297else
Martin v. Löwis11437992002-04-12 09:54:03 +00007298 echo "$as_me: program exited with status $ac_status" >&5
7299echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007300sed 's/^/| /' conftest.$ac_ext >&5
7301
Martin v. Löwis11437992002-04-12 09:54:03 +00007302( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007303if test "$ac_cv_type_int" = yes; then
7304 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007305See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007306echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007307See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007308 { (exit 77); exit 77; }; }
7309 else
7310 ac_cv_sizeof_int=0
7311 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007313rm -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 +00007314fi
7315rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007317{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7318echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7319
7320
7321
Martin v. Löwis11437992002-04-12 09:54:03 +00007322cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007323#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007324_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007325
7326
Martin v. Löwiseba40652007-08-30 20:10:57 +00007327{ echo "$as_me:$LINENO: checking for long" >&5
7328echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007329if test "${ac_cv_type_long+set}" = set; then
7330 echo $ECHO_N "(cached) $ECHO_C" >&6
7331else
7332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007333/* confdefs.h. */
7334_ACEOF
7335cat confdefs.h >>conftest.$ac_ext
7336cat >>conftest.$ac_ext <<_ACEOF
7337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007338$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007339typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007340int
7341main ()
7342{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007343if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007344 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007345if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007346 return 0;
7347 ;
7348 return 0;
7349}
7350_ACEOF
7351rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007352if { (ac_try="$ac_compile"
7353case "(($ac_try" in
7354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7355 *) ac_try_echo=$ac_try;;
7356esac
7357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7358 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007360 grep -v '^ *+' conftest.er1 >conftest.err
7361 rm -f conftest.er1
7362 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007364 (exit $ac_status); } && {
7365 test -z "$ac_c_werror_flag" ||
7366 test ! -s conftest.err
7367 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007368 ac_cv_type_long=yes
7369else
7370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007371sed 's/^/| /' conftest.$ac_ext >&5
7372
Martin v. Löwiseba40652007-08-30 20:10:57 +00007373 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007374fi
Brett Cannon19fab762007-06-02 03:02:29 +00007375
Martin v. Löwiseba40652007-08-30 20:10:57 +00007376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7377fi
7378{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7379echo "${ECHO_T}$ac_cv_type_long" >&6; }
7380
7381# The cast to long int works around a bug in the HP C Compiler
7382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7384# This bug is HP SR number 8606223364.
7385{ echo "$as_me:$LINENO: checking size of long" >&5
7386echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007387if test "${ac_cv_sizeof_long+set}" = set; then
7388 echo $ECHO_N "(cached) $ECHO_C" >&6
7389else
Martin v. Löwis11437992002-04-12 09:54:03 +00007390 if test "$cross_compiling" = yes; then
7391 # Depending upon the size, compute the lo and hi bounds.
7392cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007393/* confdefs.h. */
7394_ACEOF
7395cat confdefs.h >>conftest.$ac_ext
7396cat >>conftest.$ac_ext <<_ACEOF
7397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007398$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007399 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007400int
7401main ()
7402{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007403static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007404test_array [0] = 0
7405
7406 ;
7407 return 0;
7408}
7409_ACEOF
7410rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007411if { (ac_try="$ac_compile"
7412case "(($ac_try" in
7413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7414 *) ac_try_echo=$ac_try;;
7415esac
7416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007419 grep -v '^ *+' conftest.er1 >conftest.err
7420 rm -f conftest.er1
7421 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007423 (exit $ac_status); } && {
7424 test -z "$ac_c_werror_flag" ||
7425 test ! -s conftest.err
7426 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007427 ac_lo=0 ac_mid=0
7428 while :; do
7429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007430/* confdefs.h. */
7431_ACEOF
7432cat confdefs.h >>conftest.$ac_ext
7433cat >>conftest.$ac_ext <<_ACEOF
7434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007435$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007436 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007437int
7438main ()
7439{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007440static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007441test_array [0] = 0
7442
7443 ;
7444 return 0;
7445}
7446_ACEOF
7447rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007448if { (ac_try="$ac_compile"
7449case "(($ac_try" in
7450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7451 *) ac_try_echo=$ac_try;;
7452esac
7453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007456 grep -v '^ *+' conftest.er1 >conftest.err
7457 rm -f conftest.er1
7458 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007460 (exit $ac_status); } && {
7461 test -z "$ac_c_werror_flag" ||
7462 test ! -s conftest.err
7463 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007464 ac_hi=$ac_mid; break
7465else
7466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007467sed 's/^/| /' conftest.$ac_ext >&5
7468
Martin v. Löwiseba40652007-08-30 20:10:57 +00007469 ac_lo=`expr $ac_mid + 1`
7470 if test $ac_lo -le $ac_mid; then
7471 ac_lo= ac_hi=
7472 break
7473 fi
7474 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007476
7477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007478 done
7479else
7480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007481sed 's/^/| /' conftest.$ac_ext >&5
7482
Martin v. Löwiseba40652007-08-30 20:10:57 +00007483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007484/* confdefs.h. */
7485_ACEOF
7486cat confdefs.h >>conftest.$ac_ext
7487cat >>conftest.$ac_ext <<_ACEOF
7488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007489$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007490 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007491int
7492main ()
7493{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007495test_array [0] = 0
7496
7497 ;
7498 return 0;
7499}
7500_ACEOF
7501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007502if { (ac_try="$ac_compile"
7503case "(($ac_try" in
7504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7505 *) ac_try_echo=$ac_try;;
7506esac
7507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007510 grep -v '^ *+' conftest.er1 >conftest.err
7511 rm -f conftest.er1
7512 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007514 (exit $ac_status); } && {
7515 test -z "$ac_c_werror_flag" ||
7516 test ! -s conftest.err
7517 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 ac_hi=-1 ac_mid=-1
7519 while :; do
7520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007521/* confdefs.h. */
7522_ACEOF
7523cat confdefs.h >>conftest.$ac_ext
7524cat >>conftest.$ac_ext <<_ACEOF
7525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007526$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007527 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007528int
7529main ()
7530{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007531static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007532test_array [0] = 0
7533
7534 ;
7535 return 0;
7536}
7537_ACEOF
7538rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007539if { (ac_try="$ac_compile"
7540case "(($ac_try" in
7541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7542 *) ac_try_echo=$ac_try;;
7543esac
7544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007547 grep -v '^ *+' conftest.er1 >conftest.err
7548 rm -f conftest.er1
7549 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007551 (exit $ac_status); } && {
7552 test -z "$ac_c_werror_flag" ||
7553 test ! -s conftest.err
7554 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007555 ac_lo=$ac_mid; break
7556else
7557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007558sed 's/^/| /' conftest.$ac_ext >&5
7559
Martin v. Löwiseba40652007-08-30 20:10:57 +00007560 ac_hi=`expr '(' $ac_mid ')' - 1`
7561 if test $ac_mid -le $ac_hi; then
7562 ac_lo= ac_hi=
7563 break
7564 fi
7565 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007567
7568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007569 done
7570else
7571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007572sed 's/^/| /' conftest.$ac_ext >&5
7573
Martin v. Löwiseba40652007-08-30 20:10:57 +00007574 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007576
7577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007579
7580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007581# Binary search between lo and hi bounds.
7582while test "x$ac_lo" != "x$ac_hi"; do
7583 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007585/* confdefs.h. */
7586_ACEOF
7587cat confdefs.h >>conftest.$ac_ext
7588cat >>conftest.$ac_ext <<_ACEOF
7589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007590$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007591 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007592int
7593main ()
7594{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007596test_array [0] = 0
7597
7598 ;
7599 return 0;
7600}
7601_ACEOF
7602rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007603if { (ac_try="$ac_compile"
7604case "(($ac_try" in
7605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7606 *) ac_try_echo=$ac_try;;
7607esac
7608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007611 grep -v '^ *+' conftest.er1 >conftest.err
7612 rm -f conftest.er1
7613 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007615 (exit $ac_status); } && {
7616 test -z "$ac_c_werror_flag" ||
7617 test ! -s conftest.err
7618 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 ac_hi=$ac_mid
7620else
7621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007622sed 's/^/| /' conftest.$ac_ext >&5
7623
Martin v. Löwiseba40652007-08-30 20:10:57 +00007624 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007626
7627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007628done
7629case $ac_lo in
7630?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007631'') if test "$ac_cv_type_long" = yes; then
7632 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007633See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007634echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007635See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007636 { (exit 77); exit 77; }; }
7637 else
7638 ac_cv_sizeof_long=0
7639 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007640esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007641else
Martin v. Löwis11437992002-04-12 09:54:03 +00007642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007643/* confdefs.h. */
7644_ACEOF
7645cat confdefs.h >>conftest.$ac_ext
7646cat >>conftest.$ac_ext <<_ACEOF
7647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007648$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649 typedef long ac__type_sizeof_;
7650static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7651static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007652#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007653#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007654int
7655main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007656{
Martin v. Löwis11437992002-04-12 09:54:03 +00007657
7658 FILE *f = fopen ("conftest.val", "w");
7659 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007660 return 1;
7661 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007662 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007663 long int i = longval ();
7664 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7665 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007666 fprintf (f, "%ld\n", i);
7667 }
7668 else
7669 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007670 unsigned long int i = ulongval ();
7671 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7672 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 fprintf (f, "%lu\n", i);
7674 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007675 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007676
7677 ;
7678 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007679}
Martin v. Löwis11437992002-04-12 09:54:03 +00007680_ACEOF
7681rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682if { (ac_try="$ac_link"
7683case "(($ac_try" in
7684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7685 *) ac_try_echo=$ac_try;;
7686esac
7687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7688 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007689 ac_status=$?
7690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7691 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007692 { (case "(($ac_try" in
7693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7694 *) ac_try_echo=$ac_try;;
7695esac
7696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7697 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007698 ac_status=$?
7699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7700 (exit $ac_status); }; }; then
7701 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007702else
Martin v. Löwis11437992002-04-12 09:54:03 +00007703 echo "$as_me: program exited with status $ac_status" >&5
7704echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007705sed 's/^/| /' conftest.$ac_ext >&5
7706
Martin v. Löwis11437992002-04-12 09:54:03 +00007707( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007708if test "$ac_cv_type_long" = yes; then
7709 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007710See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007711echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007712See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007713 { (exit 77); exit 77; }; }
7714 else
7715 ac_cv_sizeof_long=0
7716 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007718rm -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 +00007719fi
7720rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007722{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7723echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7724
7725
7726
Martin v. Löwis11437992002-04-12 09:54:03 +00007727cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007728#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007729_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007730
7731
Martin v. Löwiseba40652007-08-30 20:10:57 +00007732{ echo "$as_me:$LINENO: checking for void *" >&5
7733echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007734if test "${ac_cv_type_void_p+set}" = set; then
7735 echo $ECHO_N "(cached) $ECHO_C" >&6
7736else
7737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007738/* confdefs.h. */
7739_ACEOF
7740cat confdefs.h >>conftest.$ac_ext
7741cat >>conftest.$ac_ext <<_ACEOF
7742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007743$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007744typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007745int
7746main ()
7747{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007749 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007750if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 return 0;
7752 ;
7753 return 0;
7754}
7755_ACEOF
7756rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007757if { (ac_try="$ac_compile"
7758case "(($ac_try" in
7759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7760 *) ac_try_echo=$ac_try;;
7761esac
7762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007765 grep -v '^ *+' conftest.er1 >conftest.err
7766 rm -f conftest.er1
7767 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007769 (exit $ac_status); } && {
7770 test -z "$ac_c_werror_flag" ||
7771 test ! -s conftest.err
7772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 ac_cv_type_void_p=yes
7774else
7775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007776sed 's/^/| /' conftest.$ac_ext >&5
7777
Martin v. Löwiseba40652007-08-30 20:10:57 +00007778 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007779fi
Brett Cannon19fab762007-06-02 03:02:29 +00007780
Martin v. Löwiseba40652007-08-30 20:10:57 +00007781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7782fi
7783{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7784echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7785
7786# The cast to long int works around a bug in the HP C Compiler
7787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7789# This bug is HP SR number 8606223364.
7790{ echo "$as_me:$LINENO: checking size of void *" >&5
7791echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007792if test "${ac_cv_sizeof_void_p+set}" = set; then
7793 echo $ECHO_N "(cached) $ECHO_C" >&6
7794else
Martin v. Löwis11437992002-04-12 09:54:03 +00007795 if test "$cross_compiling" = yes; then
7796 # Depending upon the size, compute the lo and hi bounds.
7797cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007798/* confdefs.h. */
7799_ACEOF
7800cat confdefs.h >>conftest.$ac_ext
7801cat >>conftest.$ac_ext <<_ACEOF
7802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007803$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007804 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007805int
7806main ()
7807{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007808static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007809test_array [0] = 0
7810
7811 ;
7812 return 0;
7813}
7814_ACEOF
7815rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007816if { (ac_try="$ac_compile"
7817case "(($ac_try" in
7818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7819 *) ac_try_echo=$ac_try;;
7820esac
7821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007824 grep -v '^ *+' conftest.er1 >conftest.err
7825 rm -f conftest.er1
7826 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007828 (exit $ac_status); } && {
7829 test -z "$ac_c_werror_flag" ||
7830 test ! -s conftest.err
7831 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 ac_lo=0 ac_mid=0
7833 while :; do
7834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007835/* confdefs.h. */
7836_ACEOF
7837cat confdefs.h >>conftest.$ac_ext
7838cat >>conftest.$ac_ext <<_ACEOF
7839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007840$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007841 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007842int
7843main ()
7844{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007845static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007846test_array [0] = 0
7847
7848 ;
7849 return 0;
7850}
7851_ACEOF
7852rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007853if { (ac_try="$ac_compile"
7854case "(($ac_try" in
7855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7856 *) ac_try_echo=$ac_try;;
7857esac
7858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007861 grep -v '^ *+' conftest.er1 >conftest.err
7862 rm -f conftest.er1
7863 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865 (exit $ac_status); } && {
7866 test -z "$ac_c_werror_flag" ||
7867 test ! -s conftest.err
7868 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 ac_hi=$ac_mid; break
7870else
7871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007872sed 's/^/| /' conftest.$ac_ext >&5
7873
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874 ac_lo=`expr $ac_mid + 1`
7875 if test $ac_lo -le $ac_mid; then
7876 ac_lo= ac_hi=
7877 break
7878 fi
7879 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007881
7882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007883 done
7884else
7885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007886sed 's/^/| /' conftest.$ac_ext >&5
7887
Martin v. Löwiseba40652007-08-30 20:10:57 +00007888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007889/* confdefs.h. */
7890_ACEOF
7891cat confdefs.h >>conftest.$ac_ext
7892cat >>conftest.$ac_ext <<_ACEOF
7893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007894$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007895 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007896int
7897main ()
7898{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007899static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007900test_array [0] = 0
7901
7902 ;
7903 return 0;
7904}
7905_ACEOF
7906rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007907if { (ac_try="$ac_compile"
7908case "(($ac_try" in
7909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7910 *) ac_try_echo=$ac_try;;
7911esac
7912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007915 grep -v '^ *+' conftest.er1 >conftest.err
7916 rm -f conftest.er1
7917 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007919 (exit $ac_status); } && {
7920 test -z "$ac_c_werror_flag" ||
7921 test ! -s conftest.err
7922 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 ac_hi=-1 ac_mid=-1
7924 while :; do
7925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007926/* confdefs.h. */
7927_ACEOF
7928cat confdefs.h >>conftest.$ac_ext
7929cat >>conftest.$ac_ext <<_ACEOF
7930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007931$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007933int
7934main ()
7935{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007936static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007937test_array [0] = 0
7938
7939 ;
7940 return 0;
7941}
7942_ACEOF
7943rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007944if { (ac_try="$ac_compile"
7945case "(($ac_try" in
7946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7947 *) ac_try_echo=$ac_try;;
7948esac
7949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007952 grep -v '^ *+' conftest.er1 >conftest.err
7953 rm -f conftest.er1
7954 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007956 (exit $ac_status); } && {
7957 test -z "$ac_c_werror_flag" ||
7958 test ! -s conftest.err
7959 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 ac_lo=$ac_mid; break
7961else
7962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007963sed 's/^/| /' conftest.$ac_ext >&5
7964
Martin v. Löwiseba40652007-08-30 20:10:57 +00007965 ac_hi=`expr '(' $ac_mid ')' - 1`
7966 if test $ac_mid -le $ac_hi; then
7967 ac_lo= ac_hi=
7968 break
7969 fi
7970 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007972
7973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 done
7975else
7976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007977sed 's/^/| /' conftest.$ac_ext >&5
7978
Martin v. Löwiseba40652007-08-30 20:10:57 +00007979 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007981
7982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007984
7985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007986# Binary search between lo and hi bounds.
7987while test "x$ac_lo" != "x$ac_hi"; do
7988 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007990/* confdefs.h. */
7991_ACEOF
7992cat confdefs.h >>conftest.$ac_ext
7993cat >>conftest.$ac_ext <<_ACEOF
7994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007995$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007996 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007997int
7998main ()
7999{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008001test_array [0] = 0
8002
8003 ;
8004 return 0;
8005}
8006_ACEOF
8007rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008008if { (ac_try="$ac_compile"
8009case "(($ac_try" in
8010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8011 *) ac_try_echo=$ac_try;;
8012esac
8013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008016 grep -v '^ *+' conftest.er1 >conftest.err
8017 rm -f conftest.er1
8018 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008020 (exit $ac_status); } && {
8021 test -z "$ac_c_werror_flag" ||
8022 test ! -s conftest.err
8023 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ac_hi=$ac_mid
8025else
8026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008027sed 's/^/| /' conftest.$ac_ext >&5
8028
Martin v. Löwiseba40652007-08-30 20:10:57 +00008029 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008031
8032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008033done
8034case $ac_lo in
8035?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008036'') if test "$ac_cv_type_void_p" = yes; then
8037 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008038See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008039echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008040See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008041 { (exit 77); exit 77; }; }
8042 else
8043 ac_cv_sizeof_void_p=0
8044 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008045esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008046else
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008048/* confdefs.h. */
8049_ACEOF
8050cat confdefs.h >>conftest.$ac_ext
8051cat >>conftest.$ac_ext <<_ACEOF
8052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008053$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054 typedef void * ac__type_sizeof_;
8055static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8056static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008057#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008058#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008059int
8060main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008061{
Martin v. Löwis11437992002-04-12 09:54:03 +00008062
8063 FILE *f = fopen ("conftest.val", "w");
8064 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008065 return 1;
8066 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008067 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008068 long int i = longval ();
8069 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8070 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008071 fprintf (f, "%ld\n", i);
8072 }
8073 else
8074 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008075 unsigned long int i = ulongval ();
8076 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8077 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 fprintf (f, "%lu\n", i);
8079 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008080 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
8082 ;
8083 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008084}
Martin v. Löwis11437992002-04-12 09:54:03 +00008085_ACEOF
8086rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008087if { (ac_try="$ac_link"
8088case "(($ac_try" in
8089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8090 *) ac_try_echo=$ac_try;;
8091esac
8092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8093 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008094 ac_status=$?
8095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8096 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008097 { (case "(($ac_try" in
8098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8099 *) ac_try_echo=$ac_try;;
8100esac
8101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8102 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008103 ac_status=$?
8104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8105 (exit $ac_status); }; }; then
8106 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008107else
Martin v. Löwis11437992002-04-12 09:54:03 +00008108 echo "$as_me: program exited with status $ac_status" >&5
8109echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008110sed 's/^/| /' conftest.$ac_ext >&5
8111
Martin v. Löwis11437992002-04-12 09:54:03 +00008112( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008113if test "$ac_cv_type_void_p" = yes; then
8114 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008115See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008116echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008117See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118 { (exit 77); exit 77; }; }
8119 else
8120 ac_cv_sizeof_void_p=0
8121 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008123rm -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 +00008124fi
8125rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008127{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8128echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8129
8130
8131
Martin v. Löwis11437992002-04-12 09:54:03 +00008132cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008133#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008134_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008135
8136
Martin v. Löwiseba40652007-08-30 20:10:57 +00008137{ echo "$as_me:$LINENO: checking for short" >&5
8138echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008139if test "${ac_cv_type_short+set}" = set; then
8140 echo $ECHO_N "(cached) $ECHO_C" >&6
8141else
8142 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008143/* confdefs.h. */
8144_ACEOF
8145cat confdefs.h >>conftest.$ac_ext
8146cat >>conftest.$ac_ext <<_ACEOF
8147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008148$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008149typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008150int
8151main ()
8152{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008153if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008154 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008156 return 0;
8157 ;
8158 return 0;
8159}
8160_ACEOF
8161rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008162if { (ac_try="$ac_compile"
8163case "(($ac_try" in
8164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8165 *) ac_try_echo=$ac_try;;
8166esac
8167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008170 grep -v '^ *+' conftest.er1 >conftest.err
8171 rm -f conftest.er1
8172 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008174 (exit $ac_status); } && {
8175 test -z "$ac_c_werror_flag" ||
8176 test ! -s conftest.err
8177 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008178 ac_cv_type_short=yes
8179else
8180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008181sed 's/^/| /' conftest.$ac_ext >&5
8182
Martin v. Löwiseba40652007-08-30 20:10:57 +00008183 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008184fi
Brett Cannon19fab762007-06-02 03:02:29 +00008185
Martin v. Löwiseba40652007-08-30 20:10:57 +00008186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8187fi
8188{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8189echo "${ECHO_T}$ac_cv_type_short" >&6; }
8190
8191# The cast to long int works around a bug in the HP C Compiler
8192# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8193# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8194# This bug is HP SR number 8606223364.
8195{ echo "$as_me:$LINENO: checking size of short" >&5
8196echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008197if test "${ac_cv_sizeof_short+set}" = set; then
8198 echo $ECHO_N "(cached) $ECHO_C" >&6
8199else
Martin v. Löwis11437992002-04-12 09:54:03 +00008200 if test "$cross_compiling" = yes; then
8201 # Depending upon the size, compute the lo and hi bounds.
8202cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008203/* confdefs.h. */
8204_ACEOF
8205cat confdefs.h >>conftest.$ac_ext
8206cat >>conftest.$ac_ext <<_ACEOF
8207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008208$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008209 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008210int
8211main ()
8212{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008214test_array [0] = 0
8215
8216 ;
8217 return 0;
8218}
8219_ACEOF
8220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008221if { (ac_try="$ac_compile"
8222case "(($ac_try" in
8223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8224 *) ac_try_echo=$ac_try;;
8225esac
8226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008229 grep -v '^ *+' conftest.er1 >conftest.err
8230 rm -f conftest.er1
8231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008233 (exit $ac_status); } && {
8234 test -z "$ac_c_werror_flag" ||
8235 test ! -s conftest.err
8236 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 ac_lo=0 ac_mid=0
8238 while :; do
8239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008240/* confdefs.h. */
8241_ACEOF
8242cat confdefs.h >>conftest.$ac_ext
8243cat >>conftest.$ac_ext <<_ACEOF
8244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008245$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008246 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008247int
8248main ()
8249{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008251test_array [0] = 0
8252
8253 ;
8254 return 0;
8255}
8256_ACEOF
8257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008258if { (ac_try="$ac_compile"
8259case "(($ac_try" in
8260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8261 *) ac_try_echo=$ac_try;;
8262esac
8263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008266 grep -v '^ *+' conftest.er1 >conftest.err
8267 rm -f conftest.er1
8268 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270 (exit $ac_status); } && {
8271 test -z "$ac_c_werror_flag" ||
8272 test ! -s conftest.err
8273 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 ac_hi=$ac_mid; break
8275else
8276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008277sed 's/^/| /' conftest.$ac_ext >&5
8278
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279 ac_lo=`expr $ac_mid + 1`
8280 if test $ac_lo -le $ac_mid; then
8281 ac_lo= ac_hi=
8282 break
8283 fi
8284 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008286
8287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008288 done
8289else
8290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008291sed 's/^/| /' conftest.$ac_ext >&5
8292
Martin v. Löwiseba40652007-08-30 20:10:57 +00008293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008294/* confdefs.h. */
8295_ACEOF
8296cat confdefs.h >>conftest.$ac_ext
8297cat >>conftest.$ac_ext <<_ACEOF
8298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008299$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008300 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008301int
8302main ()
8303{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008304static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008305test_array [0] = 0
8306
8307 ;
8308 return 0;
8309}
8310_ACEOF
8311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008312if { (ac_try="$ac_compile"
8313case "(($ac_try" in
8314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8315 *) ac_try_echo=$ac_try;;
8316esac
8317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8318 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008320 grep -v '^ *+' conftest.er1 >conftest.err
8321 rm -f conftest.er1
8322 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008324 (exit $ac_status); } && {
8325 test -z "$ac_c_werror_flag" ||
8326 test ! -s conftest.err
8327 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008328 ac_hi=-1 ac_mid=-1
8329 while :; do
8330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008331/* confdefs.h. */
8332_ACEOF
8333cat confdefs.h >>conftest.$ac_ext
8334cat >>conftest.$ac_ext <<_ACEOF
8335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008336$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008337 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008338int
8339main ()
8340{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008342test_array [0] = 0
8343
8344 ;
8345 return 0;
8346}
8347_ACEOF
8348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008349if { (ac_try="$ac_compile"
8350case "(($ac_try" in
8351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8352 *) ac_try_echo=$ac_try;;
8353esac
8354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008357 grep -v '^ *+' conftest.er1 >conftest.err
8358 rm -f conftest.er1
8359 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008361 (exit $ac_status); } && {
8362 test -z "$ac_c_werror_flag" ||
8363 test ! -s conftest.err
8364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 ac_lo=$ac_mid; break
8366else
8367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008368sed 's/^/| /' conftest.$ac_ext >&5
8369
Martin v. Löwiseba40652007-08-30 20:10:57 +00008370 ac_hi=`expr '(' $ac_mid ')' - 1`
8371 if test $ac_mid -le $ac_hi; then
8372 ac_lo= ac_hi=
8373 break
8374 fi
8375 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008377
8378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008379 done
8380else
8381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008382sed 's/^/| /' conftest.$ac_ext >&5
8383
Martin v. Löwiseba40652007-08-30 20:10:57 +00008384 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386
8387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008389
8390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008391# Binary search between lo and hi bounds.
8392while test "x$ac_lo" != "x$ac_hi"; do
8393 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008395/* confdefs.h. */
8396_ACEOF
8397cat confdefs.h >>conftest.$ac_ext
8398cat >>conftest.$ac_ext <<_ACEOF
8399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008400$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008401 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008402int
8403main ()
8404{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008405static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008406test_array [0] = 0
8407
8408 ;
8409 return 0;
8410}
8411_ACEOF
8412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008413if { (ac_try="$ac_compile"
8414case "(($ac_try" in
8415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8416 *) ac_try_echo=$ac_try;;
8417esac
8418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008421 grep -v '^ *+' conftest.er1 >conftest.err
8422 rm -f conftest.er1
8423 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008425 (exit $ac_status); } && {
8426 test -z "$ac_c_werror_flag" ||
8427 test ! -s conftest.err
8428 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008429 ac_hi=$ac_mid
8430else
8431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008432sed 's/^/| /' conftest.$ac_ext >&5
8433
Martin v. Löwiseba40652007-08-30 20:10:57 +00008434 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008436
8437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008438done
8439case $ac_lo in
8440?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008441'') if test "$ac_cv_type_short" = yes; then
8442 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008443See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008444echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008445See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008446 { (exit 77); exit 77; }; }
8447 else
8448 ac_cv_sizeof_short=0
8449 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008450esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008451else
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008453/* confdefs.h. */
8454_ACEOF
8455cat confdefs.h >>conftest.$ac_ext
8456cat >>conftest.$ac_ext <<_ACEOF
8457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459 typedef short ac__type_sizeof_;
8460static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8461static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008462#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008463#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008464int
8465main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008466{
Martin v. Löwis11437992002-04-12 09:54:03 +00008467
8468 FILE *f = fopen ("conftest.val", "w");
8469 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008470 return 1;
8471 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008472 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008473 long int i = longval ();
8474 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8475 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 fprintf (f, "%ld\n", i);
8477 }
8478 else
8479 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480 unsigned long int i = ulongval ();
8481 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8482 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 fprintf (f, "%lu\n", i);
8484 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008485 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008486
8487 ;
8488 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008489}
Martin v. Löwis11437992002-04-12 09:54:03 +00008490_ACEOF
8491rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008492if { (ac_try="$ac_link"
8493case "(($ac_try" in
8494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8495 *) ac_try_echo=$ac_try;;
8496esac
8497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8498 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 ac_status=$?
8500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8501 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008502 { (case "(($ac_try" in
8503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8504 *) ac_try_echo=$ac_try;;
8505esac
8506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8507 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 ac_status=$?
8509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8510 (exit $ac_status); }; }; then
8511 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008512else
Martin v. Löwis11437992002-04-12 09:54:03 +00008513 echo "$as_me: program exited with status $ac_status" >&5
8514echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008515sed 's/^/| /' conftest.$ac_ext >&5
8516
Martin v. Löwis11437992002-04-12 09:54:03 +00008517( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008518if test "$ac_cv_type_short" = yes; then
8519 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008520See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008521echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008522See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008523 { (exit 77); exit 77; }; }
8524 else
8525 ac_cv_sizeof_short=0
8526 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008528rm -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 +00008529fi
8530rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008532{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8533echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8534
8535
8536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008538#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008539_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008540
8541
Martin v. Löwiseba40652007-08-30 20:10:57 +00008542{ echo "$as_me:$LINENO: checking for float" >&5
8543echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008544if test "${ac_cv_type_float+set}" = set; then
8545 echo $ECHO_N "(cached) $ECHO_C" >&6
8546else
8547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008548/* confdefs.h. */
8549_ACEOF
8550cat confdefs.h >>conftest.$ac_ext
8551cat >>conftest.$ac_ext <<_ACEOF
8552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008553$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008554typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008555int
8556main ()
8557{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008558if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008560if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 return 0;
8562 ;
8563 return 0;
8564}
8565_ACEOF
8566rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008567if { (ac_try="$ac_compile"
8568case "(($ac_try" in
8569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8570 *) ac_try_echo=$ac_try;;
8571esac
8572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8573 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008575 grep -v '^ *+' conftest.er1 >conftest.err
8576 rm -f conftest.er1
8577 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008579 (exit $ac_status); } && {
8580 test -z "$ac_c_werror_flag" ||
8581 test ! -s conftest.err
8582 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 ac_cv_type_float=yes
8584else
8585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008586sed 's/^/| /' conftest.$ac_ext >&5
8587
Martin v. Löwiseba40652007-08-30 20:10:57 +00008588 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008589fi
Brett Cannon19fab762007-06-02 03:02:29 +00008590
Martin v. Löwiseba40652007-08-30 20:10:57 +00008591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8592fi
8593{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8594echo "${ECHO_T}$ac_cv_type_float" >&6; }
8595
8596# The cast to long int works around a bug in the HP C Compiler
8597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8599# This bug is HP SR number 8606223364.
8600{ echo "$as_me:$LINENO: checking size of float" >&5
8601echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008602if test "${ac_cv_sizeof_float+set}" = set; then
8603 echo $ECHO_N "(cached) $ECHO_C" >&6
8604else
Martin v. Löwis11437992002-04-12 09:54:03 +00008605 if test "$cross_compiling" = yes; then
8606 # Depending upon the size, compute the lo and hi bounds.
8607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008608/* confdefs.h. */
8609_ACEOF
8610cat confdefs.h >>conftest.$ac_ext
8611cat >>conftest.$ac_ext <<_ACEOF
8612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008613$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008614 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008615int
8616main ()
8617{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008619test_array [0] = 0
8620
8621 ;
8622 return 0;
8623}
8624_ACEOF
8625rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008626if { (ac_try="$ac_compile"
8627case "(($ac_try" in
8628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8629 *) ac_try_echo=$ac_try;;
8630esac
8631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008634 grep -v '^ *+' conftest.er1 >conftest.err
8635 rm -f conftest.er1
8636 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008638 (exit $ac_status); } && {
8639 test -z "$ac_c_werror_flag" ||
8640 test ! -s conftest.err
8641 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 ac_lo=0 ac_mid=0
8643 while :; do
8644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008645/* confdefs.h. */
8646_ACEOF
8647cat confdefs.h >>conftest.$ac_ext
8648cat >>conftest.$ac_ext <<_ACEOF
8649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008650$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008651 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008652int
8653main ()
8654{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008655static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008656test_array [0] = 0
8657
8658 ;
8659 return 0;
8660}
8661_ACEOF
8662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008663if { (ac_try="$ac_compile"
8664case "(($ac_try" in
8665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8666 *) ac_try_echo=$ac_try;;
8667esac
8668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008671 grep -v '^ *+' conftest.er1 >conftest.err
8672 rm -f conftest.er1
8673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675 (exit $ac_status); } && {
8676 test -z "$ac_c_werror_flag" ||
8677 test ! -s conftest.err
8678 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 ac_hi=$ac_mid; break
8680else
8681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008682sed 's/^/| /' conftest.$ac_ext >&5
8683
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684 ac_lo=`expr $ac_mid + 1`
8685 if test $ac_lo -le $ac_mid; then
8686 ac_lo= ac_hi=
8687 break
8688 fi
8689 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008691
8692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008693 done
8694else
8695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008696sed 's/^/| /' conftest.$ac_ext >&5
8697
Martin v. Löwiseba40652007-08-30 20:10:57 +00008698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008699/* confdefs.h. */
8700_ACEOF
8701cat confdefs.h >>conftest.$ac_ext
8702cat >>conftest.$ac_ext <<_ACEOF
8703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008704$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008705 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008706int
8707main ()
8708{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008709static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008710test_array [0] = 0
8711
8712 ;
8713 return 0;
8714}
8715_ACEOF
8716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008717if { (ac_try="$ac_compile"
8718case "(($ac_try" in
8719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8720 *) ac_try_echo=$ac_try;;
8721esac
8722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008725 grep -v '^ *+' conftest.er1 >conftest.err
8726 rm -f conftest.er1
8727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729 (exit $ac_status); } && {
8730 test -z "$ac_c_werror_flag" ||
8731 test ! -s conftest.err
8732 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 ac_hi=-1 ac_mid=-1
8734 while :; do
8735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008736/* confdefs.h. */
8737_ACEOF
8738cat confdefs.h >>conftest.$ac_ext
8739cat >>conftest.$ac_ext <<_ACEOF
8740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008741$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008742 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008743int
8744main ()
8745{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008746static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008747test_array [0] = 0
8748
8749 ;
8750 return 0;
8751}
8752_ACEOF
8753rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008754if { (ac_try="$ac_compile"
8755case "(($ac_try" in
8756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8757 *) ac_try_echo=$ac_try;;
8758esac
8759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008762 grep -v '^ *+' conftest.er1 >conftest.err
8763 rm -f conftest.er1
8764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008766 (exit $ac_status); } && {
8767 test -z "$ac_c_werror_flag" ||
8768 test ! -s conftest.err
8769 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ac_lo=$ac_mid; break
8771else
8772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008773sed 's/^/| /' conftest.$ac_ext >&5
8774
Martin v. Löwiseba40652007-08-30 20:10:57 +00008775 ac_hi=`expr '(' $ac_mid ')' - 1`
8776 if test $ac_mid -le $ac_hi; then
8777 ac_lo= ac_hi=
8778 break
8779 fi
8780 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008782
8783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 done
8785else
8786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008787sed 's/^/| /' conftest.$ac_ext >&5
8788
Martin v. Löwiseba40652007-08-30 20:10:57 +00008789 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791
8792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008794
8795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008796# Binary search between lo and hi bounds.
8797while test "x$ac_lo" != "x$ac_hi"; do
8798 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008800/* confdefs.h. */
8801_ACEOF
8802cat confdefs.h >>conftest.$ac_ext
8803cat >>conftest.$ac_ext <<_ACEOF
8804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008805$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008806 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008807int
8808main ()
8809{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008811test_array [0] = 0
8812
8813 ;
8814 return 0;
8815}
8816_ACEOF
8817rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008818if { (ac_try="$ac_compile"
8819case "(($ac_try" in
8820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8821 *) ac_try_echo=$ac_try;;
8822esac
8823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008826 grep -v '^ *+' conftest.er1 >conftest.err
8827 rm -f conftest.er1
8828 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008830 (exit $ac_status); } && {
8831 test -z "$ac_c_werror_flag" ||
8832 test ! -s conftest.err
8833 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 ac_hi=$ac_mid
8835else
8836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008837sed 's/^/| /' conftest.$ac_ext >&5
8838
Martin v. Löwiseba40652007-08-30 20:10:57 +00008839 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008841
8842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008843done
8844case $ac_lo in
8845?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008846'') if test "$ac_cv_type_float" = yes; then
8847 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008848See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008849echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008850See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008851 { (exit 77); exit 77; }; }
8852 else
8853 ac_cv_sizeof_float=0
8854 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008855esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008856else
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008858/* confdefs.h. */
8859_ACEOF
8860cat confdefs.h >>conftest.$ac_ext
8861cat >>conftest.$ac_ext <<_ACEOF
8862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008863$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008864 typedef float ac__type_sizeof_;
8865static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8866static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008867#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008868#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008869int
8870main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008871{
Martin v. Löwis11437992002-04-12 09:54:03 +00008872
8873 FILE *f = fopen ("conftest.val", "w");
8874 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008875 return 1;
8876 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008878 long int i = longval ();
8879 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8880 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008881 fprintf (f, "%ld\n", i);
8882 }
8883 else
8884 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885 unsigned long int i = ulongval ();
8886 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8887 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 fprintf (f, "%lu\n", i);
8889 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008890 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008891
8892 ;
8893 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008894}
Martin v. Löwis11437992002-04-12 09:54:03 +00008895_ACEOF
8896rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008897if { (ac_try="$ac_link"
8898case "(($ac_try" in
8899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8900 *) ac_try_echo=$ac_try;;
8901esac
8902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8903 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 ac_status=$?
8905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8906 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008907 { (case "(($ac_try" in
8908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8909 *) ac_try_echo=$ac_try;;
8910esac
8911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8912 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 ac_status=$?
8914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8915 (exit $ac_status); }; }; then
8916 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008917else
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 echo "$as_me: program exited with status $ac_status" >&5
8919echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008920sed 's/^/| /' conftest.$ac_ext >&5
8921
Martin v. Löwis11437992002-04-12 09:54:03 +00008922( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008923if test "$ac_cv_type_float" = yes; then
8924 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008925See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008926echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008927See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008928 { (exit 77); exit 77; }; }
8929 else
8930 ac_cv_sizeof_float=0
8931 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008933rm -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 +00008934fi
8935rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008937{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8938echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8939
8940
8941
Martin v. Löwis11437992002-04-12 09:54:03 +00008942cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008943#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008944_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008945
8946
Martin v. Löwiseba40652007-08-30 20:10:57 +00008947{ echo "$as_me:$LINENO: checking for double" >&5
8948echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008949if test "${ac_cv_type_double+set}" = set; then
8950 echo $ECHO_N "(cached) $ECHO_C" >&6
8951else
8952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008953/* confdefs.h. */
8954_ACEOF
8955cat confdefs.h >>conftest.$ac_ext
8956cat >>conftest.$ac_ext <<_ACEOF
8957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008958$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008959typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008960int
8961main ()
8962{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008963if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008965if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008966 return 0;
8967 ;
8968 return 0;
8969}
8970_ACEOF
8971rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008972if { (ac_try="$ac_compile"
8973case "(($ac_try" in
8974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8975 *) ac_try_echo=$ac_try;;
8976esac
8977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008980 grep -v '^ *+' conftest.er1 >conftest.err
8981 rm -f conftest.er1
8982 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008984 (exit $ac_status); } && {
8985 test -z "$ac_c_werror_flag" ||
8986 test ! -s conftest.err
8987 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 ac_cv_type_double=yes
8989else
8990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008991sed 's/^/| /' conftest.$ac_ext >&5
8992
Martin v. Löwiseba40652007-08-30 20:10:57 +00008993 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008994fi
Brett Cannon19fab762007-06-02 03:02:29 +00008995
Martin v. Löwiseba40652007-08-30 20:10:57 +00008996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8997fi
8998{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8999echo "${ECHO_T}$ac_cv_type_double" >&6; }
9000
9001# The cast to long int works around a bug in the HP C Compiler
9002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9004# This bug is HP SR number 8606223364.
9005{ echo "$as_me:$LINENO: checking size of double" >&5
9006echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009007if test "${ac_cv_sizeof_double+set}" = set; then
9008 echo $ECHO_N "(cached) $ECHO_C" >&6
9009else
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 if test "$cross_compiling" = yes; then
9011 # Depending upon the size, compute the lo and hi bounds.
9012cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* confdefs.h. */
9014_ACEOF
9015cat confdefs.h >>conftest.$ac_ext
9016cat >>conftest.$ac_ext <<_ACEOF
9017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009018$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009019 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009020int
9021main ()
9022{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009023static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009024test_array [0] = 0
9025
9026 ;
9027 return 0;
9028}
9029_ACEOF
9030rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009031if { (ac_try="$ac_compile"
9032case "(($ac_try" in
9033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9034 *) ac_try_echo=$ac_try;;
9035esac
9036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009039 grep -v '^ *+' conftest.er1 >conftest.err
9040 rm -f conftest.er1
9041 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009043 (exit $ac_status); } && {
9044 test -z "$ac_c_werror_flag" ||
9045 test ! -s conftest.err
9046 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 ac_lo=0 ac_mid=0
9048 while :; do
9049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009050/* confdefs.h. */
9051_ACEOF
9052cat confdefs.h >>conftest.$ac_ext
9053cat >>conftest.$ac_ext <<_ACEOF
9054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009055$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009056 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009057int
9058main ()
9059{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009060static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009061test_array [0] = 0
9062
9063 ;
9064 return 0;
9065}
9066_ACEOF
9067rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009068if { (ac_try="$ac_compile"
9069case "(($ac_try" in
9070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9071 *) ac_try_echo=$ac_try;;
9072esac
9073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009076 grep -v '^ *+' conftest.er1 >conftest.err
9077 rm -f conftest.er1
9078 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080 (exit $ac_status); } && {
9081 test -z "$ac_c_werror_flag" ||
9082 test ! -s conftest.err
9083 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 ac_hi=$ac_mid; break
9085else
9086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009087sed 's/^/| /' conftest.$ac_ext >&5
9088
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089 ac_lo=`expr $ac_mid + 1`
9090 if test $ac_lo -le $ac_mid; then
9091 ac_lo= ac_hi=
9092 break
9093 fi
9094 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096
9097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009098 done
9099else
9100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009101sed 's/^/| /' conftest.$ac_ext >&5
9102
Martin v. Löwiseba40652007-08-30 20:10:57 +00009103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009104/* confdefs.h. */
9105_ACEOF
9106cat confdefs.h >>conftest.$ac_ext
9107cat >>conftest.$ac_ext <<_ACEOF
9108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009109$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009110 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009111int
9112main ()
9113{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009114static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009115test_array [0] = 0
9116
9117 ;
9118 return 0;
9119}
9120_ACEOF
9121rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009122if { (ac_try="$ac_compile"
9123case "(($ac_try" in
9124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9125 *) ac_try_echo=$ac_try;;
9126esac
9127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009130 grep -v '^ *+' conftest.er1 >conftest.err
9131 rm -f conftest.er1
9132 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009134 (exit $ac_status); } && {
9135 test -z "$ac_c_werror_flag" ||
9136 test ! -s conftest.err
9137 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ac_hi=-1 ac_mid=-1
9139 while :; do
9140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009141/* confdefs.h. */
9142_ACEOF
9143cat confdefs.h >>conftest.$ac_ext
9144cat >>conftest.$ac_ext <<_ACEOF
9145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009146$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009147 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009148int
9149main ()
9150{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009152test_array [0] = 0
9153
9154 ;
9155 return 0;
9156}
9157_ACEOF
9158rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009159if { (ac_try="$ac_compile"
9160case "(($ac_try" in
9161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9162 *) ac_try_echo=$ac_try;;
9163esac
9164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9165 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009167 grep -v '^ *+' conftest.er1 >conftest.err
9168 rm -f conftest.er1
9169 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009171 (exit $ac_status); } && {
9172 test -z "$ac_c_werror_flag" ||
9173 test ! -s conftest.err
9174 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 ac_lo=$ac_mid; break
9176else
9177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009178sed 's/^/| /' conftest.$ac_ext >&5
9179
Martin v. Löwiseba40652007-08-30 20:10:57 +00009180 ac_hi=`expr '(' $ac_mid ')' - 1`
9181 if test $ac_mid -le $ac_hi; then
9182 ac_lo= ac_hi=
9183 break
9184 fi
9185 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009187
9188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 done
9190else
9191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009192sed 's/^/| /' conftest.$ac_ext >&5
9193
Martin v. Löwiseba40652007-08-30 20:10:57 +00009194 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196
9197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009199
9200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009201# Binary search between lo and hi bounds.
9202while test "x$ac_lo" != "x$ac_hi"; do
9203 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009205/* confdefs.h. */
9206_ACEOF
9207cat confdefs.h >>conftest.$ac_ext
9208cat >>conftest.$ac_ext <<_ACEOF
9209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009210$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009211 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009212int
9213main ()
9214{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009216test_array [0] = 0
9217
9218 ;
9219 return 0;
9220}
9221_ACEOF
9222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009223if { (ac_try="$ac_compile"
9224case "(($ac_try" in
9225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9226 *) ac_try_echo=$ac_try;;
9227esac
9228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009231 grep -v '^ *+' conftest.er1 >conftest.err
9232 rm -f conftest.er1
9233 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009235 (exit $ac_status); } && {
9236 test -z "$ac_c_werror_flag" ||
9237 test ! -s conftest.err
9238 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 ac_hi=$ac_mid
9240else
9241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009242sed 's/^/| /' conftest.$ac_ext >&5
9243
Martin v. Löwiseba40652007-08-30 20:10:57 +00009244 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009246
9247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009248done
9249case $ac_lo in
9250?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009251'') if test "$ac_cv_type_double" = yes; then
9252 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009253See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009254echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009255See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009256 { (exit 77); exit 77; }; }
9257 else
9258 ac_cv_sizeof_double=0
9259 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009260esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009261else
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009263/* confdefs.h. */
9264_ACEOF
9265cat confdefs.h >>conftest.$ac_ext
9266cat >>conftest.$ac_ext <<_ACEOF
9267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009268$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009269 typedef double ac__type_sizeof_;
9270static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9271static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009272#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009273#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009274int
9275main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009276{
Martin v. Löwis11437992002-04-12 09:54:03 +00009277
9278 FILE *f = fopen ("conftest.val", "w");
9279 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009280 return 1;
9281 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009282 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009283 long int i = longval ();
9284 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9285 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009286 fprintf (f, "%ld\n", i);
9287 }
9288 else
9289 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009290 unsigned long int i = ulongval ();
9291 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9292 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 fprintf (f, "%lu\n", i);
9294 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009296
9297 ;
9298 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009299}
Martin v. Löwis11437992002-04-12 09:54:03 +00009300_ACEOF
9301rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009302if { (ac_try="$ac_link"
9303case "(($ac_try" in
9304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9305 *) ac_try_echo=$ac_try;;
9306esac
9307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9308 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009309 ac_status=$?
9310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9311 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009312 { (case "(($ac_try" in
9313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9314 *) ac_try_echo=$ac_try;;
9315esac
9316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9317 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009318 ac_status=$?
9319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9320 (exit $ac_status); }; }; then
9321 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009322else
Martin v. Löwis11437992002-04-12 09:54:03 +00009323 echo "$as_me: program exited with status $ac_status" >&5
9324echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009325sed 's/^/| /' conftest.$ac_ext >&5
9326
Martin v. Löwis11437992002-04-12 09:54:03 +00009327( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009328if test "$ac_cv_type_double" = yes; then
9329 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009330See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009331echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009332See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009333 { (exit 77); exit 77; }; }
9334 else
9335 ac_cv_sizeof_double=0
9336 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009338rm -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 +00009339fi
9340rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009342{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9343echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9344
9345
9346
Martin v. Löwis11437992002-04-12 09:54:03 +00009347cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009348#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009349_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009350
9351
Martin v. Löwiseba40652007-08-30 20:10:57 +00009352{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9353echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009354if test "${ac_cv_type_fpos_t+set}" = set; then
9355 echo $ECHO_N "(cached) $ECHO_C" >&6
9356else
9357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009358/* confdefs.h. */
9359_ACEOF
9360cat confdefs.h >>conftest.$ac_ext
9361cat >>conftest.$ac_ext <<_ACEOF
9362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009363$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009364typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009365int
9366main ()
9367{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009368if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009369 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009370if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009371 return 0;
9372 ;
9373 return 0;
9374}
9375_ACEOF
9376rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009377if { (ac_try="$ac_compile"
9378case "(($ac_try" in
9379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9380 *) ac_try_echo=$ac_try;;
9381esac
9382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009385 grep -v '^ *+' conftest.er1 >conftest.err
9386 rm -f conftest.er1
9387 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009389 (exit $ac_status); } && {
9390 test -z "$ac_c_werror_flag" ||
9391 test ! -s conftest.err
9392 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009393 ac_cv_type_fpos_t=yes
9394else
9395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009396sed 's/^/| /' conftest.$ac_ext >&5
9397
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009399fi
Brett Cannon19fab762007-06-02 03:02:29 +00009400
Martin v. Löwiseba40652007-08-30 20:10:57 +00009401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9402fi
9403{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9404echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9405
9406# The cast to long int works around a bug in the HP C Compiler
9407# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9408# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9409# This bug is HP SR number 8606223364.
9410{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9411echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009412if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9413 echo $ECHO_N "(cached) $ECHO_C" >&6
9414else
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 if test "$cross_compiling" = yes; then
9416 # Depending upon the size, compute the lo and hi bounds.
9417cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009418/* confdefs.h. */
9419_ACEOF
9420cat confdefs.h >>conftest.$ac_ext
9421cat >>conftest.$ac_ext <<_ACEOF
9422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009423$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009424 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009425int
9426main ()
9427{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009428static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009429test_array [0] = 0
9430
9431 ;
9432 return 0;
9433}
9434_ACEOF
9435rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009436if { (ac_try="$ac_compile"
9437case "(($ac_try" in
9438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9439 *) ac_try_echo=$ac_try;;
9440esac
9441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009444 grep -v '^ *+' conftest.er1 >conftest.err
9445 rm -f conftest.er1
9446 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009448 (exit $ac_status); } && {
9449 test -z "$ac_c_werror_flag" ||
9450 test ! -s conftest.err
9451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ac_lo=0 ac_mid=0
9453 while :; do
9454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009455/* confdefs.h. */
9456_ACEOF
9457cat confdefs.h >>conftest.$ac_ext
9458cat >>conftest.$ac_ext <<_ACEOF
9459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009460$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009461 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009462int
9463main ()
9464{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009465static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009466test_array [0] = 0
9467
9468 ;
9469 return 0;
9470}
9471_ACEOF
9472rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009473if { (ac_try="$ac_compile"
9474case "(($ac_try" in
9475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9476 *) ac_try_echo=$ac_try;;
9477esac
9478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9479 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009481 grep -v '^ *+' conftest.er1 >conftest.err
9482 rm -f conftest.er1
9483 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485 (exit $ac_status); } && {
9486 test -z "$ac_c_werror_flag" ||
9487 test ! -s conftest.err
9488 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 ac_hi=$ac_mid; break
9490else
9491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009492sed 's/^/| /' conftest.$ac_ext >&5
9493
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494 ac_lo=`expr $ac_mid + 1`
9495 if test $ac_lo -le $ac_mid; then
9496 ac_lo= ac_hi=
9497 break
9498 fi
9499 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009501
9502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 done
9504else
9505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009506sed 's/^/| /' conftest.$ac_ext >&5
9507
Martin v. Löwiseba40652007-08-30 20:10:57 +00009508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009509/* confdefs.h. */
9510_ACEOF
9511cat confdefs.h >>conftest.$ac_ext
9512cat >>conftest.$ac_ext <<_ACEOF
9513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009514$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009515 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009516int
9517main ()
9518{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009519static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009520test_array [0] = 0
9521
9522 ;
9523 return 0;
9524}
9525_ACEOF
9526rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009527if { (ac_try="$ac_compile"
9528case "(($ac_try" in
9529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9530 *) ac_try_echo=$ac_try;;
9531esac
9532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009535 grep -v '^ *+' conftest.er1 >conftest.err
9536 rm -f conftest.er1
9537 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009539 (exit $ac_status); } && {
9540 test -z "$ac_c_werror_flag" ||
9541 test ! -s conftest.err
9542 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ac_hi=-1 ac_mid=-1
9544 while :; do
9545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009546/* confdefs.h. */
9547_ACEOF
9548cat confdefs.h >>conftest.$ac_ext
9549cat >>conftest.$ac_ext <<_ACEOF
9550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009551$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009552 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009553int
9554main ()
9555{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009556static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009557test_array [0] = 0
9558
9559 ;
9560 return 0;
9561}
9562_ACEOF
9563rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009564if { (ac_try="$ac_compile"
9565case "(($ac_try" in
9566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9567 *) ac_try_echo=$ac_try;;
9568esac
9569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009572 grep -v '^ *+' conftest.er1 >conftest.err
9573 rm -f conftest.er1
9574 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009576 (exit $ac_status); } && {
9577 test -z "$ac_c_werror_flag" ||
9578 test ! -s conftest.err
9579 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 ac_lo=$ac_mid; break
9581else
9582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009583sed 's/^/| /' conftest.$ac_ext >&5
9584
Martin v. Löwiseba40652007-08-30 20:10:57 +00009585 ac_hi=`expr '(' $ac_mid ')' - 1`
9586 if test $ac_mid -le $ac_hi; then
9587 ac_lo= ac_hi=
9588 break
9589 fi
9590 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009592
9593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 done
9595else
9596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009597sed 's/^/| /' conftest.$ac_ext >&5
9598
Martin v. Löwiseba40652007-08-30 20:10:57 +00009599 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601
9602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009604
9605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009606# Binary search between lo and hi bounds.
9607while test "x$ac_lo" != "x$ac_hi"; do
9608 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009610/* confdefs.h. */
9611_ACEOF
9612cat confdefs.h >>conftest.$ac_ext
9613cat >>conftest.$ac_ext <<_ACEOF
9614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009615$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009616 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009617int
9618main ()
9619{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009621test_array [0] = 0
9622
9623 ;
9624 return 0;
9625}
9626_ACEOF
9627rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009628if { (ac_try="$ac_compile"
9629case "(($ac_try" in
9630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9631 *) ac_try_echo=$ac_try;;
9632esac
9633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009636 grep -v '^ *+' conftest.er1 >conftest.err
9637 rm -f conftest.er1
9638 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009640 (exit $ac_status); } && {
9641 test -z "$ac_c_werror_flag" ||
9642 test ! -s conftest.err
9643 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 ac_hi=$ac_mid
9645else
9646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009647sed 's/^/| /' conftest.$ac_ext >&5
9648
Martin v. Löwiseba40652007-08-30 20:10:57 +00009649 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009651
9652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009653done
9654case $ac_lo in
9655?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009656'') if test "$ac_cv_type_fpos_t" = yes; then
9657 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009658See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009659echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009660See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009661 { (exit 77); exit 77; }; }
9662 else
9663 ac_cv_sizeof_fpos_t=0
9664 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009665esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009666else
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009668/* confdefs.h. */
9669_ACEOF
9670cat confdefs.h >>conftest.$ac_ext
9671cat >>conftest.$ac_ext <<_ACEOF
9672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009673$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674 typedef fpos_t ac__type_sizeof_;
9675static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9676static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009677#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009678#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009679int
9680main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009681{
Martin v. Löwis11437992002-04-12 09:54:03 +00009682
9683 FILE *f = fopen ("conftest.val", "w");
9684 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009685 return 1;
9686 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009688 long int i = longval ();
9689 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9690 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 fprintf (f, "%ld\n", i);
9692 }
9693 else
9694 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695 unsigned long int i = ulongval ();
9696 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9697 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 fprintf (f, "%lu\n", i);
9699 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009700 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009701
9702 ;
9703 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009704}
Martin v. Löwis11437992002-04-12 09:54:03 +00009705_ACEOF
9706rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009707if { (ac_try="$ac_link"
9708case "(($ac_try" in
9709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9710 *) ac_try_echo=$ac_try;;
9711esac
9712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9713 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 ac_status=$?
9715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9716 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009717 { (case "(($ac_try" in
9718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9719 *) ac_try_echo=$ac_try;;
9720esac
9721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9722 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 ac_status=$?
9724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9725 (exit $ac_status); }; }; then
9726 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009727else
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 echo "$as_me: program exited with status $ac_status" >&5
9729echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009730sed 's/^/| /' conftest.$ac_ext >&5
9731
Martin v. Löwis11437992002-04-12 09:54:03 +00009732( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733if test "$ac_cv_type_fpos_t" = yes; then
9734 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009735See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009736echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009737See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009738 { (exit 77); exit 77; }; }
9739 else
9740 ac_cv_sizeof_fpos_t=0
9741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009743rm -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 +00009744fi
9745rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009747{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9748echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9749
9750
9751
Martin v. Löwis11437992002-04-12 09:54:03 +00009752cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009753#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009754_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009755
Michael W. Hudson54241132001-12-07 15:38:26 +00009756
Martin v. Löwiseba40652007-08-30 20:10:57 +00009757{ echo "$as_me:$LINENO: checking for size_t" >&5
9758echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009759if test "${ac_cv_type_size_t+set}" = set; then
9760 echo $ECHO_N "(cached) $ECHO_C" >&6
9761else
9762 cat >conftest.$ac_ext <<_ACEOF
9763/* confdefs.h. */
9764_ACEOF
9765cat confdefs.h >>conftest.$ac_ext
9766cat >>conftest.$ac_ext <<_ACEOF
9767/* end confdefs.h. */
9768$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009769typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009770int
9771main ()
9772{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009773if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009774 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009776 return 0;
9777 ;
9778 return 0;
9779}
9780_ACEOF
9781rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009782if { (ac_try="$ac_compile"
9783case "(($ac_try" in
9784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9785 *) ac_try_echo=$ac_try;;
9786esac
9787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9788 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009789 ac_status=$?
9790 grep -v '^ *+' conftest.er1 >conftest.err
9791 rm -f conftest.er1
9792 cat conftest.err >&5
9793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009794 (exit $ac_status); } && {
9795 test -z "$ac_c_werror_flag" ||
9796 test ! -s conftest.err
9797 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009798 ac_cv_type_size_t=yes
9799else
9800 echo "$as_me: failed program was:" >&5
9801sed 's/^/| /' conftest.$ac_ext >&5
9802
Martin v. Löwiseba40652007-08-30 20:10:57 +00009803 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009804fi
Brett Cannon19fab762007-06-02 03:02:29 +00009805
Martin v. Löwiseba40652007-08-30 20:10:57 +00009806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9807fi
9808{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9809echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9810
9811# The cast to long int works around a bug in the HP C Compiler
9812# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9813# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9814# This bug is HP SR number 8606223364.
9815{ echo "$as_me:$LINENO: checking size of size_t" >&5
9816echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009817if test "${ac_cv_sizeof_size_t+set}" = set; then
9818 echo $ECHO_N "(cached) $ECHO_C" >&6
9819else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009820 if test "$cross_compiling" = yes; then
9821 # Depending upon the size, compute the lo and hi bounds.
9822cat >conftest.$ac_ext <<_ACEOF
9823/* confdefs.h. */
9824_ACEOF
9825cat confdefs.h >>conftest.$ac_ext
9826cat >>conftest.$ac_ext <<_ACEOF
9827/* end confdefs.h. */
9828$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009829 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009830int
9831main ()
9832{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009834test_array [0] = 0
9835
9836 ;
9837 return 0;
9838}
9839_ACEOF
9840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009841if { (ac_try="$ac_compile"
9842case "(($ac_try" in
9843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9844 *) ac_try_echo=$ac_try;;
9845esac
9846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009848 ac_status=$?
9849 grep -v '^ *+' conftest.er1 >conftest.err
9850 rm -f conftest.er1
9851 cat conftest.err >&5
9852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009853 (exit $ac_status); } && {
9854 test -z "$ac_c_werror_flag" ||
9855 test ! -s conftest.err
9856 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009857 ac_lo=0 ac_mid=0
9858 while :; do
9859 cat >conftest.$ac_ext <<_ACEOF
9860/* confdefs.h. */
9861_ACEOF
9862cat confdefs.h >>conftest.$ac_ext
9863cat >>conftest.$ac_ext <<_ACEOF
9864/* end confdefs.h. */
9865$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009866 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009867int
9868main ()
9869{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009870static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009871test_array [0] = 0
9872
9873 ;
9874 return 0;
9875}
9876_ACEOF
9877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009878if { (ac_try="$ac_compile"
9879case "(($ac_try" in
9880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9881 *) ac_try_echo=$ac_try;;
9882esac
9883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009885 ac_status=$?
9886 grep -v '^ *+' conftest.er1 >conftest.err
9887 rm -f conftest.er1
9888 cat conftest.err >&5
9889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890 (exit $ac_status); } && {
9891 test -z "$ac_c_werror_flag" ||
9892 test ! -s conftest.err
9893 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009894 ac_hi=$ac_mid; break
9895else
9896 echo "$as_me: failed program was:" >&5
9897sed 's/^/| /' conftest.$ac_ext >&5
9898
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899 ac_lo=`expr $ac_mid + 1`
9900 if test $ac_lo -le $ac_mid; then
9901 ac_lo= ac_hi=
9902 break
9903 fi
9904 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009906
9907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009908 done
9909else
9910 echo "$as_me: failed program was:" >&5
9911sed 's/^/| /' conftest.$ac_ext >&5
9912
Martin v. Löwiseba40652007-08-30 20:10:57 +00009913 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009914/* confdefs.h. */
9915_ACEOF
9916cat confdefs.h >>conftest.$ac_ext
9917cat >>conftest.$ac_ext <<_ACEOF
9918/* end confdefs.h. */
9919$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009920 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009921int
9922main ()
9923{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009924static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009925test_array [0] = 0
9926
9927 ;
9928 return 0;
9929}
9930_ACEOF
9931rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009932if { (ac_try="$ac_compile"
9933case "(($ac_try" in
9934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9935 *) ac_try_echo=$ac_try;;
9936esac
9937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9938 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009939 ac_status=$?
9940 grep -v '^ *+' conftest.er1 >conftest.err
9941 rm -f conftest.er1
9942 cat conftest.err >&5
9943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009944 (exit $ac_status); } && {
9945 test -z "$ac_c_werror_flag" ||
9946 test ! -s conftest.err
9947 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009948 ac_hi=-1 ac_mid=-1
9949 while :; do
9950 cat >conftest.$ac_ext <<_ACEOF
9951/* confdefs.h. */
9952_ACEOF
9953cat confdefs.h >>conftest.$ac_ext
9954cat >>conftest.$ac_ext <<_ACEOF
9955/* end confdefs.h. */
9956$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009957 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009958int
9959main ()
9960{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009961static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009962test_array [0] = 0
9963
9964 ;
9965 return 0;
9966}
9967_ACEOF
9968rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009969if { (ac_try="$ac_compile"
9970case "(($ac_try" in
9971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9972 *) ac_try_echo=$ac_try;;
9973esac
9974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9975 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009976 ac_status=$?
9977 grep -v '^ *+' conftest.er1 >conftest.err
9978 rm -f conftest.er1
9979 cat conftest.err >&5
9980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009981 (exit $ac_status); } && {
9982 test -z "$ac_c_werror_flag" ||
9983 test ! -s conftest.err
9984 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009985 ac_lo=$ac_mid; break
9986else
9987 echo "$as_me: failed program was:" >&5
9988sed 's/^/| /' conftest.$ac_ext >&5
9989
Martin v. Löwiseba40652007-08-30 20:10:57 +00009990 ac_hi=`expr '(' $ac_mid ')' - 1`
9991 if test $ac_mid -le $ac_hi; then
9992 ac_lo= ac_hi=
9993 break
9994 fi
9995 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009997
9998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009999 done
10000else
10001 echo "$as_me: failed program was:" >&5
10002sed 's/^/| /' conftest.$ac_ext >&5
10003
Martin v. Löwiseba40652007-08-30 20:10:57 +000010004 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010006
10007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010009
10010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010011# Binary search between lo and hi bounds.
10012while test "x$ac_lo" != "x$ac_hi"; do
10013 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10014 cat >conftest.$ac_ext <<_ACEOF
10015/* confdefs.h. */
10016_ACEOF
10017cat confdefs.h >>conftest.$ac_ext
10018cat >>conftest.$ac_ext <<_ACEOF
10019/* end confdefs.h. */
10020$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010021 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010022int
10023main ()
10024{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010026test_array [0] = 0
10027
10028 ;
10029 return 0;
10030}
10031_ACEOF
10032rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010033if { (ac_try="$ac_compile"
10034case "(($ac_try" in
10035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10036 *) ac_try_echo=$ac_try;;
10037esac
10038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10039 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010040 ac_status=$?
10041 grep -v '^ *+' conftest.er1 >conftest.err
10042 rm -f conftest.er1
10043 cat conftest.err >&5
10044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010045 (exit $ac_status); } && {
10046 test -z "$ac_c_werror_flag" ||
10047 test ! -s conftest.err
10048 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010049 ac_hi=$ac_mid
10050else
10051 echo "$as_me: failed program was:" >&5
10052sed 's/^/| /' conftest.$ac_ext >&5
10053
Martin v. Löwiseba40652007-08-30 20:10:57 +000010054 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010056
10057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010058done
10059case $ac_lo in
10060?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010061'') if test "$ac_cv_type_size_t" = yes; then
10062 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010063See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010064echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010065See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010066 { (exit 77); exit 77; }; }
10067 else
10068 ac_cv_sizeof_size_t=0
10069 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010070esac
10071else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010072 cat >conftest.$ac_ext <<_ACEOF
10073/* confdefs.h. */
10074_ACEOF
10075cat confdefs.h >>conftest.$ac_ext
10076cat >>conftest.$ac_ext <<_ACEOF
10077/* end confdefs.h. */
10078$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079 typedef size_t ac__type_sizeof_;
10080static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10081static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010082#include <stdio.h>
10083#include <stdlib.h>
10084int
10085main ()
10086{
10087
10088 FILE *f = fopen ("conftest.val", "w");
10089 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010090 return 1;
10091 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010092 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010093 long int i = longval ();
10094 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10095 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010096 fprintf (f, "%ld\n", i);
10097 }
10098 else
10099 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100 unsigned long int i = ulongval ();
10101 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10102 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010103 fprintf (f, "%lu\n", i);
10104 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010105 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010106
10107 ;
10108 return 0;
10109}
10110_ACEOF
10111rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010112if { (ac_try="$ac_link"
10113case "(($ac_try" in
10114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10115 *) ac_try_echo=$ac_try;;
10116esac
10117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10118 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010119 ac_status=$?
10120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10121 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010122 { (case "(($ac_try" in
10123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10124 *) ac_try_echo=$ac_try;;
10125esac
10126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10127 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010128 ac_status=$?
10129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10130 (exit $ac_status); }; }; then
10131 ac_cv_sizeof_size_t=`cat conftest.val`
10132else
10133 echo "$as_me: program exited with status $ac_status" >&5
10134echo "$as_me: failed program was:" >&5
10135sed 's/^/| /' conftest.$ac_ext >&5
10136
10137( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010138if test "$ac_cv_type_size_t" = yes; then
10139 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010140See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010141echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010142See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010143 { (exit 77); exit 77; }; }
10144 else
10145 ac_cv_sizeof_size_t=0
10146 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010148rm -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 +000010149fi
10150rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010152{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10153echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10154
10155
10156
Martin v. Löwis18e16552006-02-15 17:27:45 +000010157cat >>confdefs.h <<_ACEOF
10158#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10159_ACEOF
10160
10161
Michael W. Hudson54241132001-12-07 15:38:26 +000010162
Martin v. Löwiseba40652007-08-30 20:10:57 +000010163{ echo "$as_me:$LINENO: checking for long long support" >&5
10164echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010165have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010166cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010167/* confdefs.h. */
10168_ACEOF
10169cat confdefs.h >>conftest.$ac_ext
10170cat >>conftest.$ac_ext <<_ACEOF
10171/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010172
Martin v. Löwis11437992002-04-12 09:54:03 +000010173int
10174main ()
10175{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010176long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ;
10178 return 0;
10179}
10180_ACEOF
10181rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010182if { (ac_try="$ac_compile"
10183case "(($ac_try" in
10184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10185 *) ac_try_echo=$ac_try;;
10186esac
10187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10188 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010190 grep -v '^ *+' conftest.er1 >conftest.err
10191 rm -f conftest.er1
10192 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010194 (exit $ac_status); } && {
10195 test -z "$ac_c_werror_flag" ||
10196 test ! -s conftest.err
10197 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010198
10199
10200cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010201#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010202_ACEOF
10203
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010204 have_long_long=yes
10205
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010206else
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010208sed 's/^/| /' conftest.$ac_ext >&5
10209
Martin v. Löwiseba40652007-08-30 20:10:57 +000010210
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010212
10213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10214{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10215echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010216if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010217{ echo "$as_me:$LINENO: checking for long long" >&5
10218echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010219if test "${ac_cv_type_long_long+set}" = set; then
10220 echo $ECHO_N "(cached) $ECHO_C" >&6
10221else
10222 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010223/* confdefs.h. */
10224_ACEOF
10225cat confdefs.h >>conftest.$ac_ext
10226cat >>conftest.$ac_ext <<_ACEOF
10227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010228$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010229typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010230int
10231main ()
10232{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010233if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010235if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010236 return 0;
10237 ;
10238 return 0;
10239}
10240_ACEOF
10241rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010242if { (ac_try="$ac_compile"
10243case "(($ac_try" in
10244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10245 *) ac_try_echo=$ac_try;;
10246esac
10247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10248 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010250 grep -v '^ *+' conftest.er1 >conftest.err
10251 rm -f conftest.er1
10252 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010254 (exit $ac_status); } && {
10255 test -z "$ac_c_werror_flag" ||
10256 test ! -s conftest.err
10257 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 ac_cv_type_long_long=yes
10259else
10260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010261sed 's/^/| /' conftest.$ac_ext >&5
10262
Martin v. Löwiseba40652007-08-30 20:10:57 +000010263 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010264fi
Brett Cannon19fab762007-06-02 03:02:29 +000010265
Martin v. Löwiseba40652007-08-30 20:10:57 +000010266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10267fi
10268{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10269echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10270
10271# The cast to long int works around a bug in the HP C Compiler
10272# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10273# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10274# This bug is HP SR number 8606223364.
10275{ echo "$as_me:$LINENO: checking size of long long" >&5
10276echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010277if test "${ac_cv_sizeof_long_long+set}" = set; then
10278 echo $ECHO_N "(cached) $ECHO_C" >&6
10279else
Martin v. Löwis11437992002-04-12 09:54:03 +000010280 if test "$cross_compiling" = yes; then
10281 # Depending upon the size, compute the lo and hi bounds.
10282cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010283/* confdefs.h. */
10284_ACEOF
10285cat confdefs.h >>conftest.$ac_ext
10286cat >>conftest.$ac_ext <<_ACEOF
10287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010288$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010289 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010290int
10291main ()
10292{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010293static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010294test_array [0] = 0
10295
10296 ;
10297 return 0;
10298}
10299_ACEOF
10300rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010301if { (ac_try="$ac_compile"
10302case "(($ac_try" in
10303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10304 *) ac_try_echo=$ac_try;;
10305esac
10306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10307 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010309 grep -v '^ *+' conftest.er1 >conftest.err
10310 rm -f conftest.er1
10311 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010313 (exit $ac_status); } && {
10314 test -z "$ac_c_werror_flag" ||
10315 test ! -s conftest.err
10316 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 ac_lo=0 ac_mid=0
10318 while :; do
10319 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010320/* confdefs.h. */
10321_ACEOF
10322cat confdefs.h >>conftest.$ac_ext
10323cat >>conftest.$ac_ext <<_ACEOF
10324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010325$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010326 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010327int
10328main ()
10329{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010330static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010331test_array [0] = 0
10332
10333 ;
10334 return 0;
10335}
10336_ACEOF
10337rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010338if { (ac_try="$ac_compile"
10339case "(($ac_try" in
10340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10341 *) ac_try_echo=$ac_try;;
10342esac
10343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10344 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010346 grep -v '^ *+' conftest.er1 >conftest.err
10347 rm -f conftest.er1
10348 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010350 (exit $ac_status); } && {
10351 test -z "$ac_c_werror_flag" ||
10352 test ! -s conftest.err
10353 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ac_hi=$ac_mid; break
10355else
10356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010357sed 's/^/| /' conftest.$ac_ext >&5
10358
Martin v. Löwiseba40652007-08-30 20:10:57 +000010359 ac_lo=`expr $ac_mid + 1`
10360 if test $ac_lo -le $ac_mid; then
10361 ac_lo= ac_hi=
10362 break
10363 fi
10364 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010366
10367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 done
10369else
10370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010371sed 's/^/| /' conftest.$ac_ext >&5
10372
Martin v. Löwiseba40652007-08-30 20:10:57 +000010373 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010374/* confdefs.h. */
10375_ACEOF
10376cat confdefs.h >>conftest.$ac_ext
10377cat >>conftest.$ac_ext <<_ACEOF
10378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010379$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010380 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010381int
10382main ()
10383{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010384static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010385test_array [0] = 0
10386
10387 ;
10388 return 0;
10389}
10390_ACEOF
10391rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010392if { (ac_try="$ac_compile"
10393case "(($ac_try" in
10394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10395 *) ac_try_echo=$ac_try;;
10396esac
10397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10398 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010400 grep -v '^ *+' conftest.er1 >conftest.err
10401 rm -f conftest.er1
10402 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010404 (exit $ac_status); } && {
10405 test -z "$ac_c_werror_flag" ||
10406 test ! -s conftest.err
10407 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 ac_hi=-1 ac_mid=-1
10409 while :; do
10410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010411/* confdefs.h. */
10412_ACEOF
10413cat confdefs.h >>conftest.$ac_ext
10414cat >>conftest.$ac_ext <<_ACEOF
10415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010416$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010417 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010418int
10419main ()
10420{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010421static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010422test_array [0] = 0
10423
10424 ;
10425 return 0;
10426}
10427_ACEOF
10428rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010429if { (ac_try="$ac_compile"
10430case "(($ac_try" in
10431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10432 *) ac_try_echo=$ac_try;;
10433esac
10434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10435 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010437 grep -v '^ *+' conftest.er1 >conftest.err
10438 rm -f conftest.er1
10439 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010441 (exit $ac_status); } && {
10442 test -z "$ac_c_werror_flag" ||
10443 test ! -s conftest.err
10444 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 ac_lo=$ac_mid; break
10446else
10447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010448sed 's/^/| /' conftest.$ac_ext >&5
10449
Martin v. Löwiseba40652007-08-30 20:10:57 +000010450 ac_hi=`expr '(' $ac_mid ')' - 1`
10451 if test $ac_mid -le $ac_hi; then
10452 ac_lo= ac_hi=
10453 break
10454 fi
10455 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010457
10458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 done
10460else
10461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010462sed 's/^/| /' conftest.$ac_ext >&5
10463
Martin v. Löwiseba40652007-08-30 20:10:57 +000010464 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010466
10467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010469
10470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010471# Binary search between lo and hi bounds.
10472while test "x$ac_lo" != "x$ac_hi"; do
10473 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010475/* confdefs.h. */
10476_ACEOF
10477cat confdefs.h >>conftest.$ac_ext
10478cat >>conftest.$ac_ext <<_ACEOF
10479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010480$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010481 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010482int
10483main ()
10484{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010485static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010486test_array [0] = 0
10487
10488 ;
10489 return 0;
10490}
10491_ACEOF
10492rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010493if { (ac_try="$ac_compile"
10494case "(($ac_try" in
10495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10496 *) ac_try_echo=$ac_try;;
10497esac
10498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10499 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010501 grep -v '^ *+' conftest.er1 >conftest.err
10502 rm -f conftest.er1
10503 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010505 (exit $ac_status); } && {
10506 test -z "$ac_c_werror_flag" ||
10507 test ! -s conftest.err
10508 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 ac_hi=$ac_mid
10510else
10511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010512sed 's/^/| /' conftest.$ac_ext >&5
10513
Martin v. Löwiseba40652007-08-30 20:10:57 +000010514 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010516
10517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010518done
10519case $ac_lo in
10520?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010521'') if test "$ac_cv_type_long_long" = yes; then
10522 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010523See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010524echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010525See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010526 { (exit 77); exit 77; }; }
10527 else
10528 ac_cv_sizeof_long_long=0
10529 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010530esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010531else
Martin v. Löwis11437992002-04-12 09:54:03 +000010532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010533/* confdefs.h. */
10534_ACEOF
10535cat confdefs.h >>conftest.$ac_ext
10536cat >>conftest.$ac_ext <<_ACEOF
10537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010538$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010539 typedef long long ac__type_sizeof_;
10540static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10541static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010542#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010543#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010544int
10545main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010546{
Martin v. Löwis11437992002-04-12 09:54:03 +000010547
10548 FILE *f = fopen ("conftest.val", "w");
10549 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010550 return 1;
10551 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010552 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010553 long int i = longval ();
10554 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10555 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010556 fprintf (f, "%ld\n", i);
10557 }
10558 else
10559 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010560 unsigned long int i = ulongval ();
10561 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10562 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 fprintf (f, "%lu\n", i);
10564 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010565 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010566
10567 ;
10568 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010569}
Martin v. Löwis11437992002-04-12 09:54:03 +000010570_ACEOF
10571rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010572if { (ac_try="$ac_link"
10573case "(($ac_try" in
10574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10575 *) ac_try_echo=$ac_try;;
10576esac
10577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10578 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 ac_status=$?
10580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10581 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010582 { (case "(($ac_try" in
10583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10584 *) ac_try_echo=$ac_try;;
10585esac
10586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10587 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 ac_status=$?
10589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10590 (exit $ac_status); }; }; then
10591 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010592else
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 echo "$as_me: program exited with status $ac_status" >&5
10594echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010595sed 's/^/| /' conftest.$ac_ext >&5
10596
Martin v. Löwis11437992002-04-12 09:54:03 +000010597( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010598if test "$ac_cv_type_long_long" = yes; then
10599 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010600See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010601echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010602See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010603 { (exit 77); exit 77; }; }
10604 else
10605 ac_cv_sizeof_long_long=0
10606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608rm -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 +000010609fi
10610rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010612{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
10613echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
10614
10615
10616
Martin v. Löwis11437992002-04-12 09:54:03 +000010617cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010618#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000010619_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010620
Michael W. Hudson54241132001-12-07 15:38:26 +000010621
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010622fi
10623
Martin v. Löwiseba40652007-08-30 20:10:57 +000010624{ echo "$as_me:$LINENO: checking for _Bool support" >&5
10625echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010626have_c99_bool=no
10627cat >conftest.$ac_ext <<_ACEOF
10628/* confdefs.h. */
10629_ACEOF
10630cat confdefs.h >>conftest.$ac_ext
10631cat >>conftest.$ac_ext <<_ACEOF
10632/* end confdefs.h. */
10633
10634int
10635main ()
10636{
10637_Bool x; x = (_Bool)0;
10638 ;
10639 return 0;
10640}
10641_ACEOF
10642rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010643if { (ac_try="$ac_compile"
10644case "(($ac_try" in
10645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10646 *) ac_try_echo=$ac_try;;
10647esac
10648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010650 ac_status=$?
10651 grep -v '^ *+' conftest.er1 >conftest.err
10652 rm -f conftest.er1
10653 cat conftest.err >&5
10654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010655 (exit $ac_status); } && {
10656 test -z "$ac_c_werror_flag" ||
10657 test ! -s conftest.err
10658 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010659
10660
10661cat >>confdefs.h <<\_ACEOF
10662#define HAVE_C99_BOOL 1
10663_ACEOF
10664
10665 have_c99_bool=yes
10666
10667else
10668 echo "$as_me: failed program was:" >&5
10669sed 's/^/| /' conftest.$ac_ext >&5
10670
Martin v. Löwiseba40652007-08-30 20:10:57 +000010671
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673
10674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10675{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
10676echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010677if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010678{ echo "$as_me:$LINENO: checking for _Bool" >&5
10679echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010680if test "${ac_cv_type__Bool+set}" = set; then
10681 echo $ECHO_N "(cached) $ECHO_C" >&6
10682else
10683 cat >conftest.$ac_ext <<_ACEOF
10684/* confdefs.h. */
10685_ACEOF
10686cat confdefs.h >>conftest.$ac_ext
10687cat >>conftest.$ac_ext <<_ACEOF
10688/* end confdefs.h. */
10689$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010690typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010691int
10692main ()
10693{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010694if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010695 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010696if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010697 return 0;
10698 ;
10699 return 0;
10700}
10701_ACEOF
10702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010703if { (ac_try="$ac_compile"
10704case "(($ac_try" in
10705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10706 *) ac_try_echo=$ac_try;;
10707esac
10708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010710 ac_status=$?
10711 grep -v '^ *+' conftest.er1 >conftest.err
10712 rm -f conftest.er1
10713 cat conftest.err >&5
10714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010715 (exit $ac_status); } && {
10716 test -z "$ac_c_werror_flag" ||
10717 test ! -s conftest.err
10718 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010719 ac_cv_type__Bool=yes
10720else
10721 echo "$as_me: failed program was:" >&5
10722sed 's/^/| /' conftest.$ac_ext >&5
10723
Martin v. Löwiseba40652007-08-30 20:10:57 +000010724 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010725fi
Brett Cannon19fab762007-06-02 03:02:29 +000010726
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10728fi
10729{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
10730echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
10731
10732# The cast to long int works around a bug in the HP C Compiler
10733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10735# This bug is HP SR number 8606223364.
10736{ echo "$as_me:$LINENO: checking size of _Bool" >&5
10737echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010738if test "${ac_cv_sizeof__Bool+set}" = set; then
10739 echo $ECHO_N "(cached) $ECHO_C" >&6
10740else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010741 if test "$cross_compiling" = yes; then
10742 # Depending upon the size, compute the lo and hi bounds.
10743cat >conftest.$ac_ext <<_ACEOF
10744/* confdefs.h. */
10745_ACEOF
10746cat confdefs.h >>conftest.$ac_ext
10747cat >>conftest.$ac_ext <<_ACEOF
10748/* end confdefs.h. */
10749$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010750 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010751int
10752main ()
10753{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010754static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010755test_array [0] = 0
10756
10757 ;
10758 return 0;
10759}
10760_ACEOF
10761rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010762if { (ac_try="$ac_compile"
10763case "(($ac_try" in
10764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10765 *) ac_try_echo=$ac_try;;
10766esac
10767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010769 ac_status=$?
10770 grep -v '^ *+' conftest.er1 >conftest.err
10771 rm -f conftest.er1
10772 cat conftest.err >&5
10773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010774 (exit $ac_status); } && {
10775 test -z "$ac_c_werror_flag" ||
10776 test ! -s conftest.err
10777 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010778 ac_lo=0 ac_mid=0
10779 while :; do
10780 cat >conftest.$ac_ext <<_ACEOF
10781/* confdefs.h. */
10782_ACEOF
10783cat confdefs.h >>conftest.$ac_ext
10784cat >>conftest.$ac_ext <<_ACEOF
10785/* end confdefs.h. */
10786$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010787 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010788int
10789main ()
10790{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010791static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010792test_array [0] = 0
10793
10794 ;
10795 return 0;
10796}
10797_ACEOF
10798rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010799if { (ac_try="$ac_compile"
10800case "(($ac_try" in
10801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10802 *) ac_try_echo=$ac_try;;
10803esac
10804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010806 ac_status=$?
10807 grep -v '^ *+' conftest.er1 >conftest.err
10808 rm -f conftest.er1
10809 cat conftest.err >&5
10810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010811 (exit $ac_status); } && {
10812 test -z "$ac_c_werror_flag" ||
10813 test ! -s conftest.err
10814 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010815 ac_hi=$ac_mid; break
10816else
10817 echo "$as_me: failed program was:" >&5
10818sed 's/^/| /' conftest.$ac_ext >&5
10819
Martin v. Löwiseba40652007-08-30 20:10:57 +000010820 ac_lo=`expr $ac_mid + 1`
10821 if test $ac_lo -le $ac_mid; then
10822 ac_lo= ac_hi=
10823 break
10824 fi
10825 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010827
10828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010829 done
10830else
10831 echo "$as_me: failed program was:" >&5
10832sed 's/^/| /' conftest.$ac_ext >&5
10833
Martin v. Löwiseba40652007-08-30 20:10:57 +000010834 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010835/* confdefs.h. */
10836_ACEOF
10837cat confdefs.h >>conftest.$ac_ext
10838cat >>conftest.$ac_ext <<_ACEOF
10839/* end confdefs.h. */
10840$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010841 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010842int
10843main ()
10844{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010845static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010846test_array [0] = 0
10847
10848 ;
10849 return 0;
10850}
10851_ACEOF
10852rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010853if { (ac_try="$ac_compile"
10854case "(($ac_try" in
10855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10856 *) ac_try_echo=$ac_try;;
10857esac
10858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010860 ac_status=$?
10861 grep -v '^ *+' conftest.er1 >conftest.err
10862 rm -f conftest.er1
10863 cat conftest.err >&5
10864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010865 (exit $ac_status); } && {
10866 test -z "$ac_c_werror_flag" ||
10867 test ! -s conftest.err
10868 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010869 ac_hi=-1 ac_mid=-1
10870 while :; do
10871 cat >conftest.$ac_ext <<_ACEOF
10872/* confdefs.h. */
10873_ACEOF
10874cat confdefs.h >>conftest.$ac_ext
10875cat >>conftest.$ac_ext <<_ACEOF
10876/* end confdefs.h. */
10877$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010878 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010879int
10880main ()
10881{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010882static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010883test_array [0] = 0
10884
10885 ;
10886 return 0;
10887}
10888_ACEOF
10889rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010890if { (ac_try="$ac_compile"
10891case "(($ac_try" in
10892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10893 *) ac_try_echo=$ac_try;;
10894esac
10895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010897 ac_status=$?
10898 grep -v '^ *+' conftest.er1 >conftest.err
10899 rm -f conftest.er1
10900 cat conftest.err >&5
10901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010902 (exit $ac_status); } && {
10903 test -z "$ac_c_werror_flag" ||
10904 test ! -s conftest.err
10905 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010906 ac_lo=$ac_mid; break
10907else
10908 echo "$as_me: failed program was:" >&5
10909sed 's/^/| /' conftest.$ac_ext >&5
10910
Martin v. Löwiseba40652007-08-30 20:10:57 +000010911 ac_hi=`expr '(' $ac_mid ')' - 1`
10912 if test $ac_mid -le $ac_hi; then
10913 ac_lo= ac_hi=
10914 break
10915 fi
10916 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010918
10919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010920 done
10921else
10922 echo "$as_me: failed program was:" >&5
10923sed 's/^/| /' conftest.$ac_ext >&5
10924
Martin v. Löwiseba40652007-08-30 20:10:57 +000010925 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010927
10928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010930
10931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010932# Binary search between lo and hi bounds.
10933while test "x$ac_lo" != "x$ac_hi"; do
10934 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10935 cat >conftest.$ac_ext <<_ACEOF
10936/* confdefs.h. */
10937_ACEOF
10938cat confdefs.h >>conftest.$ac_ext
10939cat >>conftest.$ac_ext <<_ACEOF
10940/* end confdefs.h. */
10941$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010942 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010943int
10944main ()
10945{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010946static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010947test_array [0] = 0
10948
10949 ;
10950 return 0;
10951}
10952_ACEOF
10953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010954if { (ac_try="$ac_compile"
10955case "(($ac_try" in
10956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10957 *) ac_try_echo=$ac_try;;
10958esac
10959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010961 ac_status=$?
10962 grep -v '^ *+' conftest.er1 >conftest.err
10963 rm -f conftest.er1
10964 cat conftest.err >&5
10965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010966 (exit $ac_status); } && {
10967 test -z "$ac_c_werror_flag" ||
10968 test ! -s conftest.err
10969 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010970 ac_hi=$ac_mid
10971else
10972 echo "$as_me: failed program was:" >&5
10973sed 's/^/| /' conftest.$ac_ext >&5
10974
Martin v. Löwiseba40652007-08-30 20:10:57 +000010975 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010977
10978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010979done
10980case $ac_lo in
10981?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010982'') if test "$ac_cv_type__Bool" = yes; then
10983 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010984See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010985echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010986See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010987 { (exit 77); exit 77; }; }
10988 else
10989 ac_cv_sizeof__Bool=0
10990 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010991esac
10992else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010993 cat >conftest.$ac_ext <<_ACEOF
10994/* confdefs.h. */
10995_ACEOF
10996cat confdefs.h >>conftest.$ac_ext
10997cat >>conftest.$ac_ext <<_ACEOF
10998/* end confdefs.h. */
10999$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011000 typedef _Bool ac__type_sizeof_;
11001static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11002static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011003#include <stdio.h>
11004#include <stdlib.h>
11005int
11006main ()
11007{
11008
11009 FILE *f = fopen ("conftest.val", "w");
11010 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011011 return 1;
11012 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011013 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011014 long int i = longval ();
11015 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11016 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011017 fprintf (f, "%ld\n", i);
11018 }
11019 else
11020 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011021 unsigned long int i = ulongval ();
11022 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11023 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011024 fprintf (f, "%lu\n", i);
11025 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011026 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011027
11028 ;
11029 return 0;
11030}
11031_ACEOF
11032rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011033if { (ac_try="$ac_link"
11034case "(($ac_try" in
11035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11036 *) ac_try_echo=$ac_try;;
11037esac
11038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11039 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011040 ac_status=$?
11041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011043 { (case "(($ac_try" in
11044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11045 *) ac_try_echo=$ac_try;;
11046esac
11047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11048 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011049 ac_status=$?
11050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11051 (exit $ac_status); }; }; then
11052 ac_cv_sizeof__Bool=`cat conftest.val`
11053else
11054 echo "$as_me: program exited with status $ac_status" >&5
11055echo "$as_me: failed program was:" >&5
11056sed 's/^/| /' conftest.$ac_ext >&5
11057
11058( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011059if test "$ac_cv_type__Bool" = yes; then
11060 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011061See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011062echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011063See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011064 { (exit 77); exit 77; }; }
11065 else
11066 ac_cv_sizeof__Bool=0
11067 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011069rm -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 +000011070fi
11071rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011073{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11074echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11075
11076
11077
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011078cat >>confdefs.h <<_ACEOF
11079#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11080_ACEOF
11081
11082
11083fi
11084
Martin v. Löwiseba40652007-08-30 20:10:57 +000011085{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11086echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011087if test "${ac_cv_type_uintptr_t+set}" = set; then
11088 echo $ECHO_N "(cached) $ECHO_C" >&6
11089else
11090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011091/* confdefs.h. */
11092_ACEOF
11093cat confdefs.h >>conftest.$ac_ext
11094cat >>conftest.$ac_ext <<_ACEOF
11095/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011096#ifdef HAVE_STDINT_H
11097 #include <stdint.h>
11098 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011099
Martin v. Löwiseba40652007-08-30 20:10:57 +000011100typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011101int
11102main ()
11103{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011104if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011105 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011106if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011107 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011108 ;
11109 return 0;
11110}
11111_ACEOF
11112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011113if { (ac_try="$ac_compile"
11114case "(($ac_try" in
11115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11116 *) ac_try_echo=$ac_try;;
11117esac
11118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011121 grep -v '^ *+' conftest.er1 >conftest.err
11122 rm -f conftest.er1
11123 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011125 (exit $ac_status); } && {
11126 test -z "$ac_c_werror_flag" ||
11127 test ! -s conftest.err
11128 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011129 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011130else
Martin v. Löwis11437992002-04-12 09:54:03 +000011131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011132sed 's/^/| /' conftest.$ac_ext >&5
11133
Martin v. Löwiseba40652007-08-30 20:10:57 +000011134 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011136
11137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011139{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11140echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011141if test $ac_cv_type_uintptr_t = yes; then
11142
11143cat >>confdefs.h <<_ACEOF
11144#define HAVE_UINTPTR_T 1
11145_ACEOF
11146
Martin v. Löwiseba40652007-08-30 20:10:57 +000011147{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11148echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011149if test "${ac_cv_type_uintptr_t+set}" = set; then
11150 echo $ECHO_N "(cached) $ECHO_C" >&6
11151else
11152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011153/* confdefs.h. */
11154_ACEOF
11155cat confdefs.h >>conftest.$ac_ext
11156cat >>conftest.$ac_ext <<_ACEOF
11157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011158$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011159typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011160int
11161main ()
11162{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011163if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011165if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011166 return 0;
11167 ;
11168 return 0;
11169}
11170_ACEOF
11171rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011172if { (ac_try="$ac_compile"
11173case "(($ac_try" in
11174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11175 *) ac_try_echo=$ac_try;;
11176esac
11177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011180 grep -v '^ *+' conftest.er1 >conftest.err
11181 rm -f conftest.er1
11182 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011184 (exit $ac_status); } && {
11185 test -z "$ac_c_werror_flag" ||
11186 test ! -s conftest.err
11187 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 ac_cv_type_uintptr_t=yes
11189else
11190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011191sed 's/^/| /' conftest.$ac_ext >&5
11192
Martin v. Löwiseba40652007-08-30 20:10:57 +000011193 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011194fi
Brett Cannon19fab762007-06-02 03:02:29 +000011195
Martin v. Löwiseba40652007-08-30 20:10:57 +000011196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11197fi
11198{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11199echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11200
11201# The cast to long int works around a bug in the HP C Compiler
11202# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11203# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11204# This bug is HP SR number 8606223364.
11205{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11206echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011207if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11208 echo $ECHO_N "(cached) $ECHO_C" >&6
11209else
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 if test "$cross_compiling" = yes; then
11211 # Depending upon the size, compute the lo and hi bounds.
11212cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011213/* confdefs.h. */
11214_ACEOF
11215cat confdefs.h >>conftest.$ac_ext
11216cat >>conftest.$ac_ext <<_ACEOF
11217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011218$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011219 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011220int
11221main ()
11222{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011223static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011224test_array [0] = 0
11225
11226 ;
11227 return 0;
11228}
11229_ACEOF
11230rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011231if { (ac_try="$ac_compile"
11232case "(($ac_try" in
11233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11234 *) ac_try_echo=$ac_try;;
11235esac
11236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11237 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011239 grep -v '^ *+' conftest.er1 >conftest.err
11240 rm -f conftest.er1
11241 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011243 (exit $ac_status); } && {
11244 test -z "$ac_c_werror_flag" ||
11245 test ! -s conftest.err
11246 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011247 ac_lo=0 ac_mid=0
11248 while :; do
11249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011250/* confdefs.h. */
11251_ACEOF
11252cat confdefs.h >>conftest.$ac_ext
11253cat >>conftest.$ac_ext <<_ACEOF
11254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011255$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011256 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011257int
11258main ()
11259{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011260static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011261test_array [0] = 0
11262
11263 ;
11264 return 0;
11265}
11266_ACEOF
11267rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011268if { (ac_try="$ac_compile"
11269case "(($ac_try" in
11270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11271 *) ac_try_echo=$ac_try;;
11272esac
11273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011276 grep -v '^ *+' conftest.er1 >conftest.err
11277 rm -f conftest.er1
11278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011280 (exit $ac_status); } && {
11281 test -z "$ac_c_werror_flag" ||
11282 test ! -s conftest.err
11283 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 ac_hi=$ac_mid; break
11285else
11286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011287sed 's/^/| /' conftest.$ac_ext >&5
11288
Martin v. Löwiseba40652007-08-30 20:10:57 +000011289 ac_lo=`expr $ac_mid + 1`
11290 if test $ac_lo -le $ac_mid; then
11291 ac_lo= ac_hi=
11292 break
11293 fi
11294 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011296
11297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 done
11299else
11300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011301sed 's/^/| /' conftest.$ac_ext >&5
11302
Martin v. Löwiseba40652007-08-30 20:10:57 +000011303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011304/* confdefs.h. */
11305_ACEOF
11306cat confdefs.h >>conftest.$ac_ext
11307cat >>conftest.$ac_ext <<_ACEOF
11308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011309$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011310 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011311int
11312main ()
11313{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011315test_array [0] = 0
11316
11317 ;
11318 return 0;
11319}
11320_ACEOF
11321rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011322if { (ac_try="$ac_compile"
11323case "(($ac_try" in
11324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11325 *) ac_try_echo=$ac_try;;
11326esac
11327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011330 grep -v '^ *+' conftest.er1 >conftest.err
11331 rm -f conftest.er1
11332 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011334 (exit $ac_status); } && {
11335 test -z "$ac_c_werror_flag" ||
11336 test ! -s conftest.err
11337 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 ac_hi=-1 ac_mid=-1
11339 while :; do
11340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011341/* confdefs.h. */
11342_ACEOF
11343cat confdefs.h >>conftest.$ac_ext
11344cat >>conftest.$ac_ext <<_ACEOF
11345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011346$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011347 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011348int
11349main ()
11350{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011351static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011352test_array [0] = 0
11353
11354 ;
11355 return 0;
11356}
11357_ACEOF
11358rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011359if { (ac_try="$ac_compile"
11360case "(($ac_try" in
11361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11362 *) ac_try_echo=$ac_try;;
11363esac
11364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011367 grep -v '^ *+' conftest.er1 >conftest.err
11368 rm -f conftest.er1
11369 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011371 (exit $ac_status); } && {
11372 test -z "$ac_c_werror_flag" ||
11373 test ! -s conftest.err
11374 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 ac_lo=$ac_mid; break
11376else
11377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011378sed 's/^/| /' conftest.$ac_ext >&5
11379
Martin v. Löwiseba40652007-08-30 20:10:57 +000011380 ac_hi=`expr '(' $ac_mid ')' - 1`
11381 if test $ac_mid -le $ac_hi; then
11382 ac_lo= ac_hi=
11383 break
11384 fi
11385 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011387
11388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 done
11390else
11391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011392sed 's/^/| /' conftest.$ac_ext >&5
11393
Martin v. Löwiseba40652007-08-30 20:10:57 +000011394 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011396
11397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011399
11400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011401# Binary search between lo and hi bounds.
11402while test "x$ac_lo" != "x$ac_hi"; do
11403 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011405/* confdefs.h. */
11406_ACEOF
11407cat confdefs.h >>conftest.$ac_ext
11408cat >>conftest.$ac_ext <<_ACEOF
11409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011410$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011411 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011412int
11413main ()
11414{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011416test_array [0] = 0
11417
11418 ;
11419 return 0;
11420}
11421_ACEOF
11422rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011423if { (ac_try="$ac_compile"
11424case "(($ac_try" in
11425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11426 *) ac_try_echo=$ac_try;;
11427esac
11428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011431 grep -v '^ *+' conftest.er1 >conftest.err
11432 rm -f conftest.er1
11433 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011435 (exit $ac_status); } && {
11436 test -z "$ac_c_werror_flag" ||
11437 test ! -s conftest.err
11438 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 ac_hi=$ac_mid
11440else
11441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011442sed 's/^/| /' conftest.$ac_ext >&5
11443
Martin v. Löwiseba40652007-08-30 20:10:57 +000011444 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446
11447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011448done
11449case $ac_lo in
11450?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011451'') if test "$ac_cv_type_uintptr_t" = yes; then
11452 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011453See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011454echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011455See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011456 { (exit 77); exit 77; }; }
11457 else
11458 ac_cv_sizeof_uintptr_t=0
11459 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011460esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011461else
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011463/* confdefs.h. */
11464_ACEOF
11465cat confdefs.h >>conftest.$ac_ext
11466cat >>conftest.$ac_ext <<_ACEOF
11467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011468$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011469 typedef uintptr_t ac__type_sizeof_;
11470static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11471static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011472#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011473#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011474int
11475main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011476{
Martin v. Löwis11437992002-04-12 09:54:03 +000011477
11478 FILE *f = fopen ("conftest.val", "w");
11479 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011480 return 1;
11481 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011483 long int i = longval ();
11484 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11485 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 fprintf (f, "%ld\n", i);
11487 }
11488 else
11489 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011490 unsigned long int i = ulongval ();
11491 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11492 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 fprintf (f, "%lu\n", i);
11494 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011495 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011496
11497 ;
11498 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011499}
Martin v. Löwis11437992002-04-12 09:54:03 +000011500_ACEOF
11501rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011502if { (ac_try="$ac_link"
11503case "(($ac_try" in
11504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11505 *) ac_try_echo=$ac_try;;
11506esac
11507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11508 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 ac_status=$?
11510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011512 { (case "(($ac_try" in
11513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11514 *) ac_try_echo=$ac_try;;
11515esac
11516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11517 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 ac_status=$?
11519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11520 (exit $ac_status); }; }; then
11521 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011522else
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 echo "$as_me: program exited with status $ac_status" >&5
11524echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011525sed 's/^/| /' conftest.$ac_ext >&5
11526
Martin v. Löwis11437992002-04-12 09:54:03 +000011527( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011528if test "$ac_cv_type_uintptr_t" = yes; then
11529 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011530See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011531echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011532See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011533 { (exit 77); exit 77; }; }
11534 else
11535 ac_cv_sizeof_uintptr_t=0
11536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011538rm -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 +000011539fi
11540rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011542{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11543echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
11544
11545
11546
Martin v. Löwis11437992002-04-12 09:54:03 +000011547cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011548#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011549_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011550
Michael W. Hudson54241132001-12-07 15:38:26 +000011551
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011552fi
11553
Martin v. Löwisebe26702006-10-02 14:55:51 +000011554
11555
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011556# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011557{ echo "$as_me:$LINENO: checking size of off_t" >&5
11558echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011559if test "${ac_cv_sizeof_off_t+set}" = set; then
11560 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011561else
11562 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011563 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011564else
Martin v. Löwis11437992002-04-12 09:54:03 +000011565 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011566/* confdefs.h. */
11567_ACEOF
11568cat confdefs.h >>conftest.$ac_ext
11569cat >>conftest.$ac_ext <<_ACEOF
11570/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011571#include <stdio.h>
11572#include <sys/types.h>
11573main()
11574{
11575 FILE *f=fopen("conftestval", "w");
11576 if (!f) exit(1);
11577 fprintf(f, "%d\n", sizeof(off_t));
11578 exit(0);
11579}
Martin v. Löwis11437992002-04-12 09:54:03 +000011580_ACEOF
11581rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011582if { (ac_try="$ac_link"
11583case "(($ac_try" in
11584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11585 *) ac_try_echo=$ac_try;;
11586esac
11587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11588 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 ac_status=$?
11590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11591 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592 { (case "(($ac_try" in
11593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11594 *) ac_try_echo=$ac_try;;
11595esac
11596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11597 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 ac_status=$?
11599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11600 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011601 ac_cv_sizeof_off_t=`cat conftestval`
11602else
Martin v. Löwis11437992002-04-12 09:54:03 +000011603 echo "$as_me: program exited with status $ac_status" >&5
11604echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011605sed 's/^/| /' conftest.$ac_ext >&5
11606
Martin v. Löwis11437992002-04-12 09:54:03 +000011607( exit $ac_status )
11608ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011610rm -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 +000011611fi
11612
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613
11614
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011615fi
11616
Martin v. Löwiseba40652007-08-30 20:10:57 +000011617{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
11618echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011619
11620cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011621#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011622_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011623
Michael W. Hudson54241132001-12-07 15:38:26 +000011624
Martin v. Löwiseba40652007-08-30 20:10:57 +000011625{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
11626echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011627if test "$have_long_long" = yes -a \
11628 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
11629 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011630
Martin v. Löwis11437992002-04-12 09:54:03 +000011631cat >>confdefs.h <<\_ACEOF
11632#define HAVE_LARGEFILE_SUPPORT 1
11633_ACEOF
11634
Martin v. Löwiseba40652007-08-30 20:10:57 +000011635 { echo "$as_me:$LINENO: result: yes" >&5
11636echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011637else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011638 { echo "$as_me:$LINENO: result: no" >&5
11639echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011640fi
11641
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011642# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011643{ echo "$as_me:$LINENO: checking size of time_t" >&5
11644echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011645if test "${ac_cv_sizeof_time_t+set}" = set; then
11646 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011647else
11648 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011649 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011650else
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011652/* confdefs.h. */
11653_ACEOF
11654cat confdefs.h >>conftest.$ac_ext
11655cat >>conftest.$ac_ext <<_ACEOF
11656/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011657#include <stdio.h>
11658#include <time.h>
11659main()
11660{
11661 FILE *f=fopen("conftestval", "w");
11662 if (!f) exit(1);
11663 fprintf(f, "%d\n", sizeof(time_t));
11664 exit(0);
11665}
Martin v. Löwis11437992002-04-12 09:54:03 +000011666_ACEOF
11667rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011668if { (ac_try="$ac_link"
11669case "(($ac_try" in
11670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11671 *) ac_try_echo=$ac_try;;
11672esac
11673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11674 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 ac_status=$?
11676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11677 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011678 { (case "(($ac_try" in
11679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11680 *) ac_try_echo=$ac_try;;
11681esac
11682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11683 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011684 ac_status=$?
11685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11686 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011687 ac_cv_sizeof_time_t=`cat conftestval`
11688else
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 echo "$as_me: program exited with status $ac_status" >&5
11690echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011691sed 's/^/| /' conftest.$ac_ext >&5
11692
Martin v. Löwis11437992002-04-12 09:54:03 +000011693( exit $ac_status )
11694ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011696rm -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 +000011697fi
11698
Martin v. Löwiseba40652007-08-30 20:10:57 +000011699
11700
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011701fi
11702
Martin v. Löwiseba40652007-08-30 20:10:57 +000011703{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
11704echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011705
11706cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011707#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011708_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011709
Michael W. Hudson54241132001-12-07 15:38:26 +000011710
11711
Trent Mick635f6fb2000-08-23 21:33:05 +000011712# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011713ac_save_cc="$CC"
11714if test "$ac_cv_kpthread" = "yes"
11715then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011716elif test "$ac_cv_kthread" = "yes"
11717then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011718elif test "$ac_cv_pthread" = "yes"
11719then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011721{ echo "$as_me:$LINENO: checking for pthread_t" >&5
11722echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000011723have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011724cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011725/* confdefs.h. */
11726_ACEOF
11727cat confdefs.h >>conftest.$ac_ext
11728cat >>conftest.$ac_ext <<_ACEOF
11729/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011730#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011731int
11732main ()
11733{
Guido van Rossum12580492000-09-24 16:47:19 +000011734pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 ;
11736 return 0;
11737}
11738_ACEOF
11739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011740if { (ac_try="$ac_compile"
11741case "(($ac_try" in
11742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11743 *) ac_try_echo=$ac_try;;
11744esac
11745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011748 grep -v '^ *+' conftest.er1 >conftest.err
11749 rm -f conftest.er1
11750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011752 (exit $ac_status); } && {
11753 test -z "$ac_c_werror_flag" ||
11754 test ! -s conftest.err
11755 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011756 have_pthread_t=yes
11757else
Martin v. Löwis11437992002-04-12 09:54:03 +000011758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011759sed 's/^/| /' conftest.$ac_ext >&5
11760
Martin v. Löwiseba40652007-08-30 20:10:57 +000011761
Trent Mick635f6fb2000-08-23 21:33:05 +000011762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011763
11764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11765{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
11766echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000011767if test "$have_pthread_t" = yes ; then
11768 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011769 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
11770echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011771 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
11772 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000011773else
11774 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011775 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000011776else
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011778/* confdefs.h. */
11779_ACEOF
11780cat confdefs.h >>conftest.$ac_ext
11781cat >>conftest.$ac_ext <<_ACEOF
11782/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011783#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011784#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000011785 main()
11786 {
11787 FILE *f=fopen("conftestval", "w");
11788 if (!f) exit(1);
11789 fprintf(f, "%d\n", sizeof(pthread_t));
11790 exit(0);
11791 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011792_ACEOF
11793rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011794if { (ac_try="$ac_link"
11795case "(($ac_try" in
11796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11797 *) ac_try_echo=$ac_try;;
11798esac
11799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11800 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011801 ac_status=$?
11802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011804 { (case "(($ac_try" in
11805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11806 *) ac_try_echo=$ac_try;;
11807esac
11808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11809 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011810 ac_status=$?
11811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11812 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011813 ac_cv_sizeof_pthread_t=`cat conftestval`
11814else
Martin v. Löwis11437992002-04-12 09:54:03 +000011815 echo "$as_me: program exited with status $ac_status" >&5
11816echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011817sed 's/^/| /' conftest.$ac_ext >&5
11818
Martin v. Löwis11437992002-04-12 09:54:03 +000011819( exit $ac_status )
11820ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000011821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011822rm -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 +000011823fi
11824
Martin v. Löwiseba40652007-08-30 20:10:57 +000011825
11826
Trent Mick635f6fb2000-08-23 21:33:05 +000011827fi
11828
Martin v. Löwiseba40652007-08-30 20:10:57 +000011829 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
11830echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011831
11832cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011833#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011834_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011835
11836fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011837CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000011838
Martin v. Löwiseba40652007-08-30 20:10:57 +000011839{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
11840echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
11841# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000011842if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011843 enableval=$enable_toolbox_glue;
11844fi
Jack Jansene578a632001-08-15 01:27:14 +000011845
11846
11847if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000011848then
Jack Jansene578a632001-08-15 01:27:14 +000011849 case $ac_sys_system/$ac_sys_release in
11850 Darwin/*)
11851 enable_toolbox_glue="yes";;
11852 *)
11853 enable_toolbox_glue="no";;
11854 esac
11855fi
11856case "$enable_toolbox_glue" in
11857yes)
Jack Jansene578a632001-08-15 01:27:14 +000011858 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011859 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000011860
11861cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011862#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011863_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011864
11865 ;;
11866*)
Jack Jansene578a632001-08-15 01:27:14 +000011867 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000011868 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000011869 ;;
11870esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000011871{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
11872echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011873
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011874
11875case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000011876 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011877 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
11878 ;;
11879 Darwin/*)
11880 OTHER_LIBTOOL_OPT=""
11881 ;;
11882esac
11883
11884
11885case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000011886 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000011887 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
11888 if test "${enable_universalsdk}"; then
11889 :
11890 else
11891 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
11892 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000011893 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000011894 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000011895 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011896 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
11897 if test ${gcc_version} '<' 4.0
11898 then
11899 LIBTOOL_CRUFT="-lcc_dynamic"
11900 else
11901 LIBTOOL_CRUFT=""
11902 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000011903 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000011904 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011905 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011906esac
11907
Martin v. Löwiseba40652007-08-30 20:10:57 +000011908{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
11909echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000011910if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011911then
Skip Montanarodecc6a42003-01-01 20:07:49 +000011912 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000011913 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000011914 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011915
Martin v. Löwis11437992002-04-12 09:54:03 +000011916cat >>confdefs.h <<\_ACEOF
11917#define WITH_NEXT_FRAMEWORK 1
11918_ACEOF
11919
Martin v. Löwiseba40652007-08-30 20:10:57 +000011920 { echo "$as_me:$LINENO: result: yes" >&5
11921echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011922else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011923 { echo "$as_me:$LINENO: result: no" >&5
11924echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011925fi
11926
Martin v. Löwiseba40652007-08-30 20:10:57 +000011927{ echo "$as_me:$LINENO: checking for dyld" >&5
11928echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011929case $ac_sys_system/$ac_sys_release in
11930 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011931
Martin v. Löwis11437992002-04-12 09:54:03 +000011932cat >>confdefs.h <<\_ACEOF
11933#define WITH_DYLD 1
11934_ACEOF
11935
Martin v. Löwiseba40652007-08-30 20:10:57 +000011936 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
11937echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011938 ;;
11939 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011940 { echo "$as_me:$LINENO: result: no" >&5
11941echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000011942 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011943esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011944
Guido van Rossum0a516c91994-09-12 10:58:40 +000011945# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000011946
Michael W. Hudson54241132001-12-07 15:38:26 +000011947
11948
11949
11950
Guido van Rossum0a516c91994-09-12 10:58:40 +000011951# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000011952# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000011953{ echo "$as_me:$LINENO: checking SO" >&5
11954echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000011955if test -z "$SO"
11956then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011957 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000011958 hp*|HP*)
11959 case `uname -m` in
11960 ia64) SO=.so;;
11961 *) SO=.sl;;
11962 esac
11963 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000011964 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011965 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011966 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000011967else
11968 # this might also be a termcap variable, see #610332
11969 echo
11970 echo '====================================================================='
11971 echo '+ +'
11972 echo '+ WARNING: You have set SO in your environment. +'
11973 echo '+ Do you really mean to change the extension for shared libraries? +'
11974 echo '+ Continuing in 10 seconds to let you to ponder. +'
11975 echo '+ +'
11976 echo '====================================================================='
11977 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000011978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011979{ echo "$as_me:$LINENO: result: $SO" >&5
11980echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000011981
11982cat >>confdefs.h <<_ACEOF
11983#define SHLIB_EXT "$SO"
11984_ACEOF
11985
Guido van Rossum0a516c91994-09-12 10:58:40 +000011986# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000011987# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011988# (Shared libraries in this instance are shared modules to be loaded into
11989# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011990{ echo "$as_me:$LINENO: checking LDSHARED" >&5
11991echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000011992if test -z "$LDSHARED"
11993then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011994 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011995 AIX*)
11996 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000011997 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011998 ;;
11999 BeOS*)
12000 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012001 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012002 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012003 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012004 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012006 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012007 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012008 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012009 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012010 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012011 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012012 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012013 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12014 if test "$enable_framework" ; then
12015 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012016 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12017 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012018 else
12019 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012020 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012021 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012022 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012023 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12024 if test "$enable_framework" ; then
12025 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012026 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12027 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012028 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012029 # No framework, use the Python app as bundle-loader
12030 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012031 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012032 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012033 Darwin/*)
12034 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12035 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012036 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012037 if test ${cur_target} '>' 10.2; then
12038 cur_target=10.3
12039 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012040 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012041
12042 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12043 # environment with a value that is the same as what we'll use
12044 # in the Makefile to ensure that we'll get the same compiler
12045 # environment during configure and build time.
12046 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12047 export MACOSX_DEPLOYMENT_TARGET
12048
Ronald Oussoren988117f2006-04-29 11:31:35 +000012049 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012050 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012051 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012052 if test "${enable_universalsdk}"; then
12053 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12054 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012055 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12056 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012057 else
12058 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12059 if test "$enable_framework" ; then
12060 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012061 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12062 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012063 else
12064 # No framework, use the Python app as bundle-loader
12065 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12066 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12067 fi
12068 fi
12069 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012070 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012071 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012072 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012073 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012074 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012075 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012076 else
12077 LDSHARED="ld -Bshareable ${LDFLAGS}"
12078 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012079 OpenBSD*)
12080 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12081 then
12082 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12083 else
12084 case `uname -r` in
12085 [01].* | 2.[0-7] | 2.[0-7].*)
12086 LDSHARED="ld -Bshareable ${LDFLAGS}"
12087 ;;
12088 *)
12089 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12090 ;;
12091 esac
12092 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012093 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012094 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012095 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012096 then LDSHARED='$(CC) -shared'
12097 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012098 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012099 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012100 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012101 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012102 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012103 *) LDSHARED="ld";;
12104 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012106{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12107echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012108BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012109# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012110# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012111{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12112echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012113if test -z "$CCSHARED"
12114then
Guido van Rossum07397971997-04-29 21:49:50 +000012115 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012116 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012117 then CCSHARED="-fPIC";
12118 elif test `uname -p` = sparc;
12119 then CCSHARED="-xcode=pic32";
12120 else CCSHARED="-Kpic";
12121 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012122 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012123 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012124 else CCSHARED="+z";
12125 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012126 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012127 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012128 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012129 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012130 if test "$GCC" = "yes"
12131 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012132 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012133 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012134 SCO_SV*)
12135 if test "$GCC" = "yes"
12136 then CCSHARED="-fPIC"
12137 else CCSHARED="-Kpic -belf"
12138 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012139 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012140 IRIX*/6*) case $CC in
12141 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012142 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012143 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012144 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012145 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012147{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12148echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012149# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012150# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012151{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12152echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012153if test -z "$LINKFORSHARED"
12154then
Guido van Rossum07397971997-04-29 21:49:50 +000012155 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012156 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012157 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012158 LINKFORSHARED="-Wl,-E -Wl,+s";;
12159# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012160 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012161 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012162 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012163 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012164 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12165 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012166 # not used by the core itself but which needs to be in the core so
12167 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012168 # -prebind is no longer used, because it actually seems to give a
12169 # slowdown in stead of a speedup, maybe due to the large number of
12170 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012171
12172 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012173 if test "$enable_framework"
12174 then
Jack Jansenda49e192005-01-07 13:08:22 +000012175 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012176 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012177 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012178 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012179 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012180 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012181 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012182 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12183 then
12184 LINKFORSHARED="-Wl,--export-dynamic"
12185 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012186 SunOS/5*) case $CC in
12187 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012188 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012189 then
12190 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012191 fi;;
12192 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012193 CYGWIN*)
12194 if test $enable_shared = "no"
12195 then
12196 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12197 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012198 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012200{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12201echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012202
Michael W. Hudson54241132001-12-07 15:38:26 +000012203
Martin v. Löwiseba40652007-08-30 20:10:57 +000012204{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12205echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012206if test ! "$LIBRARY" = "$LDLIBRARY"
12207then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012208 case $ac_sys_system in
12209 CYGWIN*)
12210 # Cygwin needs CCSHARED when building extension DLLs
12211 # but not when building the interpreter DLL.
12212 CFLAGSFORSHARED='';;
12213 *)
12214 CFLAGSFORSHARED='$(CCSHARED)'
12215 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012217{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12218echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012219
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012220# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12221# library (with --enable-shared).
12222# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012223# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12224# if it is not required, since it creates a dependency of the shared library
12225# to LIBS. This, in turn, means that applications linking the shared libpython
12226# don't need to link LIBS explicitly. The default should be only changed
12227# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012228
Martin v. Löwiseba40652007-08-30 20:10:57 +000012229{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12230echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012231case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012232 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012233 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012234esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012235{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12236echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012237
12238
Guido van Rossum627b2d71993-12-24 10:39:16 +000012239# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012240
Martin v. Löwiseba40652007-08-30 20:10:57 +000012241{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12242echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012243if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12244 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012245else
Martin v. Löwis11437992002-04-12 09:54:03 +000012246 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012247LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012249/* confdefs.h. */
12250_ACEOF
12251cat confdefs.h >>conftest.$ac_ext
12252cat >>conftest.$ac_ext <<_ACEOF
12253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012254
Martin v. Löwiseba40652007-08-30 20:10:57 +000012255/* Override any GCC internal prototype to avoid an error.
12256 Use char because int might match the return type of a GCC
12257 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012258#ifdef __cplusplus
12259extern "C"
12260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012261char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012262int
12263main ()
12264{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012265return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 ;
12267 return 0;
12268}
12269_ACEOF
12270rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012271if { (ac_try="$ac_link"
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_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012279 grep -v '^ *+' conftest.er1 >conftest.err
12280 rm -f conftest.er1
12281 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012282 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_exeext &&
12287 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012288 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012289else
Martin v. Löwis11437992002-04-12 09:54:03 +000012290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012291sed 's/^/| /' conftest.$ac_ext >&5
12292
Martin v. Löwiseba40652007-08-30 20:10:57 +000012293 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295
12296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012298LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012300{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12301echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012302if test $ac_cv_lib_dl_dlopen = yes; then
12303 cat >>confdefs.h <<_ACEOF
12304#define HAVE_LIBDL 1
12305_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012306
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012307 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012308
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012309fi
12310 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012311
Martin v. Löwiseba40652007-08-30 20:10:57 +000012312{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12313echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012314if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12315 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012316else
Martin v. Löwis11437992002-04-12 09:54:03 +000012317 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012318LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012319cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012320/* confdefs.h. */
12321_ACEOF
12322cat confdefs.h >>conftest.$ac_ext
12323cat >>conftest.$ac_ext <<_ACEOF
12324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012325
Martin v. Löwiseba40652007-08-30 20:10:57 +000012326/* Override any GCC internal prototype to avoid an error.
12327 Use char because int might match the return type of a GCC
12328 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012329#ifdef __cplusplus
12330extern "C"
12331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012332char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012333int
12334main ()
12335{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012337 ;
12338 return 0;
12339}
12340_ACEOF
12341rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012342if { (ac_try="$ac_link"
12343case "(($ac_try" in
12344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12345 *) ac_try_echo=$ac_try;;
12346esac
12347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12348 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012350 grep -v '^ *+' conftest.er1 >conftest.err
12351 rm -f conftest.er1
12352 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012354 (exit $ac_status); } && {
12355 test -z "$ac_c_werror_flag" ||
12356 test ! -s conftest.err
12357 } && test -s conftest$ac_exeext &&
12358 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012360else
Martin v. Löwis11437992002-04-12 09:54:03 +000012361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012362sed 's/^/| /' conftest.$ac_ext >&5
12363
Martin v. Löwiseba40652007-08-30 20:10:57 +000012364 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012366
12367rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012368 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012369LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012371{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12372echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012373if test $ac_cv_lib_dld_shl_load = yes; then
12374 cat >>confdefs.h <<_ACEOF
12375#define HAVE_LIBDLD 1
12376_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012377
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012378 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012379
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012380fi
12381 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012382
12383# only check for sem_ini if thread support is requested
12384if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012385 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12386echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012387if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012389else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012390 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012391cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012392/* confdefs.h. */
12393_ACEOF
12394cat confdefs.h >>conftest.$ac_ext
12395cat >>conftest.$ac_ext <<_ACEOF
12396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012397
Martin v. Löwiseba40652007-08-30 20:10:57 +000012398/* Override any GCC internal prototype to avoid an error.
12399 Use char because int might match the return type of a GCC
12400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012401#ifdef __cplusplus
12402extern "C"
12403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012404char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012405int
12406main ()
12407{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012408return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012409 ;
12410 return 0;
12411}
12412_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012413for ac_lib in '' pthread rt posix4; do
12414 if test -z "$ac_lib"; then
12415 ac_res="none required"
12416 else
12417 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012418 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012419 fi
12420 rm -f conftest.$ac_objext conftest$ac_exeext
12421if { (ac_try="$ac_link"
12422case "(($ac_try" in
12423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12424 *) ac_try_echo=$ac_try;;
12425esac
12426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12427 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012428 ac_status=$?
12429 grep -v '^ *+' conftest.er1 >conftest.err
12430 rm -f conftest.er1
12431 cat conftest.err >&5
12432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012433 (exit $ac_status); } && {
12434 test -z "$ac_c_werror_flag" ||
12435 test ! -s conftest.err
12436 } && test -s conftest$ac_exeext &&
12437 $as_test_x conftest$ac_exeext; then
12438 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012439else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012440 echo "$as_me: failed program was:" >&5
12441sed 's/^/| /' conftest.$ac_ext >&5
12442
Martin v. Löwiseba40652007-08-30 20:10:57 +000012443
Brett Cannon19fab762007-06-02 03:02:29 +000012444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012445
12446rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12447 conftest$ac_exeext
12448 if test "${ac_cv_search_sem_init+set}" = set; then
12449 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012451done
12452if test "${ac_cv_search_sem_init+set}" = set; then
12453 :
12454else
12455 ac_cv_search_sem_init=no
12456fi
12457rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012458LIBS=$ac_func_search_save_LIBS
12459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12461echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12462ac_res=$ac_cv_search_sem_init
12463if test "$ac_res" != no; then
12464 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012465
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012466fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012467 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012468 # posix4 on Solaris 2.6
12469 # pthread (first!) on Linux
12470fi
12471
Martin v. Löwis19d17342003-06-14 21:03:05 +000012472# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012473{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12474echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012475if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12476 echo $ECHO_N "(cached) $ECHO_C" >&6
12477else
12478 ac_check_lib_save_LIBS=$LIBS
12479LIBS="-lintl $LIBS"
12480cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012481/* confdefs.h. */
12482_ACEOF
12483cat confdefs.h >>conftest.$ac_ext
12484cat >>conftest.$ac_ext <<_ACEOF
12485/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012486
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487/* Override any GCC internal prototype to avoid an error.
12488 Use char because int might match the return type of a GCC
12489 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012490#ifdef __cplusplus
12491extern "C"
12492#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012493char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012494int
12495main ()
12496{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012497return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012498 ;
12499 return 0;
12500}
12501_ACEOF
12502rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012503if { (ac_try="$ac_link"
12504case "(($ac_try" in
12505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12506 *) ac_try_echo=$ac_try;;
12507esac
12508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12509 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012511 grep -v '^ *+' conftest.er1 >conftest.err
12512 rm -f conftest.er1
12513 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012515 (exit $ac_status); } && {
12516 test -z "$ac_c_werror_flag" ||
12517 test ! -s conftest.err
12518 } && test -s conftest$ac_exeext &&
12519 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012520 ac_cv_lib_intl_textdomain=yes
12521else
12522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012523sed 's/^/| /' conftest.$ac_ext >&5
12524
Martin v. Löwiseba40652007-08-30 20:10:57 +000012525 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012527
12528rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012529 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012530LIBS=$ac_check_lib_save_LIBS
12531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012532{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12533echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012534if test $ac_cv_lib_intl_textdomain = yes; then
12535
12536cat >>confdefs.h <<\_ACEOF
12537#define WITH_LIBINTL 1
12538_ACEOF
12539
12540fi
12541
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012542
12543# checks for system dependent C++ extensions support
12544case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000012545 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12546echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012548/* confdefs.h. */
12549_ACEOF
12550cat confdefs.h >>conftest.$ac_ext
12551cat >>conftest.$ac_ext <<_ACEOF
12552/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012553#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012554int
12555main ()
12556{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012557loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012558 ;
12559 return 0;
12560}
12561_ACEOF
12562rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012563if { (ac_try="$ac_link"
12564case "(($ac_try" in
12565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12566 *) ac_try_echo=$ac_try;;
12567esac
12568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12569 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012571 grep -v '^ *+' conftest.er1 >conftest.err
12572 rm -f conftest.er1
12573 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012575 (exit $ac_status); } && {
12576 test -z "$ac_c_werror_flag" ||
12577 test ! -s conftest.err
12578 } && test -s conftest$ac_exeext &&
12579 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012580
Martin v. Löwis11437992002-04-12 09:54:03 +000012581cat >>confdefs.h <<\_ACEOF
12582#define AIX_GENUINE_CPLUSPLUS 1
12583_ACEOF
12584
Martin v. Löwiseba40652007-08-30 20:10:57 +000012585 { echo "$as_me:$LINENO: result: yes" >&5
12586echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012587else
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012589sed 's/^/| /' conftest.$ac_ext >&5
12590
Martin v. Löwiseba40652007-08-30 20:10:57 +000012591 { echo "$as_me:$LINENO: result: no" >&5
12592echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012594
12595rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012596 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012597 *) ;;
12598esac
12599
Guido van Rossum70c7f481998-03-26 18:44:10 +000012600# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012601# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012602{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
12603echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012604if test "${ac_cv_lib_nsl_t_open+set}" = set; then
12605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012608LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012610/* confdefs.h. */
12611_ACEOF
12612cat confdefs.h >>conftest.$ac_ext
12613cat >>conftest.$ac_ext <<_ACEOF
12614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012615
Martin v. Löwiseba40652007-08-30 20:10:57 +000012616/* Override any GCC internal prototype to avoid an error.
12617 Use char because int might match the return type of a GCC
12618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012619#ifdef __cplusplus
12620extern "C"
12621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012622char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012623int
12624main ()
12625{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012626return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 ;
12628 return 0;
12629}
12630_ACEOF
12631rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012632if { (ac_try="$ac_link"
12633case "(($ac_try" in
12634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12635 *) ac_try_echo=$ac_try;;
12636esac
12637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12638 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012640 grep -v '^ *+' conftest.er1 >conftest.err
12641 rm -f conftest.er1
12642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012644 (exit $ac_status); } && {
12645 test -z "$ac_c_werror_flag" ||
12646 test ! -s conftest.err
12647 } && test -s conftest$ac_exeext &&
12648 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012650else
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012652sed 's/^/| /' conftest.$ac_ext >&5
12653
Martin v. Löwiseba40652007-08-30 20:10:57 +000012654 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012656
12657rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012658 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012659LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012661{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
12662echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012663if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012664 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012665fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000012666 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000012667{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
12668echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012669if test "${ac_cv_lib_socket_socket+set}" = set; then
12670 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012671else
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012673LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012674cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012675/* confdefs.h. */
12676_ACEOF
12677cat confdefs.h >>conftest.$ac_ext
12678cat >>conftest.$ac_ext <<_ACEOF
12679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Martin v. Löwiseba40652007-08-30 20:10:57 +000012681/* Override any GCC internal prototype to avoid an error.
12682 Use char because int might match the return type of a GCC
12683 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012684#ifdef __cplusplus
12685extern "C"
12686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012687char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012688int
12689main ()
12690{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012691return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 ;
12693 return 0;
12694}
12695_ACEOF
12696rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012697if { (ac_try="$ac_link"
12698case "(($ac_try" in
12699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12700 *) ac_try_echo=$ac_try;;
12701esac
12702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12703 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012705 grep -v '^ *+' conftest.er1 >conftest.err
12706 rm -f conftest.er1
12707 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012709 (exit $ac_status); } && {
12710 test -z "$ac_c_werror_flag" ||
12711 test ! -s conftest.err
12712 } && test -s conftest$ac_exeext &&
12713 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012715else
Martin v. Löwis11437992002-04-12 09:54:03 +000012716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012717sed 's/^/| /' conftest.$ac_ext >&5
12718
Martin v. Löwiseba40652007-08-30 20:10:57 +000012719 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012721
12722rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012724LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012726{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
12727echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012728if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000012729 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000012730fi
12731 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000012732
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000012733case "$ac_sys_system" in
12734BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012735{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
12736echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012737if test "${ac_cv_lib_net_socket+set}" = set; then
12738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000012739else
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000012741LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012743/* confdefs.h. */
12744_ACEOF
12745cat confdefs.h >>conftest.$ac_ext
12746cat >>conftest.$ac_ext <<_ACEOF
12747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012748
Martin v. Löwiseba40652007-08-30 20:10:57 +000012749/* Override any GCC internal prototype to avoid an error.
12750 Use char because int might match the return type of a GCC
12751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012752#ifdef __cplusplus
12753extern "C"
12754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012755char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012756int
12757main ()
12758{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012759return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 ;
12761 return 0;
12762}
12763_ACEOF
12764rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012765if { (ac_try="$ac_link"
12766case "(($ac_try" in
12767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12768 *) ac_try_echo=$ac_try;;
12769esac
12770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12771 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012773 grep -v '^ *+' conftest.er1 >conftest.err
12774 rm -f conftest.er1
12775 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012777 (exit $ac_status); } && {
12778 test -z "$ac_c_werror_flag" ||
12779 test ! -s conftest.err
12780 } && test -s conftest$ac_exeext &&
12781 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012782 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000012783else
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012785sed 's/^/| /' conftest.$ac_ext >&5
12786
Martin v. Löwiseba40652007-08-30 20:10:57 +000012787 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000012788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012789
12790rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012792LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000012793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
12795echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012796if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012797 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012798fi
12799 # BeOS
12800;;
12801esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000012802
Martin v. Löwiseba40652007-08-30 20:10:57 +000012803{ echo "$as_me:$LINENO: checking for --with-libs" >&5
12804echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012805
Martin v. Löwiseba40652007-08-30 20:10:57 +000012806# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000012807if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012808 withval=$with_libs;
12809{ echo "$as_me:$LINENO: result: $withval" >&5
12810echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000012811LIBS="$withval $LIBS"
12812
12813else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012814 { echo "$as_me:$LINENO: result: no" >&5
12815echo "${ECHO_T}no" >&6; }
12816fi
12817
Guido van Rossum7f43da71994-08-01 12:15:30 +000012818
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012819# Check for use of the system libffi library
Matthias Klose9afb9852007-10-24 20:00:44 +000012820if test "${ac_cv_header_ffi_h+set}" = set; then
12821 { echo "$as_me:$LINENO: checking for ffi.h" >&5
12822echo $ECHO_N "checking for ffi.h... $ECHO_C" >&6; }
12823if test "${ac_cv_header_ffi_h+set}" = set; then
12824 echo $ECHO_N "(cached) $ECHO_C" >&6
12825fi
12826{ echo "$as_me:$LINENO: result: $ac_cv_header_ffi_h" >&5
12827echo "${ECHO_T}$ac_cv_header_ffi_h" >&6; }
12828else
12829 # Is the header compilable?
12830{ echo "$as_me:$LINENO: checking ffi.h usability" >&5
12831echo $ECHO_N "checking ffi.h usability... $ECHO_C" >&6; }
12832cat >conftest.$ac_ext <<_ACEOF
12833/* confdefs.h. */
12834_ACEOF
12835cat confdefs.h >>conftest.$ac_ext
12836cat >>conftest.$ac_ext <<_ACEOF
12837/* end confdefs.h. */
12838$ac_includes_default
12839#include <ffi.h>
12840_ACEOF
12841rm -f conftest.$ac_objext
12842if { (ac_try="$ac_compile"
12843case "(($ac_try" in
12844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12845 *) ac_try_echo=$ac_try;;
12846esac
12847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12848 (eval "$ac_compile") 2>conftest.er1
12849 ac_status=$?
12850 grep -v '^ *+' conftest.er1 >conftest.err
12851 rm -f conftest.er1
12852 cat conftest.err >&5
12853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12854 (exit $ac_status); } && {
12855 test -z "$ac_c_werror_flag" ||
12856 test ! -s conftest.err
12857 } && test -s conftest.$ac_objext; then
12858 ac_header_compiler=yes
12859else
12860 echo "$as_me: failed program was:" >&5
12861sed 's/^/| /' conftest.$ac_ext >&5
12862
12863 ac_header_compiler=no
12864fi
12865
12866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12867{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12868echo "${ECHO_T}$ac_header_compiler" >&6; }
12869
12870# Is the header present?
12871{ echo "$as_me:$LINENO: checking ffi.h presence" >&5
12872echo $ECHO_N "checking ffi.h presence... $ECHO_C" >&6; }
12873cat >conftest.$ac_ext <<_ACEOF
12874/* confdefs.h. */
12875_ACEOF
12876cat confdefs.h >>conftest.$ac_ext
12877cat >>conftest.$ac_ext <<_ACEOF
12878/* end confdefs.h. */
12879#include <ffi.h>
12880_ACEOF
12881if { (ac_try="$ac_cpp conftest.$ac_ext"
12882case "(($ac_try" in
12883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12884 *) ac_try_echo=$ac_try;;
12885esac
12886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12887 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12888 ac_status=$?
12889 grep -v '^ *+' conftest.er1 >conftest.err
12890 rm -f conftest.er1
12891 cat conftest.err >&5
12892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12893 (exit $ac_status); } >/dev/null && {
12894 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12895 test ! -s conftest.err
12896 }; then
12897 ac_header_preproc=yes
12898else
12899 echo "$as_me: failed program was:" >&5
12900sed 's/^/| /' conftest.$ac_ext >&5
12901
12902 ac_header_preproc=no
12903fi
12904
12905rm -f conftest.err conftest.$ac_ext
12906{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12907echo "${ECHO_T}$ac_header_preproc" >&6; }
12908
12909# So? What about this header?
12910case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12911 yes:no: )
12912 { echo "$as_me:$LINENO: WARNING: ffi.h: accepted by the compiler, rejected by the preprocessor!" >&5
12913echo "$as_me: WARNING: ffi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12914 { echo "$as_me:$LINENO: WARNING: ffi.h: proceeding with the compiler's result" >&5
12915echo "$as_me: WARNING: ffi.h: proceeding with the compiler's result" >&2;}
12916 ac_header_preproc=yes
12917 ;;
12918 no:yes:* )
12919 { echo "$as_me:$LINENO: WARNING: ffi.h: present but cannot be compiled" >&5
12920echo "$as_me: WARNING: ffi.h: present but cannot be compiled" >&2;}
12921 { echo "$as_me:$LINENO: WARNING: ffi.h: check for missing prerequisite headers?" >&5
12922echo "$as_me: WARNING: ffi.h: check for missing prerequisite headers?" >&2;}
12923 { echo "$as_me:$LINENO: WARNING: ffi.h: see the Autoconf documentation" >&5
12924echo "$as_me: WARNING: ffi.h: see the Autoconf documentation" >&2;}
12925 { echo "$as_me:$LINENO: WARNING: ffi.h: section \"Present But Cannot Be Compiled\"" >&5
12926echo "$as_me: WARNING: ffi.h: section \"Present But Cannot Be Compiled\"" >&2;}
12927 { echo "$as_me:$LINENO: WARNING: ffi.h: proceeding with the preprocessor's result" >&5
12928echo "$as_me: WARNING: ffi.h: proceeding with the preprocessor's result" >&2;}
12929 { echo "$as_me:$LINENO: WARNING: ffi.h: in the future, the compiler will take precedence" >&5
12930echo "$as_me: WARNING: ffi.h: in the future, the compiler will take precedence" >&2;}
12931 ( cat <<\_ASBOX
12932## ------------------------------------------------ ##
12933## Report this to http://www.python.org/python-bugs ##
12934## ------------------------------------------------ ##
12935_ASBOX
12936 ) | sed "s/^/$as_me: WARNING: /" >&2
12937 ;;
12938esac
12939{ echo "$as_me:$LINENO: checking for ffi.h" >&5
12940echo $ECHO_N "checking for ffi.h... $ECHO_C" >&6; }
12941if test "${ac_cv_header_ffi_h+set}" = set; then
12942 echo $ECHO_N "(cached) $ECHO_C" >&6
12943else
12944 ac_cv_header_ffi_h=$ac_header_preproc
12945fi
12946{ echo "$as_me:$LINENO: result: $ac_cv_header_ffi_h" >&5
12947echo "${ECHO_T}$ac_cv_header_ffi_h" >&6; }
12948
12949fi
12950
12951
Martin v. Löwiseba40652007-08-30 20:10:57 +000012952{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
12953echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012954
Martin v. Löwiseba40652007-08-30 20:10:57 +000012955# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012956if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012957 withval=$with_system_ffi;
12958fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012959
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012960
Matthias Klose9afb9852007-10-24 20:00:44 +000012961if test -z "$with_system_ffi" && test "$ac_cv_header_ffi_h" = yes; then
12962 case "$ac_sys_system/`uname -m`" in
Thomas Heller486b1b02007-11-02 19:10:24 +000012963 Linux/alpha*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Matthias Klose6e183f82007-10-25 06:37:24 +000012964 Linux/arm*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Thomas Heller486b1b02007-11-02 19:10:24 +000012965 Linux/ppc*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
12966 Linux/s390*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Matthias Klose9afb9852007-10-24 20:00:44 +000012967 *) with_system_ffi="no"
12968 esac
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012970{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
12971echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012972
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012973# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012974
12975
Martin v. Löwiseba40652007-08-30 20:10:57 +000012976{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
12977echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012978
Martin v. Löwiseba40652007-08-30 20:10:57 +000012979# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012980if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012981 withval=$with_signal_module;
12982fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012983
12984
12985if test -z "$with_signal_module"
12986then with_signal_module="yes"
12987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012988{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
12989echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012990
12991if test "${with_signal_module}" = "yes"; then
12992 USE_SIGNAL_MODULE=""
12993 SIGNAL_OBJS=""
12994else
12995 USE_SIGNAL_MODULE="#"
12996 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
12997fi
12998
Guido van Rossum3d15bd82001-01-10 18:53:48 +000012999# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013000
Barry Warsawc0d24d82000-06-29 16:12:00 +000013001USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013002
Martin v. Löwiseba40652007-08-30 20:10:57 +000013003{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13004echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013005
Guido van Rossumec2f0731997-01-22 20:54:01 +000013006
Martin v. Löwiseba40652007-08-30 20:10:57 +000013007# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013008if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013009 withval=$with_dec_threads;
13010{ echo "$as_me:$LINENO: result: $withval" >&5
13011echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013012LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013013if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013014 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013015fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013016else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013017 { echo "$as_me:$LINENO: result: no" >&5
13018echo "${ECHO_T}no" >&6; }
13019fi
13020
Martin v. Löwis11437992002-04-12 09:54:03 +000013021
13022# Templates for things AC_DEFINEd more than once.
13023# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013024
13025
Martin v. Löwis11437992002-04-12 09:54:03 +000013026
13027
13028
13029
13030
Martin v. Löwiseba40652007-08-30 20:10:57 +000013031{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13032echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013033
Martin v. Löwiseba40652007-08-30 20:10:57 +000013034# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013035if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013036 withval=$with_threads;
13037fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013038
13039
Barry Warsawc0d24d82000-06-29 16:12:00 +000013040# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013041
Martin v. Löwiseba40652007-08-30 20:10:57 +000013042# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013043if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013044 withval=$with_thread; with_threads=$with_thread
13045fi
13046
Barry Warsawc0d24d82000-06-29 16:12:00 +000013047
13048if test -z "$with_threads"
13049then with_threads="yes"
13050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013051{ echo "$as_me:$LINENO: result: $with_threads" >&5
13052echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013053
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013054
Barry Warsawc0d24d82000-06-29 16:12:00 +000013055if test "$with_threads" = "no"
13056then
13057 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013058elif test "$ac_cv_pthread_is_default" = yes
13059then
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013061#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013062_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013063
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013064 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013066#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013067_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013068
13069 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013071elif test "$ac_cv_kpthread" = "yes"
13072then
13073 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013074 if test "$ac_cv_cxx_thread" = "yes"; then
13075 CXX="$CXX -Kpthread"
13076 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013077 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013078#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013079_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013080
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013081 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013082 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013083elif test "$ac_cv_kthread" = "yes"
13084then
13085 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013086 if test "$ac_cv_cxx_thread" = "yes"; then
13087 CXX="$CXX -Kthread"
13088 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013089 cat >>confdefs.h <<\_ACEOF
13090#define WITH_THREAD 1
13091_ACEOF
13092
13093 posix_threads=yes
13094 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013095elif test "$ac_cv_pthread" = "yes"
13096then
13097 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013098 if test "$ac_cv_cxx_thread" = "yes"; then
13099 CXX="$CXX -pthread"
13100 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013101 cat >>confdefs.h <<\_ACEOF
13102#define WITH_THREAD 1
13103_ACEOF
13104
13105 posix_threads=yes
13106 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013107else
13108 if test ! -z "$with_threads" -a -d "$with_threads"
13109 then LDFLAGS="$LDFLAGS -L$with_threads"
13110 fi
13111 if test ! -z "$withval" -a -d "$withval"
13112 then LDFLAGS="$LDFLAGS -L$withval"
13113 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013114
13115 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013116 # define _POSIX_THREADS in unistd.h. Some apparently don't
13117 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013118 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13119echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013121/* confdefs.h. */
13122_ACEOF
13123cat confdefs.h >>conftest.$ac_ext
13124cat >>conftest.$ac_ext <<_ACEOF
13125/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013126
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013127#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013128#ifdef _POSIX_THREADS
13129yes
13130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013131
13132_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013133if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013134 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013135 unistd_defines_pthreads=yes
13136else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013137 unistd_defines_pthreads=no
13138fi
13139rm -f conftest*
13140
Martin v. Löwiseba40652007-08-30 20:10:57 +000013141 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13142echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013143
Martin v. Löwis11437992002-04-12 09:54:03 +000013144 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013145#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013146_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013147
Martin v. Löwis11437992002-04-12 09:54:03 +000013148 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013149 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13150echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013151if test "${ac_cv_header_cthreads_h+set}" = set; then
13152 echo $ECHO_N "(cached) $ECHO_C" >&6
13153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013154{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13155echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013156else
Martin v. Löwis11437992002-04-12 09:54:03 +000013157 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013158{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13159echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013160cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013161/* confdefs.h. */
13162_ACEOF
13163cat confdefs.h >>conftest.$ac_ext
13164cat >>conftest.$ac_ext <<_ACEOF
13165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013166$ac_includes_default
13167#include <cthreads.h>
13168_ACEOF
13169rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013170if { (ac_try="$ac_compile"
13171case "(($ac_try" in
13172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13173 *) ac_try_echo=$ac_try;;
13174esac
13175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013178 grep -v '^ *+' conftest.er1 >conftest.err
13179 rm -f conftest.er1
13180 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013182 (exit $ac_status); } && {
13183 test -z "$ac_c_werror_flag" ||
13184 test ! -s conftest.err
13185 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013186 ac_header_compiler=yes
13187else
13188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013189sed 's/^/| /' conftest.$ac_ext >&5
13190
Martin v. Löwiseba40652007-08-30 20:10:57 +000013191 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013193
13194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13195{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13196echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013197
13198# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013199{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13200echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013201cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013202/* confdefs.h. */
13203_ACEOF
13204cat confdefs.h >>conftest.$ac_ext
13205cat >>conftest.$ac_ext <<_ACEOF
13206/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013207#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013208_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013209if { (ac_try="$ac_cpp conftest.$ac_ext"
13210case "(($ac_try" in
13211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13212 *) ac_try_echo=$ac_try;;
13213esac
13214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13215 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013216 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013217 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013218 rm -f conftest.er1
13219 cat conftest.err >&5
13220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013221 (exit $ac_status); } >/dev/null && {
13222 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13223 test ! -s conftest.err
13224 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013225 ac_header_preproc=yes
13226else
13227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013228sed 's/^/| /' conftest.$ac_ext >&5
13229
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013234{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13235echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013236
13237# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013238case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13239 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13241echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013242 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13243echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13244 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013245 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013246 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013247 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13248echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013249 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13250echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13251 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13252echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13253 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13254echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013255 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13256echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013257 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13258echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013259 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013260## ------------------------------------------------ ##
13261## Report this to http://www.python.org/python-bugs ##
13262## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013263_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013264 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013265 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013266esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013267{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13268echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013269if test "${ac_cv_header_cthreads_h+set}" = set; then
13270 echo $ECHO_N "(cached) $ECHO_C" >&6
13271else
13272 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013274{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13275echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013276
13277fi
13278if test $ac_cv_header_cthreads_h = yes; then
13279 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013280#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013281_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013282
Martin v. Löwis11437992002-04-12 09:54:03 +000013283 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013284#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013285_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013286
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
13288cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013289#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013290_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013291
13292 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013293 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013294else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013295
Martin v. Löwis11437992002-04-12 09:54:03 +000013296 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013297 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13298echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013299if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13300 echo $ECHO_N "(cached) $ECHO_C" >&6
13301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013302{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13303echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013304else
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013306{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13307echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013308cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013309/* confdefs.h. */
13310_ACEOF
13311cat confdefs.h >>conftest.$ac_ext
13312cat >>conftest.$ac_ext <<_ACEOF
13313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013314$ac_includes_default
13315#include <mach/cthreads.h>
13316_ACEOF
13317rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013318if { (ac_try="$ac_compile"
13319case "(($ac_try" in
13320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13321 *) ac_try_echo=$ac_try;;
13322esac
13323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013326 grep -v '^ *+' conftest.er1 >conftest.err
13327 rm -f conftest.er1
13328 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013330 (exit $ac_status); } && {
13331 test -z "$ac_c_werror_flag" ||
13332 test ! -s conftest.err
13333 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 ac_header_compiler=yes
13335else
13336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013337sed 's/^/| /' conftest.$ac_ext >&5
13338
Martin v. Löwiseba40652007-08-30 20:10:57 +000013339 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013341
13342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13343{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13344echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013345
13346# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013347{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13348echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013350/* confdefs.h. */
13351_ACEOF
13352cat confdefs.h >>conftest.$ac_ext
13353cat >>conftest.$ac_ext <<_ACEOF
13354/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013355#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013356_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013357if { (ac_try="$ac_cpp conftest.$ac_ext"
13358case "(($ac_try" in
13359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13360 *) ac_try_echo=$ac_try;;
13361esac
13362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13363 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013364 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013365 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 rm -f conftest.er1
13367 cat conftest.err >&5
13368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013369 (exit $ac_status); } >/dev/null && {
13370 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13371 test ! -s conftest.err
13372 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 ac_header_preproc=yes
13374else
13375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013376sed 's/^/| /' conftest.$ac_ext >&5
13377
Martin v. Löwis11437992002-04-12 09:54:03 +000013378 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013380
Martin v. Löwis11437992002-04-12 09:54:03 +000013381rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013382{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13383echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
13385# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013386case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13387 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13389echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013390 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13391echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13392 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013393 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013394 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013395 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13396echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013397 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13398echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13399 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13400echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13401 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13402echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013403 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13404echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013405 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13406echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013407 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013408## ------------------------------------------------ ##
13409## Report this to http://www.python.org/python-bugs ##
13410## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013411_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013412 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013413 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013414esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013415{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13416echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013417if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13418 echo $ECHO_N "(cached) $ECHO_C" >&6
13419else
13420 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013422{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13423echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013424
13425fi
13426if test $ac_cv_header_mach_cthreads_h = yes; then
13427 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013428#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013429_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013430
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013432#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013433_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013434
Martin v. Löwis11437992002-04-12 09:54:03 +000013435
13436cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013437#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013438_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013439
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013440 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013441else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013442
Martin v. Löwiseba40652007-08-30 20:10:57 +000013443 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13444echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013445
Martin v. Löwiseba40652007-08-30 20:10:57 +000013446# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013447if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013448 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13449echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013450 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013451#define WITH_THREAD 1
13452_ACEOF
13453
13454
13455cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013456#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013457_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013458
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013459 LIBS="-lpth $LIBS"
13460 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013461else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013462 { echo "$as_me:$LINENO: result: no" >&5
13463echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013464
13465 # Just looking for pthread_create in libpthread is not enough:
13466 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13467 # So we really have to include pthread.h, and then link.
13468 _libs=$LIBS
13469 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013470 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13471echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013473/* confdefs.h. */
13474_ACEOF
13475cat confdefs.h >>conftest.$ac_ext
13476cat >>conftest.$ac_ext <<_ACEOF
13477/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013478#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013479
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013480void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013481int
13482main ()
13483{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013484
13485pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013486 ;
13487 return 0;
13488}
13489_ACEOF
13490rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013491if { (ac_try="$ac_link"
13492case "(($ac_try" in
13493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13494 *) ac_try_echo=$ac_try;;
13495esac
13496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13497 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013499 grep -v '^ *+' conftest.er1 >conftest.err
13500 rm -f conftest.er1
13501 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013503 (exit $ac_status); } && {
13504 test -z "$ac_c_werror_flag" ||
13505 test ! -s conftest.err
13506 } && test -s conftest$ac_exeext &&
13507 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013508
Martin v. Löwiseba40652007-08-30 20:10:57 +000013509 { echo "$as_me:$LINENO: result: yes" >&5
13510echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013511 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013512#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013513_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013514
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013515 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013516 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013517else
Martin v. Löwis11437992002-04-12 09:54:03 +000013518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013519sed 's/^/| /' conftest.$ac_ext >&5
13520
Martin v. Löwis11437992002-04-12 09:54:03 +000013521
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013522 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013523 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13524echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013525if test "${ac_cv_func_pthread_detach+set}" = set; then
13526 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013527else
Martin v. Löwis11437992002-04-12 09:54:03 +000013528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013529/* confdefs.h. */
13530_ACEOF
13531cat confdefs.h >>conftest.$ac_ext
13532cat >>conftest.$ac_ext <<_ACEOF
13533/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013534/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13535 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13536#define pthread_detach innocuous_pthread_detach
13537
Guido van Rossumad678af1998-10-02 14:42:15 +000013538/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013539 which can conflict with char pthread_detach (); below.
13540 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013541 <limits.h> exists even on freestanding compilers. */
13542
13543#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013544# include <limits.h>
13545#else
13546# include <assert.h>
13547#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013548
13549#undef pthread_detach
13550
Martin v. Löwiseba40652007-08-30 20:10:57 +000013551/* Override any GCC internal prototype to avoid an error.
13552 Use char because int might match the return type of a GCC
13553 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013554#ifdef __cplusplus
13555extern "C"
13556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013557char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013558/* The GNU C library defines this for functions which it implements
13559 to always fail with ENOSYS. Some functions are actually named
13560 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013561#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013562choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013563#endif
13564
Skip Montanaro6dead952003-09-25 14:50:04 +000013565int
13566main ()
13567{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013568return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013569 ;
13570 return 0;
13571}
13572_ACEOF
13573rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013574if { (ac_try="$ac_link"
13575case "(($ac_try" in
13576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13577 *) ac_try_echo=$ac_try;;
13578esac
13579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13580 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013582 grep -v '^ *+' conftest.er1 >conftest.err
13583 rm -f conftest.er1
13584 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013586 (exit $ac_status); } && {
13587 test -z "$ac_c_werror_flag" ||
13588 test ! -s conftest.err
13589 } && test -s conftest$ac_exeext &&
13590 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013591 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013592else
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013594sed 's/^/| /' conftest.$ac_ext >&5
13595
Martin v. Löwiseba40652007-08-30 20:10:57 +000013596 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013598
13599rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013600 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013602{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13603echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013604if test $ac_cv_func_pthread_detach = yes; then
13605 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013606#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013607_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013608
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013609 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013610 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013611else
Guido van Rossumad678af1998-10-02 14:42:15 +000013612
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013613 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013614 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13615echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013616if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13617 echo $ECHO_N "(cached) $ECHO_C" >&6
13618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013619{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13620echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013621else
13622 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013623{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13624echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013626/* confdefs.h. */
13627_ACEOF
13628cat confdefs.h >>conftest.$ac_ext
13629cat >>conftest.$ac_ext <<_ACEOF
13630/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013631$ac_includes_default
13632#include <atheos/threads.h>
13633_ACEOF
13634rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013635if { (ac_try="$ac_compile"
13636case "(($ac_try" in
13637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13638 *) ac_try_echo=$ac_try;;
13639esac
13640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013643 grep -v '^ *+' conftest.er1 >conftest.err
13644 rm -f conftest.er1
13645 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013647 (exit $ac_status); } && {
13648 test -z "$ac_c_werror_flag" ||
13649 test ! -s conftest.err
13650 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013651 ac_header_compiler=yes
13652else
13653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013654sed 's/^/| /' conftest.$ac_ext >&5
13655
Martin v. Löwiseba40652007-08-30 20:10:57 +000013656 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013658
13659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13660{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13661echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013662
13663# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013664{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13665echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013666cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013667/* confdefs.h. */
13668_ACEOF
13669cat confdefs.h >>conftest.$ac_ext
13670cat >>conftest.$ac_ext <<_ACEOF
13671/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013672#include <atheos/threads.h>
13673_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013674if { (ac_try="$ac_cpp conftest.$ac_ext"
13675case "(($ac_try" in
13676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13677 *) ac_try_echo=$ac_try;;
13678esac
13679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13680 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013681 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013682 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013683 rm -f conftest.er1
13684 cat conftest.err >&5
13685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013686 (exit $ac_status); } >/dev/null && {
13687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13688 test ! -s conftest.err
13689 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013690 ac_header_preproc=yes
13691else
13692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013693sed 's/^/| /' conftest.$ac_ext >&5
13694
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013695 ac_header_preproc=no
13696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013697
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013698rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013699{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13700echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013701
13702# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013703case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13704 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013705 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13706echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013707 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13708echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13709 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013710 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013711 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013712 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
13713echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013714 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
13715echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
13716 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
13717echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
13718 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
13719echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013720 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
13721echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013722 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
13723echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013724 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013725## ------------------------------------------------ ##
13726## Report this to http://www.python.org/python-bugs ##
13727## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013728_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013729 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013730 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013731esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013732{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13733echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013734if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13735 echo $ECHO_N "(cached) $ECHO_C" >&6
13736else
13737 ac_cv_header_atheos_threads_h=$ac_header_preproc
13738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013739{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13740echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013741
13742fi
13743if test $ac_cv_header_atheos_threads_h = yes; then
13744 cat >>confdefs.h <<\_ACEOF
13745#define WITH_THREAD 1
13746_ACEOF
13747
13748
13749cat >>confdefs.h <<\_ACEOF
13750#define ATHEOS_THREADS 1
13751_ACEOF
13752
13753 THREADOBJ="Python/thread.o"
13754else
13755
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013757 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
13758echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013759if test "${ac_cv_header_kernel_OS_h+set}" = set; then
13760 echo $ECHO_N "(cached) $ECHO_C" >&6
13761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013762{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
13763echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013764else
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013766{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
13767echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013768cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013769/* confdefs.h. */
13770_ACEOF
13771cat confdefs.h >>conftest.$ac_ext
13772cat >>conftest.$ac_ext <<_ACEOF
13773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013774$ac_includes_default
13775#include <kernel/OS.h>
13776_ACEOF
13777rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013778if { (ac_try="$ac_compile"
13779case "(($ac_try" in
13780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13781 *) ac_try_echo=$ac_try;;
13782esac
13783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13784 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013786 grep -v '^ *+' conftest.er1 >conftest.err
13787 rm -f conftest.er1
13788 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013790 (exit $ac_status); } && {
13791 test -z "$ac_c_werror_flag" ||
13792 test ! -s conftest.err
13793 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 ac_header_compiler=yes
13795else
13796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013797sed 's/^/| /' conftest.$ac_ext >&5
13798
Martin v. Löwiseba40652007-08-30 20:10:57 +000013799 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013801
13802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13803{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13804echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013805
13806# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013807{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
13808echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013809cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013810/* confdefs.h. */
13811_ACEOF
13812cat confdefs.h >>conftest.$ac_ext
13813cat >>conftest.$ac_ext <<_ACEOF
13814/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013815#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013816_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013817if { (ac_try="$ac_cpp conftest.$ac_ext"
13818case "(($ac_try" in
13819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13820 *) ac_try_echo=$ac_try;;
13821esac
13822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13823 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013825 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 rm -f conftest.er1
13827 cat conftest.err >&5
13828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013829 (exit $ac_status); } >/dev/null && {
13830 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13831 test ! -s conftest.err
13832 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 ac_header_preproc=yes
13834else
13835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013836sed 's/^/| /' conftest.$ac_ext >&5
13837
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013840
Martin v. Löwis11437992002-04-12 09:54:03 +000013841rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013842{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13843echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013844
Martin v. Löwis11437992002-04-12 09:54:03 +000013845# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013846case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13847 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013848 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
13849echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013850 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
13851echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
13852 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013853 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013854 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013855 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
13856echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013857 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
13858echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
13859 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
13860echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
13861 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
13862echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013863 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
13864echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013865 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
13866echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013867 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013868## ------------------------------------------------ ##
13869## Report this to http://www.python.org/python-bugs ##
13870## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013871_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013872 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013873 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013874esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013875{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
13876echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013877if test "${ac_cv_header_kernel_OS_h+set}" = set; then
13878 echo $ECHO_N "(cached) $ECHO_C" >&6
13879else
13880 ac_cv_header_kernel_OS_h=$ac_header_preproc
13881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013882{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
13883echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013884
13885fi
13886if test $ac_cv_header_kernel_OS_h = yes; then
13887 cat >>confdefs.h <<\_ACEOF
13888#define WITH_THREAD 1
13889_ACEOF
13890
13891
13892cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013893#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013894_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013895
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013896 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013897else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013898
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
13900echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013901if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
13902 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013903else
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013905LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013906cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013907/* confdefs.h. */
13908_ACEOF
13909cat confdefs.h >>conftest.$ac_ext
13910cat >>conftest.$ac_ext <<_ACEOF
13911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013912
Martin v. Löwiseba40652007-08-30 20:10:57 +000013913/* Override any GCC internal prototype to avoid an error.
13914 Use char because int might match the return type of a GCC
13915 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013916#ifdef __cplusplus
13917extern "C"
13918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013919char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013920int
13921main ()
13922{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013923return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013924 ;
13925 return 0;
13926}
13927_ACEOF
13928rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013929if { (ac_try="$ac_link"
13930case "(($ac_try" in
13931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13932 *) ac_try_echo=$ac_try;;
13933esac
13934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13935 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013937 grep -v '^ *+' conftest.er1 >conftest.err
13938 rm -f conftest.er1
13939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013941 (exit $ac_status); } && {
13942 test -z "$ac_c_werror_flag" ||
13943 test ! -s conftest.err
13944 } && test -s conftest$ac_exeext &&
13945 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013946 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000013947else
Martin v. Löwis11437992002-04-12 09:54:03 +000013948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013949sed 's/^/| /' conftest.$ac_ext >&5
13950
Martin v. Löwiseba40652007-08-30 20:10:57 +000013951 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000013952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013953
13954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013956LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013958{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
13959echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013960if test $ac_cv_lib_pthreads_pthread_create = yes; then
13961 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013962#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013963_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013964
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013965 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013966 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013967 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000013968else
Greg Steinadf63d62000-07-05 10:38:09 +000013969
Martin v. Löwiseba40652007-08-30 20:10:57 +000013970 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
13971echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013972if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
13973 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000013974else
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013976LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013977cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013978/* confdefs.h. */
13979_ACEOF
13980cat confdefs.h >>conftest.$ac_ext
13981cat >>conftest.$ac_ext <<_ACEOF
13982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013983
Martin v. Löwiseba40652007-08-30 20:10:57 +000013984/* Override any GCC internal prototype to avoid an error.
13985 Use char because int might match the return type of a GCC
13986 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013987#ifdef __cplusplus
13988extern "C"
13989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013990char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013991int
13992main ()
13993{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013994return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 ;
13996 return 0;
13997}
13998_ACEOF
13999rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014000if { (ac_try="$ac_link"
14001case "(($ac_try" in
14002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14003 *) ac_try_echo=$ac_try;;
14004esac
14005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14006 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014008 grep -v '^ *+' conftest.er1 >conftest.err
14009 rm -f conftest.er1
14010 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014012 (exit $ac_status); } && {
14013 test -z "$ac_c_werror_flag" ||
14014 test ! -s conftest.err
14015 } && test -s conftest$ac_exeext &&
14016 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014017 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014018else
Martin v. Löwis11437992002-04-12 09:54:03 +000014019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014020sed 's/^/| /' conftest.$ac_ext >&5
14021
Martin v. Löwiseba40652007-08-30 20:10:57 +000014022 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014024
14025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014026 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014027LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014029{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14030echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014031if test $ac_cv_lib_c_r_pthread_create = yes; then
14032 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014033#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014034_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014035
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014036 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014037 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014038 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014039else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014040
Martin v. Löwiseba40652007-08-30 20:10:57 +000014041 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14042echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014043if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14044 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014045else
Martin v. Löwis11437992002-04-12 09:54:03 +000014046 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014047LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014048cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014049/* confdefs.h. */
14050_ACEOF
14051cat confdefs.h >>conftest.$ac_ext
14052cat >>conftest.$ac_ext <<_ACEOF
14053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014054
Martin v. Löwiseba40652007-08-30 20:10:57 +000014055/* Override any GCC internal prototype to avoid an error.
14056 Use char because int might match the return type of a GCC
14057 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014058#ifdef __cplusplus
14059extern "C"
14060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014061char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014062int
14063main ()
14064{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014065return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 ;
14067 return 0;
14068}
14069_ACEOF
14070rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014071if { (ac_try="$ac_link"
14072case "(($ac_try" in
14073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14074 *) ac_try_echo=$ac_try;;
14075esac
14076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14077 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014079 grep -v '^ *+' conftest.er1 >conftest.err
14080 rm -f conftest.er1
14081 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014083 (exit $ac_status); } && {
14084 test -z "$ac_c_werror_flag" ||
14085 test ! -s conftest.err
14086 } && test -s conftest$ac_exeext &&
14087 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014088 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014089else
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014091sed 's/^/| /' conftest.$ac_ext >&5
14092
Martin v. Löwiseba40652007-08-30 20:10:57 +000014093 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014095
14096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014097 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014098LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014100{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14101echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014102if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14103 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014104#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014105_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014106
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014107 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014108 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014109 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014110else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014111
Martin v. Löwiseba40652007-08-30 20:10:57 +000014112 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14113echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014114if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14115 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014116else
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014118LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014119cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014120/* confdefs.h. */
14121_ACEOF
14122cat confdefs.h >>conftest.$ac_ext
14123cat >>conftest.$ac_ext <<_ACEOF
14124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014125
Martin v. Löwiseba40652007-08-30 20:10:57 +000014126/* Override any GCC internal prototype to avoid an error.
14127 Use char because int might match the return type of a GCC
14128 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014129#ifdef __cplusplus
14130extern "C"
14131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014132char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014133int
14134main ()
14135{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014136return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 ;
14138 return 0;
14139}
14140_ACEOF
14141rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014142if { (ac_try="$ac_link"
14143case "(($ac_try" in
14144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14145 *) ac_try_echo=$ac_try;;
14146esac
14147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14148 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014150 grep -v '^ *+' conftest.er1 >conftest.err
14151 rm -f conftest.er1
14152 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014154 (exit $ac_status); } && {
14155 test -z "$ac_c_werror_flag" ||
14156 test ! -s conftest.err
14157 } && test -s conftest$ac_exeext &&
14158 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014160else
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014162sed 's/^/| /' conftest.$ac_ext >&5
14163
Martin v. Löwiseba40652007-08-30 20:10:57 +000014164 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014166
14167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014168 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014169LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014171{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14172echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014173if test $ac_cv_lib_cma_pthread_create = yes; then
14174 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014175#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014176_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014177
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014178 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014179 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014180 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014181else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014182
Martin v. Löwis130fb172001-07-19 11:00:41 +000014183 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014184fi
14185
Guido van Rossum627b2d71993-12-24 10:39:16 +000014186
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014187fi
14188
Guido van Rossum0be3e491997-05-22 20:33:33 +000014189fi
14190
Guido van Rossum49545951997-12-02 19:28:29 +000014191fi
14192
Guido van Rossumb93a8621998-05-07 13:27:32 +000014193fi
14194
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014195
Michael W. Hudson54241132001-12-07 15:38:26 +000014196fi
14197
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014198
14199fi
14200
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014202
14203rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014204 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014205fi
14206
Martin v. Löwis11437992002-04-12 09:54:03 +000014207fi
14208
14209
14210fi
14211
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014212
Michael W. Hudson54241132001-12-07 15:38:26 +000014213
Martin v. Löwiseba40652007-08-30 20:10:57 +000014214 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14215echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014216if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014218else
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014220LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014221cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014222/* confdefs.h. */
14223_ACEOF
14224cat confdefs.h >>conftest.$ac_ext
14225cat >>conftest.$ac_ext <<_ACEOF
14226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014227
Martin v. Löwiseba40652007-08-30 20:10:57 +000014228/* Override any GCC internal prototype to avoid an error.
14229 Use char because int might match the return type of a GCC
14230 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014231#ifdef __cplusplus
14232extern "C"
14233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014234char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014235int
14236main ()
14237{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014238return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014239 ;
14240 return 0;
14241}
14242_ACEOF
14243rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014244if { (ac_try="$ac_link"
14245case "(($ac_try" in
14246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14247 *) ac_try_echo=$ac_try;;
14248esac
14249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14250 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014252 grep -v '^ *+' conftest.er1 >conftest.err
14253 rm -f conftest.er1
14254 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014256 (exit $ac_status); } && {
14257 test -z "$ac_c_werror_flag" ||
14258 test ! -s conftest.err
14259 } && test -s conftest$ac_exeext &&
14260 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014261 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014262else
Martin v. Löwis11437992002-04-12 09:54:03 +000014263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014264sed 's/^/| /' conftest.$ac_ext >&5
14265
Martin v. Löwiseba40652007-08-30 20:10:57 +000014266 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014268
14269rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014271LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014273{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14274echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014275if test $ac_cv_lib_mpc_usconfig = yes; then
14276 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014277#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014278_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014279
Martin v. Löwis130fb172001-07-19 11:00:41 +000014280 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014281 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014282 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014283fi
14284
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014285
Neal Norwitza978ab02002-11-02 16:58:05 +000014286 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014287 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14288echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014289if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14290 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014291else
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014293LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014294cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014295/* confdefs.h. */
14296_ACEOF
14297cat confdefs.h >>conftest.$ac_ext
14298cat >>conftest.$ac_ext <<_ACEOF
14299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
Martin v. Löwiseba40652007-08-30 20:10:57 +000014301/* Override any GCC internal prototype to avoid an error.
14302 Use char because int might match the return type of a GCC
14303 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014304#ifdef __cplusplus
14305extern "C"
14306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014307char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014308int
14309main ()
14310{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014311return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014312 ;
14313 return 0;
14314}
14315_ACEOF
14316rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014317if { (ac_try="$ac_link"
14318case "(($ac_try" in
14319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14320 *) ac_try_echo=$ac_try;;
14321esac
14322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14323 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014325 grep -v '^ *+' conftest.er1 >conftest.err
14326 rm -f conftest.er1
14327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329 (exit $ac_status); } && {
14330 test -z "$ac_c_werror_flag" ||
14331 test ! -s conftest.err
14332 } && test -s conftest$ac_exeext &&
14333 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014335else
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014337sed 's/^/| /' conftest.$ac_ext >&5
14338
Martin v. Löwiseba40652007-08-30 20:10:57 +000014339 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014341
14342rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014343 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014344LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014346{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14347echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014348if test $ac_cv_lib_thread_thr_create = yes; then
14349 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014350#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014351_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014352
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014353 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014354 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014355 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014356fi
14357
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014358 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014359
Martin v. Löwis130fb172001-07-19 11:00:41 +000014360 if test "$USE_THREAD_MODULE" != "#"
14361 then
14362 # If the above checks didn't disable threads, (at least) OSF1
14363 # needs this '-threads' argument during linking.
14364 case $ac_sys_system in
14365 OSF1) LDLAST=-threads;;
14366 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014367 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014368fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014369
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014370if test "$posix_threads" = "yes"; then
14371 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014372
14373cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014374#define _POSIX_THREADS 1
14375_ACEOF
14376
14377 fi
14378
14379 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14380 case $ac_sys_system/$ac_sys_release in
14381 SunOS/5.6)
14382cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014383#define HAVE_PTHREAD_DESTRUCTOR 1
14384_ACEOF
14385
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014386 ;;
14387 SunOS/5.8)
14388cat >>confdefs.h <<\_ACEOF
14389#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14390_ACEOF
14391
14392 ;;
14393 esac
14394
Martin v. Löwiseba40652007-08-30 20:10:57 +000014395 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14396echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014397 if test "${ac_cv_pthread_system_supported+set}" = set; then
14398 echo $ECHO_N "(cached) $ECHO_C" >&6
14399else
14400 if test "$cross_compiling" = yes; then
14401 ac_cv_pthread_system_supported=no
14402else
14403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014404/* confdefs.h. */
14405_ACEOF
14406cat confdefs.h >>conftest.$ac_ext
14407cat >>conftest.$ac_ext <<_ACEOF
14408/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014409#include <pthread.h>
14410 void *foo(void *parm) {
14411 return NULL;
14412 }
14413 main() {
14414 pthread_attr_t attr;
14415 pthread_t id;
14416 if (pthread_attr_init(&attr)) exit(-1);
14417 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14418 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14419 exit(0);
14420 }
14421_ACEOF
14422rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014423if { (ac_try="$ac_link"
14424case "(($ac_try" in
14425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14426 *) ac_try_echo=$ac_try;;
14427esac
14428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14429 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014430 ac_status=$?
14431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14432 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014433 { (case "(($ac_try" in
14434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14435 *) ac_try_echo=$ac_try;;
14436esac
14437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14438 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014439 ac_status=$?
14440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14441 (exit $ac_status); }; }; then
14442 ac_cv_pthread_system_supported=yes
14443else
14444 echo "$as_me: program exited with status $ac_status" >&5
14445echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014446sed 's/^/| /' conftest.$ac_ext >&5
14447
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014448( exit $ac_status )
14449ac_cv_pthread_system_supported=no
14450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014451rm -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 +000014452fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014453
Martin v. Löwiseba40652007-08-30 20:10:57 +000014454
14455
Guido van Rossum627b2d71993-12-24 10:39:16 +000014456fi
14457
Martin v. Löwiseba40652007-08-30 20:10:57 +000014458 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14459echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014460 if test "$ac_cv_pthread_system_supported" = "yes"; then
14461
14462cat >>confdefs.h <<\_ACEOF
14463#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14464_ACEOF
14465
14466 fi
14467
14468for ac_func in pthread_sigmask
14469do
14470as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14472echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14473if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014474 echo $ECHO_N "(cached) $ECHO_C" >&6
14475else
14476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014477/* confdefs.h. */
14478_ACEOF
14479cat confdefs.h >>conftest.$ac_ext
14480cat >>conftest.$ac_ext <<_ACEOF
14481/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014482/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14483 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14484#define $ac_func innocuous_$ac_func
14485
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014486/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014487 which can conflict with char $ac_func (); below.
14488 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014489 <limits.h> exists even on freestanding compilers. */
14490
14491#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014492# include <limits.h>
14493#else
14494# include <assert.h>
14495#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014496
14497#undef $ac_func
14498
Martin v. Löwiseba40652007-08-30 20:10:57 +000014499/* Override any GCC internal prototype to avoid an error.
14500 Use char because int might match the return type of a GCC
14501 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014502#ifdef __cplusplus
14503extern "C"
14504#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014505char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014506/* The GNU C library defines this for functions which it implements
14507 to always fail with ENOSYS. Some functions are actually named
14508 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014509#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014510choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014511#endif
14512
Skip Montanaro6dead952003-09-25 14:50:04 +000014513int
14514main ()
14515{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014516return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014517 ;
14518 return 0;
14519}
14520_ACEOF
14521rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014522if { (ac_try="$ac_link"
14523case "(($ac_try" in
14524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14525 *) ac_try_echo=$ac_try;;
14526esac
14527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014530 grep -v '^ *+' conftest.er1 >conftest.err
14531 rm -f conftest.er1
14532 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014534 (exit $ac_status); } && {
14535 test -z "$ac_c_werror_flag" ||
14536 test ! -s conftest.err
14537 } && test -s conftest$ac_exeext &&
14538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014539 eval "$as_ac_var=yes"
14540else
14541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014542sed 's/^/| /' conftest.$ac_ext >&5
14543
Martin v. Löwiseba40652007-08-30 20:10:57 +000014544 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014546
14547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014550ac_res=`eval echo '${'$as_ac_var'}'`
14551 { echo "$as_me:$LINENO: result: $ac_res" >&5
14552echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014553if test `eval echo '${'$as_ac_var'}'` = yes; then
14554 cat >>confdefs.h <<_ACEOF
14555#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14556_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014557 case $ac_sys_system in
14558 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014559
Jason Tishlerfac083d2003-07-22 15:20:49 +000014560cat >>confdefs.h <<\_ACEOF
14561#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14562_ACEOF
14563
14564 ;;
14565 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014566fi
14567done
14568
14569fi
14570
14571
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014572# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014573
14574
Martin v. Löwiseba40652007-08-30 20:10:57 +000014575{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14576echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14577# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014578if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014579 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014580 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014581 { echo "$as_me:$LINENO: result: no" >&5
14582echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014583 ipv6=no
14584 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014585 *) { echo "$as_me:$LINENO: result: yes" >&5
14586echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014587 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014588#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014589_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014590
14591 ipv6=yes
14592 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014593 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014594else
Martin v. Löwis11437992002-04-12 09:54:03 +000014595
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014596 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597 { echo "$as_me:$LINENO: result: no" >&5
14598echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014599 ipv6=no
14600
14601else
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014603/* confdefs.h. */
14604_ACEOF
14605cat confdefs.h >>conftest.$ac_ext
14606cat >>conftest.$ac_ext <<_ACEOF
14607/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014608 /* AF_INET6 available check */
14609#include <sys/types.h>
14610#include <sys/socket.h>
14611main()
14612{
14613 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14614 exit(1);
14615 else
14616 exit(0);
14617}
14618
Martin v. Löwis11437992002-04-12 09:54:03 +000014619_ACEOF
14620rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014621if { (ac_try="$ac_link"
14622case "(($ac_try" in
14623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14624 *) ac_try_echo=$ac_try;;
14625esac
14626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14627 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014628 ac_status=$?
14629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14630 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014631 { (case "(($ac_try" in
14632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14633 *) ac_try_echo=$ac_try;;
14634esac
14635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14636 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 ac_status=$?
14638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14639 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014640 { echo "$as_me:$LINENO: result: yes" >&5
14641echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014642 ipv6=yes
14643else
Martin v. Löwis11437992002-04-12 09:54:03 +000014644 echo "$as_me: program exited with status $ac_status" >&5
14645echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014646sed 's/^/| /' conftest.$ac_ext >&5
14647
Martin v. Löwis11437992002-04-12 09:54:03 +000014648( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014649{ echo "$as_me:$LINENO: result: no" >&5
14650echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014651 ipv6=no
14652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014653rm -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 +000014654fi
14655
Martin v. Löwiseba40652007-08-30 20:10:57 +000014656
14657
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014658if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014659 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14660echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014662/* confdefs.h. */
14663_ACEOF
14664cat confdefs.h >>conftest.$ac_ext
14665cat >>conftest.$ac_ext <<_ACEOF
14666/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014667#include <sys/types.h>
14668#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014669int
14670main ()
14671{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014672struct sockaddr_in6 x;
14673x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 ;
14675 return 0;
14676}
14677_ACEOF
14678rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014679if { (ac_try="$ac_compile"
14680case "(($ac_try" in
14681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14682 *) ac_try_echo=$ac_try;;
14683esac
14684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014687 grep -v '^ *+' conftest.er1 >conftest.err
14688 rm -f conftest.er1
14689 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014691 (exit $ac_status); } && {
14692 test -z "$ac_c_werror_flag" ||
14693 test ! -s conftest.err
14694 } && test -s conftest.$ac_objext; then
14695 { echo "$as_me:$LINENO: result: yes" >&5
14696echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014697 ipv6=yes
14698else
Martin v. Löwis11437992002-04-12 09:54:03 +000014699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014700sed 's/^/| /' conftest.$ac_ext >&5
14701
Martin v. Löwiseba40652007-08-30 20:10:57 +000014702 { echo "$as_me:$LINENO: result: no" >&5
14703echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014704 ipv6=no
14705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014706
14707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014708fi
14709
14710if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014712#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014713_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014714
14715fi
14716
Martin v. Löwiseba40652007-08-30 20:10:57 +000014717fi
14718
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014719
14720ipv6type=unknown
14721ipv6lib=none
14722ipv6trylibc=no
14723
14724if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014725 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
14726echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000014727 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
14728 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014729 case $i in
14730 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000014731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014732/* confdefs.h. */
14733_ACEOF
14734cat confdefs.h >>conftest.$ac_ext
14735cat >>conftest.$ac_ext <<_ACEOF
14736/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014737
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014738#include <netinet/in.h>
14739#ifdef IPV6_INRIA_VERSION
14740yes
14741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014742_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014744 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014745 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014746fi
14747rm -f conftest*
14748
14749 ;;
14750 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000014751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014752/* confdefs.h. */
14753_ACEOF
14754cat confdefs.h >>conftest.$ac_ext
14755cat >>conftest.$ac_ext <<_ACEOF
14756/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014757
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014758#include <netinet/in.h>
14759#ifdef __KAME__
14760yes
14761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014762_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014763if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014764 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014765 ipv6type=$i;
14766 ipv6lib=inet6
14767 ipv6libdir=/usr/local/v6/lib
14768 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014769fi
14770rm -f conftest*
14771
14772 ;;
14773 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000014774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014775/* confdefs.h. */
14776_ACEOF
14777cat confdefs.h >>conftest.$ac_ext
14778cat >>conftest.$ac_ext <<_ACEOF
14779/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014781#include <features.h>
14782#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
14783yes
14784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014785_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014787 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014788 ipv6type=$i;
14789 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014790fi
14791rm -f conftest*
14792
14793 ;;
14794 linux-inet6)
14795 if test -d /usr/inet6; then
14796 ipv6type=$i
14797 ipv6lib=inet6
14798 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000014799 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014800 fi
14801 ;;
14802 solaris)
14803 if test -f /etc/netconfig; then
14804 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
14805 ipv6type=$i
14806 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014807 fi
14808 fi
14809 ;;
14810 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000014811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014812/* confdefs.h. */
14813_ACEOF
14814cat confdefs.h >>conftest.$ac_ext
14815cat >>conftest.$ac_ext <<_ACEOF
14816/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014818#include <sys/param.h>
14819#ifdef _TOSHIBA_INET6
14820yes
14821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014822_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014824 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014825 ipv6type=$i;
14826 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014827 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014828fi
14829rm -f conftest*
14830
14831 ;;
14832 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000014833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014834/* confdefs.h. */
14835_ACEOF
14836cat confdefs.h >>conftest.$ac_ext
14837cat >>conftest.$ac_ext <<_ACEOF
14838/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014839
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014840#include </usr/local/v6/include/sys/v6config.h>
14841#ifdef __V6D__
14842yes
14843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014844_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014846 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014847 ipv6type=$i;
14848 ipv6lib=v6;
14849 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000014850 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014851fi
14852rm -f conftest*
14853
14854 ;;
14855 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014857/* confdefs.h. */
14858_ACEOF
14859cat confdefs.h >>conftest.$ac_ext
14860cat >>conftest.$ac_ext <<_ACEOF
14861/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014862
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014863#include <sys/param.h>
14864#ifdef _ZETA_MINAMI_INET6
14865yes
14866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014867_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014868if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014869 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014870 ipv6type=$i;
14871 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014872 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014873fi
14874rm -f conftest*
14875
14876 ;;
14877 esac
14878 if test "$ipv6type" != "unknown"; then
14879 break
14880 fi
14881 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014882 { echo "$as_me:$LINENO: result: $ipv6type" >&5
14883echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014884fi
14885
14886if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
14887 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
14888 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
14889 echo "using lib$ipv6lib"
14890 else
14891 if test $ipv6trylibc = "yes"; then
14892 echo "using libc"
14893 else
14894 echo 'Fatal: no $ipv6lib library found. cannot continue.'
14895 echo "You need to fetch lib$ipv6lib.a from appropriate"
14896 echo 'ipv6 kit and compile beforehand.'
14897 exit 1
14898 fi
14899 fi
14900fi
14901
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014902# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000014903{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
14904echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014905
Martin v. Löwiseba40652007-08-30 20:10:57 +000014906# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014907if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014908 withval=$with_doc_strings;
14909fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014910
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014911
14912if test -z "$with_doc_strings"
14913then with_doc_strings="yes"
14914fi
14915if test "$with_doc_strings" != "no"
14916then
14917
14918cat >>confdefs.h <<\_ACEOF
14919#define WITH_DOC_STRINGS 1
14920_ACEOF
14921
14922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014923{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
14924echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014925
Neil Schemenauera35c6882001-02-27 04:45:05 +000014926# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000014927{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
14928echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014929
Martin v. Löwiseba40652007-08-30 20:10:57 +000014930# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014931if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014932 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014933if test "$withval" != no
14934then
14935
14936cat >>confdefs.h <<\_ACEOF
14937#define WITH_TSC 1
14938_ACEOF
14939
Martin v. Löwiseba40652007-08-30 20:10:57 +000014940 { echo "$as_me:$LINENO: result: yes" >&5
14941echo "${ECHO_T}yes" >&6; }
14942else { echo "$as_me:$LINENO: result: no" >&5
14943echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014944fi
14945else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014946 { echo "$as_me:$LINENO: result: no" >&5
14947echo "${ECHO_T}no" >&6; }
14948fi
14949
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014950
14951# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
14953echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014954
Martin v. Löwiseba40652007-08-30 20:10:57 +000014955# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000014956if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014957 withval=$with_pymalloc;
14958fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014959
Neil Schemenauera35c6882001-02-27 04:45:05 +000014960
Neil Schemenauer16c22972002-03-22 15:34:49 +000014961if test -z "$with_pymalloc"
14962then with_pymalloc="yes"
14963fi
14964if test "$with_pymalloc" != "no"
14965then
Martin v. Löwis11437992002-04-12 09:54:03 +000014966
14967cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014968#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014969_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014970
14971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014972{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
14973echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000014974
Barry Warsawef82cd72000-06-30 16:21:01 +000014975# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000014976{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
14977echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014978
Martin v. Löwiseba40652007-08-30 20:10:57 +000014979# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000014980if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014981 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000014982if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014983then
14984
14985cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000014986#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014987_ACEOF
14988
Martin v. Löwiseba40652007-08-30 20:10:57 +000014989 { echo "$as_me:$LINENO: result: yes" >&5
14990echo "${ECHO_T}yes" >&6; }
14991else { echo "$as_me:$LINENO: result: no" >&5
14992echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000014993fi
14994else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995 { echo "$as_me:$LINENO: result: no" >&5
14996echo "${ECHO_T}no" >&6; }
14997fi
14998
Barry Warsawef82cd72000-06-30 16:21:01 +000014999
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015000# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015001
Guido van Rossum98935bf2001-09-05 19:13:16 +000015002DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015003
Guido van Rossume97ee181999-12-20 21:27:22 +000015004# the dlopen() function means we might want to use dynload_shlib.o. some
15005# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015006
Thomas Wouters3a584202000-08-05 23:28:51 +000015007for ac_func in dlopen
15008do
Martin v. Löwis11437992002-04-12 09:54:03 +000015009as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015010{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15011echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15012if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015014else
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015016/* confdefs.h. */
15017_ACEOF
15018cat confdefs.h >>conftest.$ac_ext
15019cat >>conftest.$ac_ext <<_ACEOF
15020/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015021/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15022 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15023#define $ac_func innocuous_$ac_func
15024
Guido van Rossume97ee181999-12-20 21:27:22 +000015025/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015026 which can conflict with char $ac_func (); below.
15027 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015028 <limits.h> exists even on freestanding compilers. */
15029
15030#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015031# include <limits.h>
15032#else
15033# include <assert.h>
15034#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015035
15036#undef $ac_func
15037
Martin v. Löwiseba40652007-08-30 20:10:57 +000015038/* Override any GCC internal prototype to avoid an error.
15039 Use char because int might match the return type of a GCC
15040 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015041#ifdef __cplusplus
15042extern "C"
15043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015044char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015045/* The GNU C library defines this for functions which it implements
15046 to always fail with ENOSYS. Some functions are actually named
15047 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015049choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015050#endif
15051
Skip Montanaro6dead952003-09-25 14:50:04 +000015052int
15053main ()
15054{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015055return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 ;
15057 return 0;
15058}
15059_ACEOF
15060rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061if { (ac_try="$ac_link"
15062case "(($ac_try" in
15063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15064 *) ac_try_echo=$ac_try;;
15065esac
15066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15067 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015069 grep -v '^ *+' conftest.er1 >conftest.err
15070 rm -f conftest.er1
15071 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015073 (exit $ac_status); } && {
15074 test -z "$ac_c_werror_flag" ||
15075 test ! -s conftest.err
15076 } && test -s conftest$ac_exeext &&
15077 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015079else
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015081sed 's/^/| /' conftest.$ac_ext >&5
15082
Martin v. Löwiseba40652007-08-30 20:10:57 +000015083 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015085
15086rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015087 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015089ac_res=`eval echo '${'$as_ac_var'}'`
15090 { echo "$as_me:$LINENO: result: $ac_res" >&5
15091echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015092if test `eval echo '${'$as_ac_var'}'` = yes; then
15093 cat >>confdefs.h <<_ACEOF
15094#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15095_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015096
Guido van Rossume97ee181999-12-20 21:27:22 +000015097fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015098done
Guido van Rossume97ee181999-12-20 21:27:22 +000015099
Michael W. Hudson54241132001-12-07 15:38:26 +000015100
Guido van Rossume97ee181999-12-20 21:27:22 +000015101# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15102# loading of modules.
15103
Martin v. Löwiseba40652007-08-30 20:10:57 +000015104{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15105echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015106if test -z "$DYNLOADFILE"
15107then
15108 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015109 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15110 if test "$ac_cv_func_dlopen" = yes
15111 then DYNLOADFILE="dynload_shlib.o"
15112 else DYNLOADFILE="dynload_aix.o"
15113 fi
15114 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015115 BeOS*) DYNLOADFILE="dynload_beos.o";;
15116 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015117 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15118 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015119 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015120 *)
15121 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15122 # out any dynamic loading
15123 if test "$ac_cv_func_dlopen" = yes
15124 then DYNLOADFILE="dynload_shlib.o"
15125 else DYNLOADFILE="dynload_stub.o"
15126 fi
15127 ;;
15128 esac
15129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015130{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15131echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015132if test "$DYNLOADFILE" != "dynload_stub.o"
15133then
Martin v. Löwis11437992002-04-12 09:54:03 +000015134
15135cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015136#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015137_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015138
15139fi
15140
Neil Schemenauer4e425612001-06-19 15:44:15 +000015141# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15142
Michael W. Hudson54241132001-12-07 15:38:26 +000015143
Martin v. Löwiseba40652007-08-30 20:10:57 +000015144{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15145echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015146if test -z "$MACHDEP_OBJS"
15147then
Jack Jansene578a632001-08-15 01:27:14 +000015148 MACHDEP_OBJS=$extra_machdep_objs
15149else
15150 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015152{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15153echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015154
Guido van Rossum627b2d71993-12-24 10:39:16 +000015155# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
Martin v. Löwisd6320502004-08-12 13:45:08 +000015227
Martin v. Löwisc3001752005-01-23 09:27:24 +000015228
15229
Neal Norwitz05a45592006-03-20 06:30:08 +000015230
15231
Martin v. Löwis382abef2007-02-19 10:55:19 +000015232
15233
Christian Heimes36281872007-11-30 21:11:28 +000015234
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015235for ac_func in alarm bind_textdomain_codeset chown clock confstr \
Christian Heimes36281872007-11-30 21:11:28 +000015236 ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015237 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015238 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015239 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015240 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015241 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015242 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015243 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015244 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015245 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015246 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015247do
Martin v. Löwis11437992002-04-12 09:54:03 +000015248as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015249{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15250echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15251if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015252 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015253else
Martin v. Löwis11437992002-04-12 09:54:03 +000015254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015255/* confdefs.h. */
15256_ACEOF
15257cat confdefs.h >>conftest.$ac_ext
15258cat >>conftest.$ac_ext <<_ACEOF
15259/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015260/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15261 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15262#define $ac_func innocuous_$ac_func
15263
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015264/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015265 which can conflict with char $ac_func (); below.
15266 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015267 <limits.h> exists even on freestanding compilers. */
15268
15269#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015270# include <limits.h>
15271#else
15272# include <assert.h>
15273#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015274
15275#undef $ac_func
15276
Martin v. Löwiseba40652007-08-30 20:10:57 +000015277/* Override any GCC internal prototype to avoid an error.
15278 Use char because int might match the return type of a GCC
15279 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015280#ifdef __cplusplus
15281extern "C"
15282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015283char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015284/* The GNU C library defines this for functions which it implements
15285 to always fail with ENOSYS. Some functions are actually named
15286 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015287#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015288choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015289#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015290
Skip Montanaro6dead952003-09-25 14:50:04 +000015291int
15292main ()
15293{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 ;
15296 return 0;
15297}
15298_ACEOF
15299rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015300if { (ac_try="$ac_link"
15301case "(($ac_try" in
15302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15303 *) ac_try_echo=$ac_try;;
15304esac
15305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15306 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015308 grep -v '^ *+' conftest.er1 >conftest.err
15309 rm -f conftest.er1
15310 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015312 (exit $ac_status); } && {
15313 test -z "$ac_c_werror_flag" ||
15314 test ! -s conftest.err
15315 } && test -s conftest$ac_exeext &&
15316 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015317 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015318else
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015320sed 's/^/| /' conftest.$ac_ext >&5
15321
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015324
15325rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015326 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015328ac_res=`eval echo '${'$as_ac_var'}'`
15329 { echo "$as_me:$LINENO: result: $ac_res" >&5
15330echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015331if test `eval echo '${'$as_ac_var'}'` = yes; then
15332 cat >>confdefs.h <<_ACEOF
15333#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15334_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015335
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015336fi
15337done
15338
Michael W. Hudson54241132001-12-07 15:38:26 +000015339
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015340# For some functions, having a definition is not sufficient, since
15341# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015342{ echo "$as_me:$LINENO: checking for chroot" >&5
15343echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015344cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015345/* confdefs.h. */
15346_ACEOF
15347cat confdefs.h >>conftest.$ac_ext
15348cat >>conftest.$ac_ext <<_ACEOF
15349/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015350#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015351int
15352main ()
15353{
15354void *x=chroot
15355 ;
15356 return 0;
15357}
15358_ACEOF
15359rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015360if { (ac_try="$ac_compile"
15361case "(($ac_try" in
15362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15363 *) ac_try_echo=$ac_try;;
15364esac
15365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015368 grep -v '^ *+' conftest.er1 >conftest.err
15369 rm -f conftest.er1
15370 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015372 (exit $ac_status); } && {
15373 test -z "$ac_c_werror_flag" ||
15374 test ! -s conftest.err
15375 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015376
15377cat >>confdefs.h <<\_ACEOF
15378#define HAVE_CHROOT 1
15379_ACEOF
15380
Martin v. Löwiseba40652007-08-30 20:10:57 +000015381 { echo "$as_me:$LINENO: result: yes" >&5
15382echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015383else
15384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015385sed 's/^/| /' conftest.$ac_ext >&5
15386
Martin v. Löwiseba40652007-08-30 20:10:57 +000015387 { echo "$as_me:$LINENO: result: no" >&5
15388echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015389
15390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015391
15392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15393{ echo "$as_me:$LINENO: checking for link" >&5
15394echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015395cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015396/* confdefs.h. */
15397_ACEOF
15398cat confdefs.h >>conftest.$ac_ext
15399cat >>conftest.$ac_ext <<_ACEOF
15400/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015401#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015402int
15403main ()
15404{
15405void *x=link
15406 ;
15407 return 0;
15408}
15409_ACEOF
15410rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015411if { (ac_try="$ac_compile"
15412case "(($ac_try" in
15413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15414 *) ac_try_echo=$ac_try;;
15415esac
15416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015419 grep -v '^ *+' conftest.er1 >conftest.err
15420 rm -f conftest.er1
15421 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015423 (exit $ac_status); } && {
15424 test -z "$ac_c_werror_flag" ||
15425 test ! -s conftest.err
15426 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015427
15428cat >>confdefs.h <<\_ACEOF
15429#define HAVE_LINK 1
15430_ACEOF
15431
Martin v. Löwiseba40652007-08-30 20:10:57 +000015432 { echo "$as_me:$LINENO: result: yes" >&5
15433echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015434else
15435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015436sed 's/^/| /' conftest.$ac_ext >&5
15437
Martin v. Löwiseba40652007-08-30 20:10:57 +000015438 { echo "$as_me:$LINENO: result: no" >&5
15439echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015440
15441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015442
15443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15444{ echo "$as_me:$LINENO: checking for symlink" >&5
15445echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015446cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015447/* confdefs.h. */
15448_ACEOF
15449cat confdefs.h >>conftest.$ac_ext
15450cat >>conftest.$ac_ext <<_ACEOF
15451/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015452#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015453int
15454main ()
15455{
15456void *x=symlink
15457 ;
15458 return 0;
15459}
15460_ACEOF
15461rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015462if { (ac_try="$ac_compile"
15463case "(($ac_try" in
15464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15465 *) ac_try_echo=$ac_try;;
15466esac
15467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015470 grep -v '^ *+' conftest.er1 >conftest.err
15471 rm -f conftest.er1
15472 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015474 (exit $ac_status); } && {
15475 test -z "$ac_c_werror_flag" ||
15476 test ! -s conftest.err
15477 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015478
15479cat >>confdefs.h <<\_ACEOF
15480#define HAVE_SYMLINK 1
15481_ACEOF
15482
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483 { echo "$as_me:$LINENO: result: yes" >&5
15484echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015485else
15486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015487sed 's/^/| /' conftest.$ac_ext >&5
15488
Martin v. Löwiseba40652007-08-30 20:10:57 +000015489 { echo "$as_me:$LINENO: result: no" >&5
15490echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015491
15492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015493
15494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15495{ echo "$as_me:$LINENO: checking for fchdir" >&5
15496echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015497cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015498/* confdefs.h. */
15499_ACEOF
15500cat confdefs.h >>conftest.$ac_ext
15501cat >>conftest.$ac_ext <<_ACEOF
15502/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015503#include <unistd.h>
15504int
15505main ()
15506{
15507void *x=fchdir
15508 ;
15509 return 0;
15510}
15511_ACEOF
15512rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015513if { (ac_try="$ac_compile"
15514case "(($ac_try" in
15515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15516 *) ac_try_echo=$ac_try;;
15517esac
15518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015521 grep -v '^ *+' conftest.er1 >conftest.err
15522 rm -f conftest.er1
15523 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015525 (exit $ac_status); } && {
15526 test -z "$ac_c_werror_flag" ||
15527 test ! -s conftest.err
15528 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015529
15530cat >>confdefs.h <<\_ACEOF
15531#define HAVE_FCHDIR 1
15532_ACEOF
15533
Martin v. Löwiseba40652007-08-30 20:10:57 +000015534 { echo "$as_me:$LINENO: result: yes" >&5
15535echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015536else
15537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015538sed 's/^/| /' conftest.$ac_ext >&5
15539
Martin v. Löwiseba40652007-08-30 20:10:57 +000015540 { echo "$as_me:$LINENO: result: no" >&5
15541echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015542
15543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015544
15545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15546{ echo "$as_me:$LINENO: checking for fsync" >&5
15547echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015548cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015549/* confdefs.h. */
15550_ACEOF
15551cat confdefs.h >>conftest.$ac_ext
15552cat >>conftest.$ac_ext <<_ACEOF
15553/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015554#include <unistd.h>
15555int
15556main ()
15557{
15558void *x=fsync
15559 ;
15560 return 0;
15561}
15562_ACEOF
15563rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015564if { (ac_try="$ac_compile"
15565case "(($ac_try" in
15566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15567 *) ac_try_echo=$ac_try;;
15568esac
15569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015572 grep -v '^ *+' conftest.er1 >conftest.err
15573 rm -f conftest.er1
15574 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015576 (exit $ac_status); } && {
15577 test -z "$ac_c_werror_flag" ||
15578 test ! -s conftest.err
15579 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015580
15581cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015582#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015583_ACEOF
15584
Martin v. Löwiseba40652007-08-30 20:10:57 +000015585 { echo "$as_me:$LINENO: result: yes" >&5
15586echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015587else
15588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015589sed 's/^/| /' conftest.$ac_ext >&5
15590
Martin v. Löwiseba40652007-08-30 20:10:57 +000015591 { echo "$as_me:$LINENO: result: no" >&5
15592echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015593
15594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015595
15596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15597{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15598echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015599cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015600/* confdefs.h. */
15601_ACEOF
15602cat confdefs.h >>conftest.$ac_ext
15603cat >>conftest.$ac_ext <<_ACEOF
15604/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015605#include <unistd.h>
15606int
15607main ()
15608{
15609void *x=fdatasync
15610 ;
15611 return 0;
15612}
15613_ACEOF
15614rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015615if { (ac_try="$ac_compile"
15616case "(($ac_try" in
15617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15618 *) ac_try_echo=$ac_try;;
15619esac
15620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15621 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015623 grep -v '^ *+' conftest.er1 >conftest.err
15624 rm -f conftest.er1
15625 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015627 (exit $ac_status); } && {
15628 test -z "$ac_c_werror_flag" ||
15629 test ! -s conftest.err
15630 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015631
15632cat >>confdefs.h <<\_ACEOF
15633#define HAVE_FDATASYNC 1
15634_ACEOF
15635
Martin v. Löwiseba40652007-08-30 20:10:57 +000015636 { echo "$as_me:$LINENO: result: yes" >&5
15637echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015638else
15639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015640sed 's/^/| /' conftest.$ac_ext >&5
15641
Martin v. Löwiseba40652007-08-30 20:10:57 +000015642 { echo "$as_me:$LINENO: result: no" >&5
15643echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015644
15645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015646
15647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015648
Martin v. Löwisd5843682002-11-21 20:41:28 +000015649# On some systems (eg. FreeBSD 5), we would find a definition of the
15650# functions ctermid_r, setgroups in the library, but no prototype
15651# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
15652# address to avoid compiler warnings and potential miscompilations
15653# because of the missing prototypes.
15654
Martin v. Löwiseba40652007-08-30 20:10:57 +000015655{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
15656echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015658/* confdefs.h. */
15659_ACEOF
15660cat confdefs.h >>conftest.$ac_ext
15661cat >>conftest.$ac_ext <<_ACEOF
15662/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015663
15664#include "confdefs.h"
15665#include <stdio.h>
15666
Martin v. Löwisd5843682002-11-21 20:41:28 +000015667int
15668main ()
15669{
15670void* p = ctermid_r
15671 ;
15672 return 0;
15673}
15674_ACEOF
15675rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015676if { (ac_try="$ac_compile"
15677case "(($ac_try" in
15678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15679 *) ac_try_echo=$ac_try;;
15680esac
15681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15682 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015683 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015684 grep -v '^ *+' conftest.er1 >conftest.err
15685 rm -f conftest.er1
15686 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015688 (exit $ac_status); } && {
15689 test -z "$ac_c_werror_flag" ||
15690 test ! -s conftest.err
15691 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000015692
15693cat >>confdefs.h <<\_ACEOF
15694#define HAVE_CTERMID_R 1
15695_ACEOF
15696
Martin v. Löwiseba40652007-08-30 20:10:57 +000015697 { echo "$as_me:$LINENO: result: yes" >&5
15698echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015699else
15700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015701sed 's/^/| /' conftest.$ac_ext >&5
15702
Martin v. Löwiseba40652007-08-30 20:10:57 +000015703 { echo "$as_me:$LINENO: result: no" >&5
15704echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015705
15706fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000015707
Martin v. Löwiseba40652007-08-30 20:10:57 +000015708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15709
15710{ echo "$as_me:$LINENO: checking for flock" >&5
15711echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015713/* confdefs.h. */
15714_ACEOF
15715cat confdefs.h >>conftest.$ac_ext
15716cat >>conftest.$ac_ext <<_ACEOF
15717/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015718
15719#include "confdefs.h"
15720#include <sys/file.h>
15721
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015722int
15723main ()
15724{
15725void* p = flock
15726 ;
15727 return 0;
15728}
15729_ACEOF
15730rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015731if { (ac_try="$ac_compile"
15732case "(($ac_try" in
15733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15734 *) ac_try_echo=$ac_try;;
15735esac
15736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015739 grep -v '^ *+' conftest.er1 >conftest.err
15740 rm -f conftest.er1
15741 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015743 (exit $ac_status); } && {
15744 test -z "$ac_c_werror_flag" ||
15745 test ! -s conftest.err
15746 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015747
15748cat >>confdefs.h <<\_ACEOF
15749#define HAVE_FLOCK 1
15750_ACEOF
15751
Martin v. Löwiseba40652007-08-30 20:10:57 +000015752 { echo "$as_me:$LINENO: result: yes" >&5
15753echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015754else
15755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015756sed 's/^/| /' conftest.$ac_ext >&5
15757
Martin v. Löwiseba40652007-08-30 20:10:57 +000015758 { echo "$as_me:$LINENO: result: no" >&5
15759echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015760
15761fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015762
Martin v. Löwiseba40652007-08-30 20:10:57 +000015763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15764
15765{ echo "$as_me:$LINENO: checking for getpagesize" >&5
15766echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015767cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015768/* confdefs.h. */
15769_ACEOF
15770cat confdefs.h >>conftest.$ac_ext
15771cat >>conftest.$ac_ext <<_ACEOF
15772/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015773
15774#include "confdefs.h"
15775#include <unistd.h>
15776
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015777int
15778main ()
15779{
15780void* p = getpagesize
15781 ;
15782 return 0;
15783}
15784_ACEOF
15785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015786if { (ac_try="$ac_compile"
15787case "(($ac_try" in
15788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15789 *) ac_try_echo=$ac_try;;
15790esac
15791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015794 grep -v '^ *+' conftest.er1 >conftest.err
15795 rm -f conftest.er1
15796 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015798 (exit $ac_status); } && {
15799 test -z "$ac_c_werror_flag" ||
15800 test ! -s conftest.err
15801 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015802
15803cat >>confdefs.h <<\_ACEOF
15804#define HAVE_GETPAGESIZE 1
15805_ACEOF
15806
Martin v. Löwiseba40652007-08-30 20:10:57 +000015807 { echo "$as_me:$LINENO: result: yes" >&5
15808echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015809else
15810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015811sed 's/^/| /' conftest.$ac_ext >&5
15812
Martin v. Löwiseba40652007-08-30 20:10:57 +000015813 { echo "$as_me:$LINENO: result: no" >&5
15814echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015815
15816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015817
15818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015819
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015820for ac_prog in true
15821do
15822 # Extract the first word of "$ac_prog", so it can be a program name with args.
15823set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000015824{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15825echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015826if test "${ac_cv_prog_TRUE+set}" = set; then
15827 echo $ECHO_N "(cached) $ECHO_C" >&6
15828else
15829 if test -n "$TRUE"; then
15830 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
15831else
15832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15833for as_dir in $PATH
15834do
15835 IFS=$as_save_IFS
15836 test -z "$as_dir" && as_dir=.
15837 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015838 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 +000015839 ac_cv_prog_TRUE="$ac_prog"
15840 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15841 break 2
15842 fi
15843done
15844done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015846
15847fi
15848fi
15849TRUE=$ac_cv_prog_TRUE
15850if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015851 { echo "$as_me:$LINENO: result: $TRUE" >&5
15852echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015853else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854 { echo "$as_me:$LINENO: result: no" >&5
15855echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015856fi
15857
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015859 test -n "$TRUE" && break
15860done
15861test -n "$TRUE" || TRUE="/bin/true"
15862
15863
Martin v. Löwiseba40652007-08-30 20:10:57 +000015864{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
15865echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015866if test "${ac_cv_lib_c_inet_aton+set}" = set; then
15867 echo $ECHO_N "(cached) $ECHO_C" >&6
15868else
15869 ac_check_lib_save_LIBS=$LIBS
15870LIBS="-lc $LIBS"
15871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015872/* confdefs.h. */
15873_ACEOF
15874cat confdefs.h >>conftest.$ac_ext
15875cat >>conftest.$ac_ext <<_ACEOF
15876/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015877
Martin v. Löwiseba40652007-08-30 20:10:57 +000015878/* Override any GCC internal prototype to avoid an error.
15879 Use char because int might match the return type of a GCC
15880 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015881#ifdef __cplusplus
15882extern "C"
15883#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015884char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015885int
15886main ()
15887{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015888return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015889 ;
15890 return 0;
15891}
15892_ACEOF
15893rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015894if { (ac_try="$ac_link"
15895case "(($ac_try" in
15896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15897 *) ac_try_echo=$ac_try;;
15898esac
15899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15900 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015902 grep -v '^ *+' conftest.er1 >conftest.err
15903 rm -f conftest.er1
15904 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015906 (exit $ac_status); } && {
15907 test -z "$ac_c_werror_flag" ||
15908 test ! -s conftest.err
15909 } && test -s conftest$ac_exeext &&
15910 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015911 ac_cv_lib_c_inet_aton=yes
15912else
15913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015914sed 's/^/| /' conftest.$ac_ext >&5
15915
Martin v. Löwiseba40652007-08-30 20:10:57 +000015916 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015918
15919rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015921LIBS=$ac_check_lib_save_LIBS
15922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015923{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
15924echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015925if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015926 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015927else
15928
Martin v. Löwiseba40652007-08-30 20:10:57 +000015929{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
15930echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015931if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
15932 echo $ECHO_N "(cached) $ECHO_C" >&6
15933else
15934 ac_check_lib_save_LIBS=$LIBS
15935LIBS="-lresolv $LIBS"
15936cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015937/* confdefs.h. */
15938_ACEOF
15939cat confdefs.h >>conftest.$ac_ext
15940cat >>conftest.$ac_ext <<_ACEOF
15941/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015942
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943/* Override any GCC internal prototype to avoid an error.
15944 Use char because int might match the return type of a GCC
15945 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015946#ifdef __cplusplus
15947extern "C"
15948#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015949char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015950int
15951main ()
15952{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015953return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015954 ;
15955 return 0;
15956}
15957_ACEOF
15958rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015959if { (ac_try="$ac_link"
15960case "(($ac_try" in
15961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15962 *) ac_try_echo=$ac_try;;
15963esac
15964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15965 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015967 grep -v '^ *+' conftest.er1 >conftest.err
15968 rm -f conftest.er1
15969 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015971 (exit $ac_status); } && {
15972 test -z "$ac_c_werror_flag" ||
15973 test ! -s conftest.err
15974 } && test -s conftest$ac_exeext &&
15975 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015976 ac_cv_lib_resolv_inet_aton=yes
15977else
15978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015979sed 's/^/| /' conftest.$ac_ext >&5
15980
Martin v. Löwiseba40652007-08-30 20:10:57 +000015981 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015983
15984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015986LIBS=$ac_check_lib_save_LIBS
15987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015988{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
15989echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015990if test $ac_cv_lib_resolv_inet_aton = yes; then
15991 cat >>confdefs.h <<_ACEOF
15992#define HAVE_LIBRESOLV 1
15993_ACEOF
15994
15995 LIBS="-lresolv $LIBS"
15996
15997fi
15998
15999
16000fi
16001
16002
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016003# On Tru64, chflags seems to be present, but calling it will
16004# exit Python
16005{ echo "$as_me:$LINENO: checking for chflags" >&5
16006echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16007if test "$cross_compiling" = yes; then
16008 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16009See \`config.log' for more details." >&5
16010echo "$as_me: error: cannot run test program while cross compiling
16011See \`config.log' for more details." >&2;}
16012 { (exit 1); exit 1; }; }
16013else
16014 cat >conftest.$ac_ext <<_ACEOF
16015/* confdefs.h. */
16016_ACEOF
16017cat confdefs.h >>conftest.$ac_ext
16018cat >>conftest.$ac_ext <<_ACEOF
16019/* end confdefs.h. */
16020
16021#include <sys/stat.h>
16022#include <unistd.h>
16023int main(int argc, char*argv[])
16024{
16025 if(chflags(argv[0], 0) != 0)
16026 return 1;
16027 return 0;
16028}
16029
16030_ACEOF
16031rm -f conftest$ac_exeext
16032if { (ac_try="$ac_link"
16033case "(($ac_try" in
16034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16035 *) ac_try_echo=$ac_try;;
16036esac
16037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16038 (eval "$ac_link") 2>&5
16039 ac_status=$?
16040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16041 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16042 { (case "(($ac_try" in
16043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16044 *) ac_try_echo=$ac_try;;
16045esac
16046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16047 (eval "$ac_try") 2>&5
16048 ac_status=$?
16049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16050 (exit $ac_status); }; }; then
16051
16052cat >>confdefs.h <<\_ACEOF
16053#define HAVE_CHFLAGS 1
16054_ACEOF
16055
16056 { echo "$as_me:$LINENO: result: yes" >&5
16057echo "${ECHO_T}yes" >&6; }
16058else
16059 echo "$as_me: program exited with status $ac_status" >&5
16060echo "$as_me: failed program was:" >&5
16061sed 's/^/| /' conftest.$ac_ext >&5
16062
16063( exit $ac_status )
16064{ echo "$as_me:$LINENO: result: no" >&5
16065echo "${ECHO_T}no" >&6; }
16066
16067fi
16068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16069fi
16070
16071
16072
16073{ echo "$as_me:$LINENO: checking for lchflags" >&5
16074echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16075if test "$cross_compiling" = yes; then
16076 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16077See \`config.log' for more details." >&5
16078echo "$as_me: error: cannot run test program while cross compiling
16079See \`config.log' for more details." >&2;}
16080 { (exit 1); exit 1; }; }
16081else
16082 cat >conftest.$ac_ext <<_ACEOF
16083/* confdefs.h. */
16084_ACEOF
16085cat confdefs.h >>conftest.$ac_ext
16086cat >>conftest.$ac_ext <<_ACEOF
16087/* end confdefs.h. */
16088
16089#include <sys/stat.h>
16090#include <unistd.h>
16091int main(int argc, char*argv[])
16092{
16093 if(lchflags(argv[0], 0) != 0)
16094 return 1;
16095 return 0;
16096}
16097
16098_ACEOF
16099rm -f conftest$ac_exeext
16100if { (ac_try="$ac_link"
16101case "(($ac_try" in
16102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16103 *) ac_try_echo=$ac_try;;
16104esac
16105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16106 (eval "$ac_link") 2>&5
16107 ac_status=$?
16108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16109 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16110 { (case "(($ac_try" in
16111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16112 *) ac_try_echo=$ac_try;;
16113esac
16114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16115 (eval "$ac_try") 2>&5
16116 ac_status=$?
16117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16118 (exit $ac_status); }; }; then
16119
16120cat >>confdefs.h <<\_ACEOF
16121#define HAVE_LCHFLAGS 1
16122_ACEOF
16123
16124 { echo "$as_me:$LINENO: result: yes" >&5
16125echo "${ECHO_T}yes" >&6; }
16126else
16127 echo "$as_me: program exited with status $ac_status" >&5
16128echo "$as_me: failed program was:" >&5
16129sed 's/^/| /' conftest.$ac_ext >&5
16130
16131( exit $ac_status )
16132{ echo "$as_me:$LINENO: result: no" >&5
16133echo "${ECHO_T}no" >&6; }
16134
16135fi
16136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16137fi
16138
16139
16140
Ronald Oussorenf8752642006-07-06 10:13:35 +000016141case $ac_sys_system/$ac_sys_release in
16142Darwin/*)
16143 _CUR_CFLAGS="${CFLAGS}"
16144 _CUR_LDFLAGS="${LDFLAGS}"
16145 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16146 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16147 ;;
16148esac
16149
Martin v. Löwiseba40652007-08-30 20:10:57 +000016150{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16151echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016152if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16153 echo $ECHO_N "(cached) $ECHO_C" >&6
16154else
16155 ac_check_lib_save_LIBS=$LIBS
16156LIBS="-lz $LIBS"
16157cat >conftest.$ac_ext <<_ACEOF
16158/* confdefs.h. */
16159_ACEOF
16160cat confdefs.h >>conftest.$ac_ext
16161cat >>conftest.$ac_ext <<_ACEOF
16162/* end confdefs.h. */
16163
Martin v. Löwiseba40652007-08-30 20:10:57 +000016164/* Override any GCC internal prototype to avoid an error.
16165 Use char because int might match the return type of a GCC
16166 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016167#ifdef __cplusplus
16168extern "C"
16169#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016170char inflateCopy ();
16171int
16172main ()
16173{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016174return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016175 ;
16176 return 0;
16177}
16178_ACEOF
16179rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016180if { (ac_try="$ac_link"
16181case "(($ac_try" in
16182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16183 *) ac_try_echo=$ac_try;;
16184esac
16185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16186 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016187 ac_status=$?
16188 grep -v '^ *+' conftest.er1 >conftest.err
16189 rm -f conftest.er1
16190 cat conftest.err >&5
16191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016192 (exit $ac_status); } && {
16193 test -z "$ac_c_werror_flag" ||
16194 test ! -s conftest.err
16195 } && test -s conftest$ac_exeext &&
16196 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016197 ac_cv_lib_z_inflateCopy=yes
16198else
16199 echo "$as_me: failed program was:" >&5
16200sed 's/^/| /' conftest.$ac_ext >&5
16201
Martin v. Löwiseba40652007-08-30 20:10:57 +000016202 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016204
16205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016206 conftest$ac_exeext conftest.$ac_ext
16207LIBS=$ac_check_lib_save_LIBS
16208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016209{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16210echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016211if test $ac_cv_lib_z_inflateCopy = yes; then
16212
16213cat >>confdefs.h <<\_ACEOF
16214#define HAVE_ZLIB_COPY 1
16215_ACEOF
16216
16217fi
16218
16219
Ronald Oussorenf8752642006-07-06 10:13:35 +000016220case $ac_sys_system/$ac_sys_release in
16221Darwin/*)
16222 CFLAGS="${_CUR_CFLAGS}"
16223 LDFLAGS="${_CUR_LDFLAGS}"
16224 ;;
16225esac
16226
Martin v. Löwiseba40652007-08-30 20:10:57 +000016227{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16228echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016230/* confdefs.h. */
16231_ACEOF
16232cat confdefs.h >>conftest.$ac_ext
16233cat >>conftest.$ac_ext <<_ACEOF
16234/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016235
16236#include "confdefs.h"
16237#include <netdb.h>
16238
Martin v. Löwise9416172003-05-03 10:12:45 +000016239int
16240main ()
16241{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016242void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016243 ;
16244 return 0;
16245}
16246_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016247rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016248if { (ac_try="$ac_link"
16249case "(($ac_try" in
16250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16251 *) ac_try_echo=$ac_try;;
16252esac
16253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16254 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016256 grep -v '^ *+' conftest.er1 >conftest.err
16257 rm -f conftest.er1
16258 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016260 (exit $ac_status); } && {
16261 test -z "$ac_c_werror_flag" ||
16262 test ! -s conftest.err
16263 } && test -s conftest$ac_exeext &&
16264 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016265
16266cat >>confdefs.h <<\_ACEOF
16267#define HAVE_HSTRERROR 1
16268_ACEOF
16269
Martin v. Löwiseba40652007-08-30 20:10:57 +000016270 { echo "$as_me:$LINENO: result: yes" >&5
16271echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016272else
16273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016274sed 's/^/| /' conftest.$ac_ext >&5
16275
Martin v. Löwiseba40652007-08-30 20:10:57 +000016276 { echo "$as_me:$LINENO: result: no" >&5
16277echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016278
16279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016280
16281rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016282 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016283
Martin v. Löwiseba40652007-08-30 20:10:57 +000016284{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16285echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016287/* confdefs.h. */
16288_ACEOF
16289cat confdefs.h >>conftest.$ac_ext
16290cat >>conftest.$ac_ext <<_ACEOF
16291/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016292
16293#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016294#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016295#include <sys/socket.h>
16296#include <netinet/in.h>
16297#include <arpa/inet.h>
16298
Martin v. Löwise9416172003-05-03 10:12:45 +000016299int
16300main ()
16301{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016302void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016303 ;
16304 return 0;
16305}
16306_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016307rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016308if { (ac_try="$ac_link"
16309case "(($ac_try" in
16310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16311 *) ac_try_echo=$ac_try;;
16312esac
16313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16314 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016316 grep -v '^ *+' conftest.er1 >conftest.err
16317 rm -f conftest.er1
16318 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016320 (exit $ac_status); } && {
16321 test -z "$ac_c_werror_flag" ||
16322 test ! -s conftest.err
16323 } && test -s conftest$ac_exeext &&
16324 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016325
16326cat >>confdefs.h <<\_ACEOF
16327#define HAVE_INET_ATON 1
16328_ACEOF
16329
Martin v. Löwiseba40652007-08-30 20:10:57 +000016330 { echo "$as_me:$LINENO: result: yes" >&5
16331echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016332else
16333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016334sed 's/^/| /' conftest.$ac_ext >&5
16335
Martin v. Löwiseba40652007-08-30 20:10:57 +000016336 { echo "$as_me:$LINENO: result: no" >&5
16337echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016338
16339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016340
16341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016342 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016343
Martin v. Löwiseba40652007-08-30 20:10:57 +000016344{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16345echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016346cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016347/* confdefs.h. */
16348_ACEOF
16349cat confdefs.h >>conftest.$ac_ext
16350cat >>conftest.$ac_ext <<_ACEOF
16351/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016352
16353#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016354#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016355#include <sys/socket.h>
16356#include <netinet/in.h>
16357#include <arpa/inet.h>
16358
Martin v. Löwise9416172003-05-03 10:12:45 +000016359int
16360main ()
16361{
16362void* p = inet_pton
16363 ;
16364 return 0;
16365}
16366_ACEOF
16367rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016368if { (ac_try="$ac_compile"
16369case "(($ac_try" in
16370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16371 *) ac_try_echo=$ac_try;;
16372esac
16373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16374 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016376 grep -v '^ *+' conftest.er1 >conftest.err
16377 rm -f conftest.er1
16378 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016380 (exit $ac_status); } && {
16381 test -z "$ac_c_werror_flag" ||
16382 test ! -s conftest.err
16383 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016384
16385cat >>confdefs.h <<\_ACEOF
16386#define HAVE_INET_PTON 1
16387_ACEOF
16388
Martin v. Löwiseba40652007-08-30 20:10:57 +000016389 { echo "$as_me:$LINENO: result: yes" >&5
16390echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016391else
16392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016393sed 's/^/| /' conftest.$ac_ext >&5
16394
Martin v. Löwiseba40652007-08-30 20:10:57 +000016395 { echo "$as_me:$LINENO: result: no" >&5
16396echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016397
16398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016399
16400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016401
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016402# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016403{ echo "$as_me:$LINENO: checking for setgroups" >&5
16404echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016405cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016406/* confdefs.h. */
16407_ACEOF
16408cat confdefs.h >>conftest.$ac_ext
16409cat >>conftest.$ac_ext <<_ACEOF
16410/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016411
16412#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016413#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016414#ifdef HAVE_GRP_H
16415#include <grp.h>
16416#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016417
Martin v. Löwisd5843682002-11-21 20:41:28 +000016418int
16419main ()
16420{
16421void* p = setgroups
16422 ;
16423 return 0;
16424}
16425_ACEOF
16426rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016427if { (ac_try="$ac_compile"
16428case "(($ac_try" in
16429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16430 *) ac_try_echo=$ac_try;;
16431esac
16432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16433 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016435 grep -v '^ *+' conftest.er1 >conftest.err
16436 rm -f conftest.er1
16437 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016439 (exit $ac_status); } && {
16440 test -z "$ac_c_werror_flag" ||
16441 test ! -s conftest.err
16442 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016443
16444cat >>confdefs.h <<\_ACEOF
16445#define HAVE_SETGROUPS 1
16446_ACEOF
16447
Martin v. Löwiseba40652007-08-30 20:10:57 +000016448 { echo "$as_me:$LINENO: result: yes" >&5
16449echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016450else
16451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016452sed 's/^/| /' conftest.$ac_ext >&5
16453
Martin v. Löwiseba40652007-08-30 20:10:57 +000016454 { echo "$as_me:$LINENO: result: no" >&5
16455echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016456
16457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016458
16459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016460
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016461# check for openpty and forkpty
16462
Martin v. Löwis11437992002-04-12 09:54:03 +000016463
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016464for ac_func in openpty
16465do
Martin v. Löwis11437992002-04-12 09:54:03 +000016466as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016467{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16468echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16469if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016470 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016471else
Martin v. Löwis11437992002-04-12 09:54:03 +000016472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016473/* confdefs.h. */
16474_ACEOF
16475cat confdefs.h >>conftest.$ac_ext
16476cat >>conftest.$ac_ext <<_ACEOF
16477/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016478/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16479 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16480#define $ac_func innocuous_$ac_func
16481
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016482/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016483 which can conflict with char $ac_func (); below.
16484 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016485 <limits.h> exists even on freestanding compilers. */
16486
16487#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016488# include <limits.h>
16489#else
16490# include <assert.h>
16491#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016492
16493#undef $ac_func
16494
Martin v. Löwiseba40652007-08-30 20:10:57 +000016495/* Override any GCC internal prototype to avoid an error.
16496 Use char because int might match the return type of a GCC
16497 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016498#ifdef __cplusplus
16499extern "C"
16500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016501char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016502/* The GNU C library defines this for functions which it implements
16503 to always fail with ENOSYS. Some functions are actually named
16504 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016505#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016506choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016507#endif
16508
Skip Montanaro6dead952003-09-25 14:50:04 +000016509int
16510main ()
16511{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016512return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016513 ;
16514 return 0;
16515}
16516_ACEOF
16517rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016518if { (ac_try="$ac_link"
16519case "(($ac_try" in
16520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16521 *) ac_try_echo=$ac_try;;
16522esac
16523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16524 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016526 grep -v '^ *+' conftest.er1 >conftest.err
16527 rm -f conftest.er1
16528 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016530 (exit $ac_status); } && {
16531 test -z "$ac_c_werror_flag" ||
16532 test ! -s conftest.err
16533 } && test -s conftest$ac_exeext &&
16534 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016535 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016536else
Martin v. Löwis11437992002-04-12 09:54:03 +000016537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016538sed 's/^/| /' conftest.$ac_ext >&5
16539
Martin v. Löwiseba40652007-08-30 20:10:57 +000016540 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016542
16543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016544 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016546ac_res=`eval echo '${'$as_ac_var'}'`
16547 { echo "$as_me:$LINENO: result: $ac_res" >&5
16548echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016549if test `eval echo '${'$as_ac_var'}'` = yes; then
16550 cat >>confdefs.h <<_ACEOF
16551#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16552_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016553
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016554else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016555 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16556echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016557if test "${ac_cv_lib_util_openpty+set}" = set; then
16558 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016559else
Martin v. Löwis11437992002-04-12 09:54:03 +000016560 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016561LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016562cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016563/* confdefs.h. */
16564_ACEOF
16565cat confdefs.h >>conftest.$ac_ext
16566cat >>conftest.$ac_ext <<_ACEOF
16567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016568
Martin v. Löwiseba40652007-08-30 20:10:57 +000016569/* Override any GCC internal prototype to avoid an error.
16570 Use char because int might match the return type of a GCC
16571 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016572#ifdef __cplusplus
16573extern "C"
16574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016575char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016576int
16577main ()
16578{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016579return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016580 ;
16581 return 0;
16582}
16583_ACEOF
16584rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016585if { (ac_try="$ac_link"
16586case "(($ac_try" in
16587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16588 *) ac_try_echo=$ac_try;;
16589esac
16590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16591 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016593 grep -v '^ *+' conftest.er1 >conftest.err
16594 rm -f conftest.er1
16595 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016597 (exit $ac_status); } && {
16598 test -z "$ac_c_werror_flag" ||
16599 test ! -s conftest.err
16600 } && test -s conftest$ac_exeext &&
16601 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016602 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016603else
Martin v. Löwis11437992002-04-12 09:54:03 +000016604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016605sed 's/^/| /' conftest.$ac_ext >&5
16606
Martin v. Löwiseba40652007-08-30 20:10:57 +000016607 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016609
16610rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016612LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016614{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
16615echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016616if test $ac_cv_lib_util_openpty = yes; then
16617 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016618#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016619_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016620 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016621else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016622 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
16623echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016624if test "${ac_cv_lib_bsd_openpty+set}" = set; then
16625 echo $ECHO_N "(cached) $ECHO_C" >&6
16626else
16627 ac_check_lib_save_LIBS=$LIBS
16628LIBS="-lbsd $LIBS"
16629cat >conftest.$ac_ext <<_ACEOF
16630/* confdefs.h. */
16631_ACEOF
16632cat confdefs.h >>conftest.$ac_ext
16633cat >>conftest.$ac_ext <<_ACEOF
16634/* end confdefs.h. */
16635
Martin v. Löwiseba40652007-08-30 20:10:57 +000016636/* Override any GCC internal prototype to avoid an error.
16637 Use char because int might match the return type of a GCC
16638 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016639#ifdef __cplusplus
16640extern "C"
16641#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016642char openpty ();
16643int
16644main ()
16645{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016646return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016647 ;
16648 return 0;
16649}
16650_ACEOF
16651rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016652if { (ac_try="$ac_link"
16653case "(($ac_try" in
16654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16655 *) ac_try_echo=$ac_try;;
16656esac
16657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16658 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016659 ac_status=$?
16660 grep -v '^ *+' conftest.er1 >conftest.err
16661 rm -f conftest.er1
16662 cat conftest.err >&5
16663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016664 (exit $ac_status); } && {
16665 test -z "$ac_c_werror_flag" ||
16666 test ! -s conftest.err
16667 } && test -s conftest$ac_exeext &&
16668 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016669 ac_cv_lib_bsd_openpty=yes
16670else
16671 echo "$as_me: failed program was:" >&5
16672sed 's/^/| /' conftest.$ac_ext >&5
16673
Martin v. Löwiseba40652007-08-30 20:10:57 +000016674 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016676
16677rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016678 conftest$ac_exeext conftest.$ac_ext
16679LIBS=$ac_check_lib_save_LIBS
16680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016681{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
16682echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016683if test $ac_cv_lib_bsd_openpty = yes; then
16684 cat >>confdefs.h <<\_ACEOF
16685#define HAVE_OPENPTY 1
16686_ACEOF
16687 LIBS="$LIBS -lbsd"
16688fi
16689
16690
16691fi
16692
Fred Drake8cef4cf2000-06-28 16:40:38 +000016693
16694fi
16695done
16696
Martin v. Löwis11437992002-04-12 09:54:03 +000016697
Fred Drake8cef4cf2000-06-28 16:40:38 +000016698for ac_func in forkpty
16699do
Martin v. Löwis11437992002-04-12 09:54:03 +000016700as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016701{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16702echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16703if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016704 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016705else
Martin v. Löwis11437992002-04-12 09:54:03 +000016706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016707/* confdefs.h. */
16708_ACEOF
16709cat confdefs.h >>conftest.$ac_ext
16710cat >>conftest.$ac_ext <<_ACEOF
16711/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016712/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16713 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16714#define $ac_func innocuous_$ac_func
16715
Fred Drake8cef4cf2000-06-28 16:40:38 +000016716/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016717 which can conflict with char $ac_func (); below.
16718 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016719 <limits.h> exists even on freestanding compilers. */
16720
16721#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016722# include <limits.h>
16723#else
16724# include <assert.h>
16725#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016726
16727#undef $ac_func
16728
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729/* Override any GCC internal prototype to avoid an error.
16730 Use char because int might match the return type of a GCC
16731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016732#ifdef __cplusplus
16733extern "C"
16734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016735char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000016736/* The GNU C library defines this for functions which it implements
16737 to always fail with ENOSYS. Some functions are actually named
16738 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016739#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000016740choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000016741#endif
16742
Skip Montanaro6dead952003-09-25 14:50:04 +000016743int
16744main ()
16745{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016746return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016747 ;
16748 return 0;
16749}
16750_ACEOF
16751rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016752if { (ac_try="$ac_link"
16753case "(($ac_try" in
16754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16755 *) ac_try_echo=$ac_try;;
16756esac
16757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16758 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016760 grep -v '^ *+' conftest.er1 >conftest.err
16761 rm -f conftest.er1
16762 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016764 (exit $ac_status); } && {
16765 test -z "$ac_c_werror_flag" ||
16766 test ! -s conftest.err
16767 } && test -s conftest$ac_exeext &&
16768 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016770else
Martin v. Löwis11437992002-04-12 09:54:03 +000016771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016772sed 's/^/| /' conftest.$ac_ext >&5
16773
Martin v. Löwiseba40652007-08-30 20:10:57 +000016774 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016776
16777rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016778 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016780ac_res=`eval echo '${'$as_ac_var'}'`
16781 { echo "$as_me:$LINENO: result: $ac_res" >&5
16782echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016783if test `eval echo '${'$as_ac_var'}'` = yes; then
16784 cat >>confdefs.h <<_ACEOF
16785#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16786_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016787
Fred Drake8cef4cf2000-06-28 16:40:38 +000016788else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016789 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
16790echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016791if test "${ac_cv_lib_util_forkpty+set}" = set; then
16792 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016793else
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016795LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016796cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016797/* confdefs.h. */
16798_ACEOF
16799cat confdefs.h >>conftest.$ac_ext
16800cat >>conftest.$ac_ext <<_ACEOF
16801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016802
Martin v. Löwiseba40652007-08-30 20:10:57 +000016803/* Override any GCC internal prototype to avoid an error.
16804 Use char because int might match the return type of a GCC
16805 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016806#ifdef __cplusplus
16807extern "C"
16808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016809char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016810int
16811main ()
16812{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016813return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 ;
16815 return 0;
16816}
16817_ACEOF
16818rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016819if { (ac_try="$ac_link"
16820case "(($ac_try" in
16821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16822 *) ac_try_echo=$ac_try;;
16823esac
16824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16825 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016827 grep -v '^ *+' conftest.er1 >conftest.err
16828 rm -f conftest.er1
16829 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016831 (exit $ac_status); } && {
16832 test -z "$ac_c_werror_flag" ||
16833 test ! -s conftest.err
16834 } && test -s conftest$ac_exeext &&
16835 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016836 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016837else
Martin v. Löwis11437992002-04-12 09:54:03 +000016838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016839sed 's/^/| /' conftest.$ac_ext >&5
16840
Martin v. Löwiseba40652007-08-30 20:10:57 +000016841 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016843
16844rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016845 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016846LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016848{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
16849echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016850if test $ac_cv_lib_util_forkpty = yes; then
16851 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016852#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016853_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016854 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016855else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016856 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
16857echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016858if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
16859 echo $ECHO_N "(cached) $ECHO_C" >&6
16860else
16861 ac_check_lib_save_LIBS=$LIBS
16862LIBS="-lbsd $LIBS"
16863cat >conftest.$ac_ext <<_ACEOF
16864/* confdefs.h. */
16865_ACEOF
16866cat confdefs.h >>conftest.$ac_ext
16867cat >>conftest.$ac_ext <<_ACEOF
16868/* end confdefs.h. */
16869
Martin v. Löwiseba40652007-08-30 20:10:57 +000016870/* Override any GCC internal prototype to avoid an error.
16871 Use char because int might match the return type of a GCC
16872 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016873#ifdef __cplusplus
16874extern "C"
16875#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016876char forkpty ();
16877int
16878main ()
16879{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016880return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016881 ;
16882 return 0;
16883}
16884_ACEOF
16885rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016886if { (ac_try="$ac_link"
16887case "(($ac_try" in
16888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16889 *) ac_try_echo=$ac_try;;
16890esac
16891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16892 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016893 ac_status=$?
16894 grep -v '^ *+' conftest.er1 >conftest.err
16895 rm -f conftest.er1
16896 cat conftest.err >&5
16897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016898 (exit $ac_status); } && {
16899 test -z "$ac_c_werror_flag" ||
16900 test ! -s conftest.err
16901 } && test -s conftest$ac_exeext &&
16902 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016903 ac_cv_lib_bsd_forkpty=yes
16904else
16905 echo "$as_me: failed program was:" >&5
16906sed 's/^/| /' conftest.$ac_ext >&5
16907
Martin v. Löwiseba40652007-08-30 20:10:57 +000016908 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016910
16911rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016912 conftest$ac_exeext conftest.$ac_ext
16913LIBS=$ac_check_lib_save_LIBS
16914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016915{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
16916echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016917if test $ac_cv_lib_bsd_forkpty = yes; then
16918 cat >>confdefs.h <<\_ACEOF
16919#define HAVE_FORKPTY 1
16920_ACEOF
16921 LIBS="$LIBS -lbsd"
16922fi
16923
16924
16925fi
16926
Fred Drake8cef4cf2000-06-28 16:40:38 +000016927
16928fi
16929done
16930
Jack Jansendd19cf82001-12-06 22:36:17 +000016931
Michael W. Hudson54241132001-12-07 15:38:26 +000016932# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016933
16934
16935
16936
16937
16938
Fred Drake8cef4cf2000-06-28 16:40:38 +000016939for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
16940do
Martin v. Löwis11437992002-04-12 09:54:03 +000016941as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016942{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16943echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16944if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016945 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016946else
Martin v. Löwis11437992002-04-12 09:54:03 +000016947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016948/* confdefs.h. */
16949_ACEOF
16950cat confdefs.h >>conftest.$ac_ext
16951cat >>conftest.$ac_ext <<_ACEOF
16952/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016953/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16954 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16955#define $ac_func innocuous_$ac_func
16956
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016957/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016958 which can conflict with char $ac_func (); below.
16959 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016960 <limits.h> exists even on freestanding compilers. */
16961
16962#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016963# include <limits.h>
16964#else
16965# include <assert.h>
16966#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016967
16968#undef $ac_func
16969
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970/* Override any GCC internal prototype to avoid an error.
16971 Use char because int might match the return type of a GCC
16972 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016973#ifdef __cplusplus
16974extern "C"
16975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016976char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016977/* The GNU C library defines this for functions which it implements
16978 to always fail with ENOSYS. Some functions are actually named
16979 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016980#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016981choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016982#endif
16983
Skip Montanaro6dead952003-09-25 14:50:04 +000016984int
16985main ()
16986{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016987return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016988 ;
16989 return 0;
16990}
16991_ACEOF
16992rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016993if { (ac_try="$ac_link"
16994case "(($ac_try" in
16995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16996 *) ac_try_echo=$ac_try;;
16997esac
16998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16999 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017001 grep -v '^ *+' conftest.er1 >conftest.err
17002 rm -f conftest.er1
17003 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017005 (exit $ac_status); } && {
17006 test -z "$ac_c_werror_flag" ||
17007 test ! -s conftest.err
17008 } && test -s conftest$ac_exeext &&
17009 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017010 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017011else
Martin v. Löwis11437992002-04-12 09:54:03 +000017012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017013sed 's/^/| /' conftest.$ac_ext >&5
17014
Martin v. Löwiseba40652007-08-30 20:10:57 +000017015 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017017
17018rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017019 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021ac_res=`eval echo '${'$as_ac_var'}'`
17022 { echo "$as_me:$LINENO: result: $ac_res" >&5
17023echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017024if test `eval echo '${'$as_ac_var'}'` = yes; then
17025 cat >>confdefs.h <<_ACEOF
17026#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17027_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017028
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017029fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017030done
17031
Michael W. Hudson54241132001-12-07 15:38:26 +000017032
Martin v. Löwis11437992002-04-12 09:54:03 +000017033
17034
17035
17036
17037
Martin v. Löwis1142de32002-03-29 16:28:31 +000017038for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000017039do
Martin v. Löwis11437992002-04-12 09:54:03 +000017040as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017041{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17042echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17043if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017044 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017045else
Martin v. Löwis11437992002-04-12 09:54:03 +000017046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017047/* confdefs.h. */
17048_ACEOF
17049cat confdefs.h >>conftest.$ac_ext
17050cat >>conftest.$ac_ext <<_ACEOF
17051/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017052/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17053 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17054#define $ac_func innocuous_$ac_func
17055
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017056/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017057 which can conflict with char $ac_func (); below.
17058 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017059 <limits.h> exists even on freestanding compilers. */
17060
17061#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017062# include <limits.h>
17063#else
17064# include <assert.h>
17065#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017066
17067#undef $ac_func
17068
Martin v. Löwiseba40652007-08-30 20:10:57 +000017069/* Override any GCC internal prototype to avoid an error.
17070 Use char because int might match the return type of a GCC
17071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017072#ifdef __cplusplus
17073extern "C"
17074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017075char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017076/* The GNU C library defines this for functions which it implements
17077 to always fail with ENOSYS. Some functions are actually named
17078 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017079#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017080choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017081#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017082
Skip Montanaro6dead952003-09-25 14:50:04 +000017083int
17084main ()
17085{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017086return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017087 ;
17088 return 0;
17089}
17090_ACEOF
17091rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017092if { (ac_try="$ac_link"
17093case "(($ac_try" in
17094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17095 *) ac_try_echo=$ac_try;;
17096esac
17097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17098 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017100 grep -v '^ *+' conftest.er1 >conftest.err
17101 rm -f conftest.er1
17102 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017104 (exit $ac_status); } && {
17105 test -z "$ac_c_werror_flag" ||
17106 test ! -s conftest.err
17107 } && test -s conftest$ac_exeext &&
17108 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017109 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017110else
Martin v. Löwis11437992002-04-12 09:54:03 +000017111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017112sed 's/^/| /' conftest.$ac_ext >&5
17113
Martin v. Löwiseba40652007-08-30 20:10:57 +000017114 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017116
17117rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017118 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120ac_res=`eval echo '${'$as_ac_var'}'`
17121 { echo "$as_me:$LINENO: result: $ac_res" >&5
17122echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017123if test `eval echo '${'$as_ac_var'}'` = yes; then
17124 cat >>confdefs.h <<_ACEOF
17125#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17126_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017127
Martin v. Löwis1142de32002-03-29 16:28:31 +000017128else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017129 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017130 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017131 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17132 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017133esac
17134
Martin v. Löwis1142de32002-03-29 16:28:31 +000017135fi
17136done
17137
17138
Martin v. Löwis11437992002-04-12 09:54:03 +000017139
Martin v. Löwis1142de32002-03-29 16:28:31 +000017140for ac_func in getpgrp
17141do
Martin v. Löwis11437992002-04-12 09:54:03 +000017142as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017143{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17144echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17145if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017146 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017147else
Martin v. Löwis11437992002-04-12 09:54:03 +000017148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017149/* confdefs.h. */
17150_ACEOF
17151cat confdefs.h >>conftest.$ac_ext
17152cat >>conftest.$ac_ext <<_ACEOF
17153/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017154/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17155 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17156#define $ac_func innocuous_$ac_func
17157
Martin v. Löwis1142de32002-03-29 16:28:31 +000017158/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017159 which can conflict with char $ac_func (); below.
17160 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017161 <limits.h> exists even on freestanding compilers. */
17162
17163#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017164# include <limits.h>
17165#else
17166# include <assert.h>
17167#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017168
17169#undef $ac_func
17170
Martin v. Löwiseba40652007-08-30 20:10:57 +000017171/* Override any GCC internal prototype to avoid an error.
17172 Use char because int might match the return type of a GCC
17173 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017174#ifdef __cplusplus
17175extern "C"
17176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017177char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017178/* The GNU C library defines this for functions which it implements
17179 to always fail with ENOSYS. Some functions are actually named
17180 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017181#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017182choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017183#endif
17184
Skip Montanaro6dead952003-09-25 14:50:04 +000017185int
17186main ()
17187{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017188return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017189 ;
17190 return 0;
17191}
17192_ACEOF
17193rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017194if { (ac_try="$ac_link"
17195case "(($ac_try" in
17196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17197 *) ac_try_echo=$ac_try;;
17198esac
17199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17200 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017202 grep -v '^ *+' conftest.er1 >conftest.err
17203 rm -f conftest.er1
17204 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017206 (exit $ac_status); } && {
17207 test -z "$ac_c_werror_flag" ||
17208 test ! -s conftest.err
17209 } && test -s conftest$ac_exeext &&
17210 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017212else
Martin v. Löwis11437992002-04-12 09:54:03 +000017213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017214sed 's/^/| /' conftest.$ac_ext >&5
17215
Martin v. Löwiseba40652007-08-30 20:10:57 +000017216 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017218
17219rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017220 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017222ac_res=`eval echo '${'$as_ac_var'}'`
17223 { echo "$as_me:$LINENO: result: $ac_res" >&5
17224echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017225if test `eval echo '${'$as_ac_var'}'` = yes; then
17226 cat >>confdefs.h <<_ACEOF
17227#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17228_ACEOF
17229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017230/* confdefs.h. */
17231_ACEOF
17232cat confdefs.h >>conftest.$ac_ext
17233cat >>conftest.$ac_ext <<_ACEOF
17234/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017235#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017236int
17237main ()
17238{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017239getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017240 ;
17241 return 0;
17242}
17243_ACEOF
17244rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017245if { (ac_try="$ac_compile"
17246case "(($ac_try" in
17247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17248 *) ac_try_echo=$ac_try;;
17249esac
17250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017253 grep -v '^ *+' conftest.er1 >conftest.err
17254 rm -f conftest.er1
17255 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017257 (exit $ac_status); } && {
17258 test -z "$ac_c_werror_flag" ||
17259 test ! -s conftest.err
17260 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017261
17262cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017263#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017264_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017265
Martin v. Löwis11437992002-04-12 09:54:03 +000017266
Guido van Rossumf78abae1997-01-21 22:02:36 +000017267else
Martin v. Löwis11437992002-04-12 09:54:03 +000017268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017269sed 's/^/| /' conftest.$ac_ext >&5
17270
Martin v. Löwiseba40652007-08-30 20:10:57 +000017271
Guido van Rossum627b2d71993-12-24 10:39:16 +000017272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017273
17274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017275
Guido van Rossum627b2d71993-12-24 10:39:16 +000017276fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017277done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017278
Jack Jansen150753c2003-03-29 22:07:47 +000017279
17280for ac_func in setpgrp
17281do
17282as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017283{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17284echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17285if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017286 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017287else
Martin v. Löwis11437992002-04-12 09:54:03 +000017288 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017289/* confdefs.h. */
17290_ACEOF
17291cat confdefs.h >>conftest.$ac_ext
17292cat >>conftest.$ac_ext <<_ACEOF
17293/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017294/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17295 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17296#define $ac_func innocuous_$ac_func
17297
Jack Jansen150753c2003-03-29 22:07:47 +000017298/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017299 which can conflict with char $ac_func (); below.
17300 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017301 <limits.h> exists even on freestanding compilers. */
17302
17303#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017304# include <limits.h>
17305#else
17306# include <assert.h>
17307#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017308
17309#undef $ac_func
17310
Martin v. Löwiseba40652007-08-30 20:10:57 +000017311/* Override any GCC internal prototype to avoid an error.
17312 Use char because int might match the return type of a GCC
17313 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017314#ifdef __cplusplus
17315extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017316#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017317char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017318/* The GNU C library defines this for functions which it implements
17319 to always fail with ENOSYS. Some functions are actually named
17320 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017321#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017322choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017323#endif
17324
Skip Montanaro6dead952003-09-25 14:50:04 +000017325int
17326main ()
17327{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017328return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017329 ;
17330 return 0;
17331}
17332_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017333rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017334if { (ac_try="$ac_link"
17335case "(($ac_try" in
17336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17337 *) ac_try_echo=$ac_try;;
17338esac
17339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17340 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017342 grep -v '^ *+' conftest.er1 >conftest.err
17343 rm -f conftest.er1
17344 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017346 (exit $ac_status); } && {
17347 test -z "$ac_c_werror_flag" ||
17348 test ! -s conftest.err
17349 } && test -s conftest$ac_exeext &&
17350 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017351 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017352else
Jack Jansen150753c2003-03-29 22:07:47 +000017353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017354sed 's/^/| /' conftest.$ac_ext >&5
17355
Martin v. Löwiseba40652007-08-30 20:10:57 +000017356 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017358
17359rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017360 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017362ac_res=`eval echo '${'$as_ac_var'}'`
17363 { echo "$as_me:$LINENO: result: $ac_res" >&5
17364echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017365if test `eval echo '${'$as_ac_var'}'` = yes; then
17366 cat >>confdefs.h <<_ACEOF
17367#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17368_ACEOF
17369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017370/* confdefs.h. */
17371_ACEOF
17372cat confdefs.h >>conftest.$ac_ext
17373cat >>conftest.$ac_ext <<_ACEOF
17374/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017375#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017376int
17377main ()
17378{
17379setpgrp(0,0);
17380 ;
17381 return 0;
17382}
17383_ACEOF
17384rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017385if { (ac_try="$ac_compile"
17386case "(($ac_try" in
17387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17388 *) ac_try_echo=$ac_try;;
17389esac
17390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17391 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017392 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017393 grep -v '^ *+' conftest.er1 >conftest.err
17394 rm -f conftest.er1
17395 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017397 (exit $ac_status); } && {
17398 test -z "$ac_c_werror_flag" ||
17399 test ! -s conftest.err
17400 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017401
17402cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017403#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017404_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017405
Jack Jansen150753c2003-03-29 22:07:47 +000017406
17407else
17408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017409sed 's/^/| /' conftest.$ac_ext >&5
17410
Martin v. Löwiseba40652007-08-30 20:10:57 +000017411
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017413
17414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017415
17416fi
17417done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017418
Martin v. Löwis11437992002-04-12 09:54:03 +000017419
Thomas Wouters3a584202000-08-05 23:28:51 +000017420for ac_func in gettimeofday
17421do
Martin v. Löwis11437992002-04-12 09:54:03 +000017422as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017423{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17424echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17425if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017426 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017427else
Martin v. Löwis11437992002-04-12 09:54:03 +000017428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017429/* confdefs.h. */
17430_ACEOF
17431cat confdefs.h >>conftest.$ac_ext
17432cat >>conftest.$ac_ext <<_ACEOF
17433/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017434/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17435 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17436#define $ac_func innocuous_$ac_func
17437
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017438/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017439 which can conflict with char $ac_func (); below.
17440 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017441 <limits.h> exists even on freestanding compilers. */
17442
17443#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017444# include <limits.h>
17445#else
17446# include <assert.h>
17447#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017448
17449#undef $ac_func
17450
Martin v. Löwiseba40652007-08-30 20:10:57 +000017451/* Override any GCC internal prototype to avoid an error.
17452 Use char because int might match the return type of a GCC
17453 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017454#ifdef __cplusplus
17455extern "C"
17456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017457char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017458/* The GNU C library defines this for functions which it implements
17459 to always fail with ENOSYS. Some functions are actually named
17460 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017461#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017462choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017463#endif
17464
Skip Montanaro6dead952003-09-25 14:50:04 +000017465int
17466main ()
17467{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017468return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017469 ;
17470 return 0;
17471}
17472_ACEOF
17473rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017474if { (ac_try="$ac_link"
17475case "(($ac_try" in
17476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17477 *) ac_try_echo=$ac_try;;
17478esac
17479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17480 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017482 grep -v '^ *+' conftest.er1 >conftest.err
17483 rm -f conftest.er1
17484 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017486 (exit $ac_status); } && {
17487 test -z "$ac_c_werror_flag" ||
17488 test ! -s conftest.err
17489 } && test -s conftest$ac_exeext &&
17490 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017491 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017492else
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017494sed 's/^/| /' conftest.$ac_ext >&5
17495
Martin v. Löwiseba40652007-08-30 20:10:57 +000017496 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017498
17499rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017500 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017502ac_res=`eval echo '${'$as_ac_var'}'`
17503 { echo "$as_me:$LINENO: result: $ac_res" >&5
17504echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017505if test `eval echo '${'$as_ac_var'}'` = yes; then
17506 cat >>confdefs.h <<_ACEOF
17507#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17508_ACEOF
17509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017510/* confdefs.h. */
17511_ACEOF
17512cat confdefs.h >>conftest.$ac_ext
17513cat >>conftest.$ac_ext <<_ACEOF
17514/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017515#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017516int
17517main ()
17518{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017519gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017520 ;
17521 return 0;
17522}
17523_ACEOF
17524rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017525if { (ac_try="$ac_compile"
17526case "(($ac_try" in
17527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17528 *) ac_try_echo=$ac_try;;
17529esac
17530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17531 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017533 grep -v '^ *+' conftest.er1 >conftest.err
17534 rm -f conftest.er1
17535 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017537 (exit $ac_status); } && {
17538 test -z "$ac_c_werror_flag" ||
17539 test ! -s conftest.err
17540 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000017541 :
17542else
Martin v. Löwis11437992002-04-12 09:54:03 +000017543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017544sed 's/^/| /' conftest.$ac_ext >&5
17545
Martin v. Löwis11437992002-04-12 09:54:03 +000017546
17547cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017548#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017550
Martin v. Löwis11437992002-04-12 09:54:03 +000017551
Guido van Rossum627b2d71993-12-24 10:39:16 +000017552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017553
17554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017555
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017556fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017557done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017558
Michael W. Hudson54241132001-12-07 15:38:26 +000017559
Martin v. Löwiseba40652007-08-30 20:10:57 +000017560{ echo "$as_me:$LINENO: checking for major" >&5
17561echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017562cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017563/* confdefs.h. */
17564_ACEOF
17565cat confdefs.h >>conftest.$ac_ext
17566cat >>conftest.$ac_ext <<_ACEOF
17567/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017568
Neal Norwitz6eb37f02003-02-23 23:28:15 +000017569#if defined(MAJOR_IN_MKDEV)
17570#include <sys/mkdev.h>
17571#elif defined(MAJOR_IN_SYSMACROS)
17572#include <sys/sysmacros.h>
17573#else
17574#include <sys/types.h>
17575#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017576
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017577int
17578main ()
17579{
17580
17581 makedev(major(0),minor(0));
17582
17583 ;
17584 return 0;
17585}
17586_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000017587rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017588if { (ac_try="$ac_link"
17589case "(($ac_try" in
17590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17591 *) ac_try_echo=$ac_try;;
17592esac
17593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17594 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017596 grep -v '^ *+' conftest.er1 >conftest.err
17597 rm -f conftest.er1
17598 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017600 (exit $ac_status); } && {
17601 test -z "$ac_c_werror_flag" ||
17602 test ! -s conftest.err
17603 } && test -s conftest$ac_exeext &&
17604 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017605
17606
17607cat >>confdefs.h <<\_ACEOF
17608#define HAVE_DEVICE_MACROS 1
17609_ACEOF
17610
Martin v. Löwiseba40652007-08-30 20:10:57 +000017611 { echo "$as_me:$LINENO: result: yes" >&5
17612echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017613
17614else
17615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017616sed 's/^/| /' conftest.$ac_ext >&5
17617
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017618
Martin v. Löwiseba40652007-08-30 20:10:57 +000017619 { echo "$as_me:$LINENO: result: no" >&5
17620echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017621
17622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017623
17624rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017625 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017626
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017627# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000017628# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000017629{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
17630echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017631cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017632/* confdefs.h. */
17633_ACEOF
17634cat confdefs.h >>conftest.$ac_ext
17635cat >>conftest.$ac_ext <<_ACEOF
17636/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017637
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017638#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017639#include <sys/socket.h>
17640#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017641#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017642
Martin v. Löwis11437992002-04-12 09:54:03 +000017643int
17644main ()
17645{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017646
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017647getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017648
Martin v. Löwis11437992002-04-12 09:54:03 +000017649 ;
17650 return 0;
17651}
17652_ACEOF
17653rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017654if { (ac_try="$ac_link"
17655case "(($ac_try" in
17656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17657 *) ac_try_echo=$ac_try;;
17658esac
17659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17660 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017662 grep -v '^ *+' conftest.er1 >conftest.err
17663 rm -f conftest.er1
17664 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017666 (exit $ac_status); } && {
17667 test -z "$ac_c_werror_flag" ||
17668 test ! -s conftest.err
17669 } && test -s conftest$ac_exeext &&
17670 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017671
Martin v. Löwiseba40652007-08-30 20:10:57 +000017672{ echo "$as_me:$LINENO: result: yes" >&5
17673echo "${ECHO_T}yes" >&6; }
17674{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
17675echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017676if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017677 { echo "$as_me:$LINENO: result: buggy" >&5
17678echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017679buggygetaddrinfo=yes
17680else
Martin v. Löwis11437992002-04-12 09:54:03 +000017681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017682/* confdefs.h. */
17683_ACEOF
17684cat confdefs.h >>conftest.$ac_ext
17685cat >>conftest.$ac_ext <<_ACEOF
17686/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017687
17688#include <sys/types.h>
17689#include <netdb.h>
17690#include <string.h>
17691#include <sys/socket.h>
17692#include <netinet/in.h>
17693
17694main()
17695{
17696 int passive, gaierr, inet4 = 0, inet6 = 0;
17697 struct addrinfo hints, *ai, *aitop;
17698 char straddr[INET6_ADDRSTRLEN], strport[16];
17699
17700 for (passive = 0; passive <= 1; passive++) {
17701 memset(&hints, 0, sizeof(hints));
17702 hints.ai_family = AF_UNSPEC;
17703 hints.ai_flags = passive ? AI_PASSIVE : 0;
17704 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000017705 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017706 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
17707 (void)gai_strerror(gaierr);
17708 goto bad;
17709 }
17710 for (ai = aitop; ai; ai = ai->ai_next) {
17711 if (ai->ai_addr == NULL ||
17712 ai->ai_addrlen == 0 ||
17713 getnameinfo(ai->ai_addr, ai->ai_addrlen,
17714 straddr, sizeof(straddr), strport, sizeof(strport),
17715 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
17716 goto bad;
17717 }
17718 switch (ai->ai_family) {
17719 case AF_INET:
17720 if (strcmp(strport, "54321") != 0) {
17721 goto bad;
17722 }
17723 if (passive) {
17724 if (strcmp(straddr, "0.0.0.0") != 0) {
17725 goto bad;
17726 }
17727 } else {
17728 if (strcmp(straddr, "127.0.0.1") != 0) {
17729 goto bad;
17730 }
17731 }
17732 inet4++;
17733 break;
17734 case AF_INET6:
17735 if (strcmp(strport, "54321") != 0) {
17736 goto bad;
17737 }
17738 if (passive) {
17739 if (strcmp(straddr, "::") != 0) {
17740 goto bad;
17741 }
17742 } else {
17743 if (strcmp(straddr, "::1") != 0) {
17744 goto bad;
17745 }
17746 }
17747 inet6++;
17748 break;
17749 case AF_UNSPEC:
17750 goto bad;
17751 break;
17752 default:
17753 /* another family support? */
17754 break;
17755 }
17756 }
17757 }
17758
17759 if (!(inet4 == 0 || inet4 == 2))
17760 goto bad;
17761 if (!(inet6 == 0 || inet6 == 2))
17762 goto bad;
17763
17764 if (aitop)
17765 freeaddrinfo(aitop);
17766 exit(0);
17767
17768 bad:
17769 if (aitop)
17770 freeaddrinfo(aitop);
17771 exit(1);
17772}
17773
Martin v. Löwis11437992002-04-12 09:54:03 +000017774_ACEOF
17775rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017776if { (ac_try="$ac_link"
17777case "(($ac_try" in
17778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17779 *) ac_try_echo=$ac_try;;
17780esac
17781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17782 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017783 ac_status=$?
17784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17785 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017786 { (case "(($ac_try" in
17787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17788 *) ac_try_echo=$ac_try;;
17789esac
17790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17791 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017792 ac_status=$?
17793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17794 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017795 { echo "$as_me:$LINENO: result: good" >&5
17796echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017797buggygetaddrinfo=no
17798else
Martin v. Löwis11437992002-04-12 09:54:03 +000017799 echo "$as_me: program exited with status $ac_status" >&5
17800echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017801sed 's/^/| /' conftest.$ac_ext >&5
17802
Martin v. Löwis11437992002-04-12 09:54:03 +000017803( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000017804{ echo "$as_me:$LINENO: result: buggy" >&5
17805echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017806buggygetaddrinfo=yes
17807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017808rm -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 +000017809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017810
17811
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017812else
Martin v. Löwis11437992002-04-12 09:54:03 +000017813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017814sed 's/^/| /' conftest.$ac_ext >&5
17815
Martin v. Löwis11437992002-04-12 09:54:03 +000017816
Martin v. Löwiseba40652007-08-30 20:10:57 +000017817{ echo "$as_me:$LINENO: result: no" >&5
17818echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017819buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017820
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017822
17823rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017825
17826if test "$buggygetaddrinfo" = "yes"; then
17827 if test "$ipv6" = "yes"; then
17828 echo 'Fatal: You must get working getaddrinfo() function.'
17829 echo ' or you can specify "--disable-ipv6"'.
17830 exit 1
17831 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017832else
Martin v. Löwis11437992002-04-12 09:54:03 +000017833
17834cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017835#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017836_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017837
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017839
Jack Jansen9a66b6d2001-08-08 13:56:14 +000017840for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017841do
Martin v. Löwis11437992002-04-12 09:54:03 +000017842as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017843{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17844echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17845if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017846 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017847else
Martin v. Löwis11437992002-04-12 09:54:03 +000017848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017849/* confdefs.h. */
17850_ACEOF
17851cat confdefs.h >>conftest.$ac_ext
17852cat >>conftest.$ac_ext <<_ACEOF
17853/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017854/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17855 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17856#define $ac_func innocuous_$ac_func
17857
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017858/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017859 which can conflict with char $ac_func (); below.
17860 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017861 <limits.h> exists even on freestanding compilers. */
17862
17863#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017864# include <limits.h>
17865#else
17866# include <assert.h>
17867#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017868
17869#undef $ac_func
17870
Martin v. Löwiseba40652007-08-30 20:10:57 +000017871/* Override any GCC internal prototype to avoid an error.
17872 Use char because int might match the return type of a GCC
17873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017874#ifdef __cplusplus
17875extern "C"
17876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017877char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017878/* The GNU C library defines this for functions which it implements
17879 to always fail with ENOSYS. Some functions are actually named
17880 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017881#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017882choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017883#endif
17884
Skip Montanaro6dead952003-09-25 14:50:04 +000017885int
17886main ()
17887{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017888return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017889 ;
17890 return 0;
17891}
17892_ACEOF
17893rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017894if { (ac_try="$ac_link"
17895case "(($ac_try" in
17896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17897 *) ac_try_echo=$ac_try;;
17898esac
17899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17900 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017902 grep -v '^ *+' conftest.er1 >conftest.err
17903 rm -f conftest.er1
17904 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017906 (exit $ac_status); } && {
17907 test -z "$ac_c_werror_flag" ||
17908 test ! -s conftest.err
17909 } && test -s conftest$ac_exeext &&
17910 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017911 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017912else
Martin v. Löwis11437992002-04-12 09:54:03 +000017913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017914sed 's/^/| /' conftest.$ac_ext >&5
17915
Martin v. Löwiseba40652007-08-30 20:10:57 +000017916 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017918
17919rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017920 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017922ac_res=`eval echo '${'$as_ac_var'}'`
17923 { echo "$as_me:$LINENO: result: $ac_res" >&5
17924echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017925if test `eval echo '${'$as_ac_var'}'` = yes; then
17926 cat >>confdefs.h <<_ACEOF
17927#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17928_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017929
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017930fi
17931done
17932
Michael W. Hudson54241132001-12-07 15:38:26 +000017933
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017934# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000017935{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
17936echo $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 +000017937if test "${ac_cv_header_time+set}" = set; then
17938 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017939else
Martin v. Löwis11437992002-04-12 09:54:03 +000017940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017941/* confdefs.h. */
17942_ACEOF
17943cat confdefs.h >>conftest.$ac_ext
17944cat >>conftest.$ac_ext <<_ACEOF
17945/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017946#include <sys/types.h>
17947#include <sys/time.h>
17948#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017949
Martin v. Löwis11437992002-04-12 09:54:03 +000017950int
17951main ()
17952{
17953if ((struct tm *) 0)
17954return 0;
17955 ;
17956 return 0;
17957}
17958_ACEOF
17959rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017960if { (ac_try="$ac_compile"
17961case "(($ac_try" in
17962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17963 *) ac_try_echo=$ac_try;;
17964esac
17965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017968 grep -v '^ *+' conftest.er1 >conftest.err
17969 rm -f conftest.er1
17970 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017972 (exit $ac_status); } && {
17973 test -z "$ac_c_werror_flag" ||
17974 test ! -s conftest.err
17975 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017976 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017977else
Martin v. Löwis11437992002-04-12 09:54:03 +000017978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017979sed 's/^/| /' conftest.$ac_ext >&5
17980
Martin v. Löwiseba40652007-08-30 20:10:57 +000017981 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017983
17984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017986{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
17987echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017988if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017989
17990cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017991#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017992_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017993
17994fi
17995
Martin v. Löwiseba40652007-08-30 20:10:57 +000017996{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
17997echo $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 +000017998if test "${ac_cv_struct_tm+set}" = set; then
17999 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018000else
Martin v. Löwis11437992002-04-12 09:54:03 +000018001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018002/* confdefs.h. */
18003_ACEOF
18004cat confdefs.h >>conftest.$ac_ext
18005cat >>conftest.$ac_ext <<_ACEOF
18006/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018007#include <sys/types.h>
18008#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018009
Martin v. Löwis11437992002-04-12 09:54:03 +000018010int
18011main ()
18012{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018013struct tm tm;
18014 int *p = &tm.tm_sec;
18015 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018016 ;
18017 return 0;
18018}
18019_ACEOF
18020rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018021if { (ac_try="$ac_compile"
18022case "(($ac_try" in
18023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18024 *) ac_try_echo=$ac_try;;
18025esac
18026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18027 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018029 grep -v '^ *+' conftest.er1 >conftest.err
18030 rm -f conftest.er1
18031 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018033 (exit $ac_status); } && {
18034 test -z "$ac_c_werror_flag" ||
18035 test ! -s conftest.err
18036 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018037 ac_cv_struct_tm=time.h
18038else
Martin v. Löwis11437992002-04-12 09:54:03 +000018039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018040sed 's/^/| /' conftest.$ac_ext >&5
18041
Martin v. Löwiseba40652007-08-30 20:10:57 +000018042 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018044
18045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018047{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18048echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018049if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018050
18051cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018052#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018053_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018054
18055fi
18056
Martin v. Löwiseba40652007-08-30 20:10:57 +000018057{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18058echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018059if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18060 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018061else
Martin v. Löwis11437992002-04-12 09:54:03 +000018062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018063/* confdefs.h. */
18064_ACEOF
18065cat confdefs.h >>conftest.$ac_ext
18066cat >>conftest.$ac_ext <<_ACEOF
18067/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018068#include <sys/types.h>
18069#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018070
18071
Martin v. Löwis11437992002-04-12 09:54:03 +000018072int
18073main ()
18074{
18075static struct tm ac_aggr;
18076if (ac_aggr.tm_zone)
18077return 0;
18078 ;
18079 return 0;
18080}
18081_ACEOF
18082rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018083if { (ac_try="$ac_compile"
18084case "(($ac_try" in
18085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18086 *) ac_try_echo=$ac_try;;
18087esac
18088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18089 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018091 grep -v '^ *+' conftest.er1 >conftest.err
18092 rm -f conftest.er1
18093 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018095 (exit $ac_status); } && {
18096 test -z "$ac_c_werror_flag" ||
18097 test ! -s conftest.err
18098 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018099 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018100else
Martin v. Löwis11437992002-04-12 09:54:03 +000018101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018102sed 's/^/| /' conftest.$ac_ext >&5
18103
Martin v. Löwiseba40652007-08-30 20:10:57 +000018104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018105/* confdefs.h. */
18106_ACEOF
18107cat confdefs.h >>conftest.$ac_ext
18108cat >>conftest.$ac_ext <<_ACEOF
18109/* end confdefs.h. */
18110#include <sys/types.h>
18111#include <$ac_cv_struct_tm>
18112
18113
18114int
18115main ()
18116{
18117static struct tm ac_aggr;
18118if (sizeof ac_aggr.tm_zone)
18119return 0;
18120 ;
18121 return 0;
18122}
18123_ACEOF
18124rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018125if { (ac_try="$ac_compile"
18126case "(($ac_try" in
18127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18128 *) ac_try_echo=$ac_try;;
18129esac
18130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18131 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018133 grep -v '^ *+' conftest.er1 >conftest.err
18134 rm -f conftest.er1
18135 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018137 (exit $ac_status); } && {
18138 test -z "$ac_c_werror_flag" ||
18139 test ! -s conftest.err
18140 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018141 ac_cv_member_struct_tm_tm_zone=yes
18142else
18143 echo "$as_me: failed program was:" >&5
18144sed 's/^/| /' conftest.$ac_ext >&5
18145
Martin v. Löwiseba40652007-08-30 20:10:57 +000018146 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018148
18149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018151
18152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018154{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18155echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018156if test $ac_cv_member_struct_tm_tm_zone = yes; then
18157
18158cat >>confdefs.h <<_ACEOF
18159#define HAVE_STRUCT_TM_TM_ZONE 1
18160_ACEOF
18161
18162
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018163fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018164
Martin v. Löwis11437992002-04-12 09:54:03 +000018165if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18166
18167cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018168#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018169_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018170
18171else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018172 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18173echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18174if test "${ac_cv_have_decl_tzname+set}" = set; then
18175 echo $ECHO_N "(cached) $ECHO_C" >&6
18176else
18177 cat >conftest.$ac_ext <<_ACEOF
18178/* confdefs.h. */
18179_ACEOF
18180cat confdefs.h >>conftest.$ac_ext
18181cat >>conftest.$ac_ext <<_ACEOF
18182/* end confdefs.h. */
18183#include <time.h>
18184
18185int
18186main ()
18187{
18188#ifndef tzname
18189 (void) tzname;
18190#endif
18191
18192 ;
18193 return 0;
18194}
18195_ACEOF
18196rm -f conftest.$ac_objext
18197if { (ac_try="$ac_compile"
18198case "(($ac_try" in
18199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18200 *) ac_try_echo=$ac_try;;
18201esac
18202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18203 (eval "$ac_compile") 2>conftest.er1
18204 ac_status=$?
18205 grep -v '^ *+' conftest.er1 >conftest.err
18206 rm -f conftest.er1
18207 cat conftest.err >&5
18208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18209 (exit $ac_status); } && {
18210 test -z "$ac_c_werror_flag" ||
18211 test ! -s conftest.err
18212 } && test -s conftest.$ac_objext; then
18213 ac_cv_have_decl_tzname=yes
18214else
18215 echo "$as_me: failed program was:" >&5
18216sed 's/^/| /' conftest.$ac_ext >&5
18217
18218 ac_cv_have_decl_tzname=no
18219fi
18220
18221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18222fi
18223{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18224echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18225if test $ac_cv_have_decl_tzname = yes; then
18226
18227cat >>confdefs.h <<_ACEOF
18228#define HAVE_DECL_TZNAME 1
18229_ACEOF
18230
18231
18232else
18233 cat >>confdefs.h <<_ACEOF
18234#define HAVE_DECL_TZNAME 0
18235_ACEOF
18236
18237
18238fi
18239
18240
18241 { echo "$as_me:$LINENO: checking for tzname" >&5
18242echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018243if test "${ac_cv_var_tzname+set}" = set; then
18244 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018245else
Martin v. Löwis11437992002-04-12 09:54:03 +000018246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018247/* confdefs.h. */
18248_ACEOF
18249cat confdefs.h >>conftest.$ac_ext
18250cat >>conftest.$ac_ext <<_ACEOF
18251/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018252#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018253#if !HAVE_DECL_TZNAME
18254extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018256
Martin v. Löwis11437992002-04-12 09:54:03 +000018257int
18258main ()
18259{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018260return tzname[0][0];
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018283 ac_cv_var_tzname=yes
18284else
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_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +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
Guido van Rossum627b2d71993-12-24 10:39:16 +000018293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018294{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18295echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018296 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018297
18298cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018299#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018300_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018301
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018302 fi
18303fi
18304
Martin v. Löwiseba40652007-08-30 20:10:57 +000018305{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18306echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018307if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18308 echo $ECHO_N "(cached) $ECHO_C" >&6
18309else
18310 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018311/* confdefs.h. */
18312_ACEOF
18313cat confdefs.h >>conftest.$ac_ext
18314cat >>conftest.$ac_ext <<_ACEOF
18315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018316$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018317int
18318main ()
18319{
18320static struct stat ac_aggr;
18321if (ac_aggr.st_rdev)
18322return 0;
18323 ;
18324 return 0;
18325}
18326_ACEOF
18327rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018328if { (ac_try="$ac_compile"
18329case "(($ac_try" in
18330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18331 *) ac_try_echo=$ac_try;;
18332esac
18333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018336 grep -v '^ *+' conftest.er1 >conftest.err
18337 rm -f conftest.er1
18338 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018340 (exit $ac_status); } && {
18341 test -z "$ac_c_werror_flag" ||
18342 test ! -s conftest.err
18343 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018344 ac_cv_member_struct_stat_st_rdev=yes
18345else
18346 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018347sed 's/^/| /' conftest.$ac_ext >&5
18348
Martin v. Löwiseba40652007-08-30 20:10:57 +000018349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018350/* confdefs.h. */
18351_ACEOF
18352cat confdefs.h >>conftest.$ac_ext
18353cat >>conftest.$ac_ext <<_ACEOF
18354/* end confdefs.h. */
18355$ac_includes_default
18356int
18357main ()
18358{
18359static struct stat ac_aggr;
18360if (sizeof ac_aggr.st_rdev)
18361return 0;
18362 ;
18363 return 0;
18364}
18365_ACEOF
18366rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018367if { (ac_try="$ac_compile"
18368case "(($ac_try" in
18369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18370 *) ac_try_echo=$ac_try;;
18371esac
18372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18373 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018374 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018375 grep -v '^ *+' conftest.er1 >conftest.err
18376 rm -f conftest.er1
18377 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018379 (exit $ac_status); } && {
18380 test -z "$ac_c_werror_flag" ||
18381 test ! -s conftest.err
18382 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018383 ac_cv_member_struct_stat_st_rdev=yes
18384else
18385 echo "$as_me: failed program was:" >&5
18386sed 's/^/| /' conftest.$ac_ext >&5
18387
Martin v. Löwiseba40652007-08-30 20:10:57 +000018388 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018390
18391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018393
18394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018396{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18397echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018398if test $ac_cv_member_struct_stat_st_rdev = yes; then
18399
18400cat >>confdefs.h <<_ACEOF
18401#define HAVE_STRUCT_STAT_ST_RDEV 1
18402_ACEOF
18403
18404
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018405fi
18406
Martin v. Löwiseba40652007-08-30 20:10:57 +000018407{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18408echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018409if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18410 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018411else
Martin v. Löwis11437992002-04-12 09:54:03 +000018412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018413/* confdefs.h. */
18414_ACEOF
18415cat confdefs.h >>conftest.$ac_ext
18416cat >>conftest.$ac_ext <<_ACEOF
18417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018418$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018419int
18420main ()
18421{
18422static struct stat ac_aggr;
18423if (ac_aggr.st_blksize)
18424return 0;
18425 ;
18426 return 0;
18427}
18428_ACEOF
18429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018430if { (ac_try="$ac_compile"
18431case "(($ac_try" in
18432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18433 *) ac_try_echo=$ac_try;;
18434esac
18435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018438 grep -v '^ *+' conftest.er1 >conftest.err
18439 rm -f conftest.er1
18440 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018442 (exit $ac_status); } && {
18443 test -z "$ac_c_werror_flag" ||
18444 test ! -s conftest.err
18445 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018446 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018447else
Martin v. Löwis11437992002-04-12 09:54:03 +000018448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018449sed 's/^/| /' conftest.$ac_ext >&5
18450
Martin v. Löwiseba40652007-08-30 20:10:57 +000018451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018452/* confdefs.h. */
18453_ACEOF
18454cat confdefs.h >>conftest.$ac_ext
18455cat >>conftest.$ac_ext <<_ACEOF
18456/* end confdefs.h. */
18457$ac_includes_default
18458int
18459main ()
18460{
18461static struct stat ac_aggr;
18462if (sizeof ac_aggr.st_blksize)
18463return 0;
18464 ;
18465 return 0;
18466}
18467_ACEOF
18468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018469if { (ac_try="$ac_compile"
18470case "(($ac_try" in
18471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18472 *) ac_try_echo=$ac_try;;
18473esac
18474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18475 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018477 grep -v '^ *+' conftest.er1 >conftest.err
18478 rm -f conftest.er1
18479 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018481 (exit $ac_status); } && {
18482 test -z "$ac_c_werror_flag" ||
18483 test ! -s conftest.err
18484 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018485 ac_cv_member_struct_stat_st_blksize=yes
18486else
18487 echo "$as_me: failed program was:" >&5
18488sed 's/^/| /' conftest.$ac_ext >&5
18489
Martin v. Löwiseba40652007-08-30 20:10:57 +000018490 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018492
18493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018495
18496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018498{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18499echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018500if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018501
Martin v. Löwis11437992002-04-12 09:54:03 +000018502cat >>confdefs.h <<_ACEOF
18503#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18504_ACEOF
18505
18506
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018507fi
18508
Martin v. Löwiseba40652007-08-30 20:10:57 +000018509{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
18510echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018511if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
18512 echo $ECHO_N "(cached) $ECHO_C" >&6
18513else
18514 cat >conftest.$ac_ext <<_ACEOF
18515/* confdefs.h. */
18516_ACEOF
18517cat confdefs.h >>conftest.$ac_ext
18518cat >>conftest.$ac_ext <<_ACEOF
18519/* end confdefs.h. */
18520$ac_includes_default
18521int
18522main ()
18523{
18524static struct stat ac_aggr;
18525if (ac_aggr.st_flags)
18526return 0;
18527 ;
18528 return 0;
18529}
18530_ACEOF
18531rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018532if { (ac_try="$ac_compile"
18533case "(($ac_try" in
18534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18535 *) ac_try_echo=$ac_try;;
18536esac
18537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18538 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018539 ac_status=$?
18540 grep -v '^ *+' conftest.er1 >conftest.err
18541 rm -f conftest.er1
18542 cat conftest.err >&5
18543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018544 (exit $ac_status); } && {
18545 test -z "$ac_c_werror_flag" ||
18546 test ! -s conftest.err
18547 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018548 ac_cv_member_struct_stat_st_flags=yes
18549else
18550 echo "$as_me: failed program was:" >&5
18551sed 's/^/| /' conftest.$ac_ext >&5
18552
Martin v. Löwiseba40652007-08-30 20:10:57 +000018553 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018554/* confdefs.h. */
18555_ACEOF
18556cat confdefs.h >>conftest.$ac_ext
18557cat >>conftest.$ac_ext <<_ACEOF
18558/* end confdefs.h. */
18559$ac_includes_default
18560int
18561main ()
18562{
18563static struct stat ac_aggr;
18564if (sizeof ac_aggr.st_flags)
18565return 0;
18566 ;
18567 return 0;
18568}
18569_ACEOF
18570rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018571if { (ac_try="$ac_compile"
18572case "(($ac_try" in
18573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18574 *) ac_try_echo=$ac_try;;
18575esac
18576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18577 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018578 ac_status=$?
18579 grep -v '^ *+' conftest.er1 >conftest.err
18580 rm -f conftest.er1
18581 cat conftest.err >&5
18582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018583 (exit $ac_status); } && {
18584 test -z "$ac_c_werror_flag" ||
18585 test ! -s conftest.err
18586 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018587 ac_cv_member_struct_stat_st_flags=yes
18588else
18589 echo "$as_me: failed program was:" >&5
18590sed 's/^/| /' conftest.$ac_ext >&5
18591
Martin v. Löwiseba40652007-08-30 20:10:57 +000018592 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018594
18595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018597
18598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018600{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
18601echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018602if test $ac_cv_member_struct_stat_st_flags = yes; then
18603
18604cat >>confdefs.h <<_ACEOF
18605#define HAVE_STRUCT_STAT_ST_FLAGS 1
18606_ACEOF
18607
18608
18609fi
18610
Martin v. Löwiseba40652007-08-30 20:10:57 +000018611{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
18612echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018613if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
18614 echo $ECHO_N "(cached) $ECHO_C" >&6
18615else
18616 cat >conftest.$ac_ext <<_ACEOF
18617/* confdefs.h. */
18618_ACEOF
18619cat confdefs.h >>conftest.$ac_ext
18620cat >>conftest.$ac_ext <<_ACEOF
18621/* end confdefs.h. */
18622$ac_includes_default
18623int
18624main ()
18625{
18626static struct stat ac_aggr;
18627if (ac_aggr.st_gen)
18628return 0;
18629 ;
18630 return 0;
18631}
18632_ACEOF
18633rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018634if { (ac_try="$ac_compile"
18635case "(($ac_try" in
18636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18637 *) ac_try_echo=$ac_try;;
18638esac
18639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18640 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018641 ac_status=$?
18642 grep -v '^ *+' conftest.er1 >conftest.err
18643 rm -f conftest.er1
18644 cat conftest.err >&5
18645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018646 (exit $ac_status); } && {
18647 test -z "$ac_c_werror_flag" ||
18648 test ! -s conftest.err
18649 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018650 ac_cv_member_struct_stat_st_gen=yes
18651else
18652 echo "$as_me: failed program was:" >&5
18653sed 's/^/| /' conftest.$ac_ext >&5
18654
Martin v. Löwiseba40652007-08-30 20:10:57 +000018655 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018656/* confdefs.h. */
18657_ACEOF
18658cat confdefs.h >>conftest.$ac_ext
18659cat >>conftest.$ac_ext <<_ACEOF
18660/* end confdefs.h. */
18661$ac_includes_default
18662int
18663main ()
18664{
18665static struct stat ac_aggr;
18666if (sizeof ac_aggr.st_gen)
18667return 0;
18668 ;
18669 return 0;
18670}
18671_ACEOF
18672rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018673if { (ac_try="$ac_compile"
18674case "(($ac_try" in
18675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18676 *) ac_try_echo=$ac_try;;
18677esac
18678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018680 ac_status=$?
18681 grep -v '^ *+' conftest.er1 >conftest.err
18682 rm -f conftest.er1
18683 cat conftest.err >&5
18684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018685 (exit $ac_status); } && {
18686 test -z "$ac_c_werror_flag" ||
18687 test ! -s conftest.err
18688 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018689 ac_cv_member_struct_stat_st_gen=yes
18690else
18691 echo "$as_me: failed program was:" >&5
18692sed 's/^/| /' conftest.$ac_ext >&5
18693
Martin v. Löwiseba40652007-08-30 20:10:57 +000018694 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018696
18697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018699
18700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018702{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
18703echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018704if test $ac_cv_member_struct_stat_st_gen = yes; then
18705
18706cat >>confdefs.h <<_ACEOF
18707#define HAVE_STRUCT_STAT_ST_GEN 1
18708_ACEOF
18709
18710
18711fi
18712
Martin v. Löwiseba40652007-08-30 20:10:57 +000018713{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
18714echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018715if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
18716 echo $ECHO_N "(cached) $ECHO_C" >&6
18717else
18718 cat >conftest.$ac_ext <<_ACEOF
18719/* confdefs.h. */
18720_ACEOF
18721cat confdefs.h >>conftest.$ac_ext
18722cat >>conftest.$ac_ext <<_ACEOF
18723/* end confdefs.h. */
18724$ac_includes_default
18725int
18726main ()
18727{
18728static struct stat ac_aggr;
18729if (ac_aggr.st_birthtime)
18730return 0;
18731 ;
18732 return 0;
18733}
18734_ACEOF
18735rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018736if { (ac_try="$ac_compile"
18737case "(($ac_try" in
18738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18739 *) ac_try_echo=$ac_try;;
18740esac
18741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018743 ac_status=$?
18744 grep -v '^ *+' conftest.er1 >conftest.err
18745 rm -f conftest.er1
18746 cat conftest.err >&5
18747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018748 (exit $ac_status); } && {
18749 test -z "$ac_c_werror_flag" ||
18750 test ! -s conftest.err
18751 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018752 ac_cv_member_struct_stat_st_birthtime=yes
18753else
18754 echo "$as_me: failed program was:" >&5
18755sed 's/^/| /' conftest.$ac_ext >&5
18756
Martin v. Löwiseba40652007-08-30 20:10:57 +000018757 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018758/* confdefs.h. */
18759_ACEOF
18760cat confdefs.h >>conftest.$ac_ext
18761cat >>conftest.$ac_ext <<_ACEOF
18762/* end confdefs.h. */
18763$ac_includes_default
18764int
18765main ()
18766{
18767static struct stat ac_aggr;
18768if (sizeof ac_aggr.st_birthtime)
18769return 0;
18770 ;
18771 return 0;
18772}
18773_ACEOF
18774rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018775if { (ac_try="$ac_compile"
18776case "(($ac_try" in
18777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18778 *) ac_try_echo=$ac_try;;
18779esac
18780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018782 ac_status=$?
18783 grep -v '^ *+' conftest.er1 >conftest.err
18784 rm -f conftest.er1
18785 cat conftest.err >&5
18786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018787 (exit $ac_status); } && {
18788 test -z "$ac_c_werror_flag" ||
18789 test ! -s conftest.err
18790 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018791 ac_cv_member_struct_stat_st_birthtime=yes
18792else
18793 echo "$as_me: failed program was:" >&5
18794sed 's/^/| /' conftest.$ac_ext >&5
18795
Martin v. Löwiseba40652007-08-30 20:10:57 +000018796 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018798
18799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018801
18802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018804{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
18805echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018806if test $ac_cv_member_struct_stat_st_birthtime = yes; then
18807
18808cat >>confdefs.h <<_ACEOF
18809#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
18810_ACEOF
18811
18812
18813fi
18814
Martin v. Löwiseba40652007-08-30 20:10:57 +000018815{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
18816echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018817if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
18818 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018819else
Martin v. Löwis11437992002-04-12 09:54:03 +000018820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018821/* confdefs.h. */
18822_ACEOF
18823cat confdefs.h >>conftest.$ac_ext
18824cat >>conftest.$ac_ext <<_ACEOF
18825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018826$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018827int
18828main ()
18829{
18830static struct stat ac_aggr;
18831if (ac_aggr.st_blocks)
18832return 0;
18833 ;
18834 return 0;
18835}
18836_ACEOF
18837rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018838if { (ac_try="$ac_compile"
18839case "(($ac_try" in
18840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18841 *) ac_try_echo=$ac_try;;
18842esac
18843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018846 grep -v '^ *+' conftest.er1 >conftest.err
18847 rm -f conftest.er1
18848 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018850 (exit $ac_status); } && {
18851 test -z "$ac_c_werror_flag" ||
18852 test ! -s conftest.err
18853 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018854 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018855else
Martin v. Löwis11437992002-04-12 09:54:03 +000018856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018857sed 's/^/| /' conftest.$ac_ext >&5
18858
Martin v. Löwiseba40652007-08-30 20:10:57 +000018859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018860/* confdefs.h. */
18861_ACEOF
18862cat confdefs.h >>conftest.$ac_ext
18863cat >>conftest.$ac_ext <<_ACEOF
18864/* end confdefs.h. */
18865$ac_includes_default
18866int
18867main ()
18868{
18869static struct stat ac_aggr;
18870if (sizeof ac_aggr.st_blocks)
18871return 0;
18872 ;
18873 return 0;
18874}
18875_ACEOF
18876rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018877if { (ac_try="$ac_compile"
18878case "(($ac_try" in
18879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18880 *) ac_try_echo=$ac_try;;
18881esac
18882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18883 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018885 grep -v '^ *+' conftest.er1 >conftest.err
18886 rm -f conftest.er1
18887 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018889 (exit $ac_status); } && {
18890 test -z "$ac_c_werror_flag" ||
18891 test ! -s conftest.err
18892 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018893 ac_cv_member_struct_stat_st_blocks=yes
18894else
18895 echo "$as_me: failed program was:" >&5
18896sed 's/^/| /' conftest.$ac_ext >&5
18897
Martin v. Löwiseba40652007-08-30 20:10:57 +000018898 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018900
18901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018903
18904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018906{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
18907echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018908if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018909
Martin v. Löwis11437992002-04-12 09:54:03 +000018910cat >>confdefs.h <<_ACEOF
18911#define HAVE_STRUCT_STAT_ST_BLOCKS 1
18912_ACEOF
18913
18914
18915cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018916#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018917_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018918
18919else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018920 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018921 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018922 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
18923 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018924esac
18925
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018926fi
18927
Michael W. Hudson54241132001-12-07 15:38:26 +000018928
Martin v. Löwis11437992002-04-12 09:54:03 +000018929
Martin v. Löwiseba40652007-08-30 20:10:57 +000018930{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
18931echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018932if test "${ac_cv_header_time_altzone+set}" = set; then
18933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018934else
Martin v. Löwis11437992002-04-12 09:54:03 +000018935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018936/* confdefs.h. */
18937_ACEOF
18938cat confdefs.h >>conftest.$ac_ext
18939cat >>conftest.$ac_ext <<_ACEOF
18940/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018941#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018942int
18943main ()
18944{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018945return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000018946 ;
18947 return 0;
18948}
18949_ACEOF
18950rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018951if { (ac_try="$ac_compile"
18952case "(($ac_try" in
18953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18954 *) ac_try_echo=$ac_try;;
18955esac
18956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018959 grep -v '^ *+' conftest.er1 >conftest.err
18960 rm -f conftest.er1
18961 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018963 (exit $ac_status); } && {
18964 test -z "$ac_c_werror_flag" ||
18965 test ! -s conftest.err
18966 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018967 ac_cv_header_time_altzone=yes
18968else
Martin v. Löwis11437992002-04-12 09:54:03 +000018969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018970sed 's/^/| /' conftest.$ac_ext >&5
18971
Martin v. Löwiseba40652007-08-30 20:10:57 +000018972 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018973fi
18974
Martin v. Löwiseba40652007-08-30 20:10:57 +000018975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18976fi
18977
18978{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
18979echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018980if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018981
18982cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018983#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018984_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018985
18986fi
18987
Guido van Rossumda88dad1995-01-26 00:46:29 +000018988was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000018989{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
18990echo $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 +000018991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018992/* confdefs.h. */
18993_ACEOF
18994cat confdefs.h >>conftest.$ac_ext
18995cat >>conftest.$ac_ext <<_ACEOF
18996/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018997
18998#include <sys/types.h>
18999#include <sys/select.h>
19000#include <sys/time.h>
19001
Martin v. Löwis11437992002-04-12 09:54:03 +000019002int
19003main ()
19004{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019005;
Martin v. Löwis11437992002-04-12 09:54:03 +000019006 ;
19007 return 0;
19008}
19009_ACEOF
19010rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019011if { (ac_try="$ac_compile"
19012case "(($ac_try" in
19013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19014 *) ac_try_echo=$ac_try;;
19015esac
19016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019019 grep -v '^ *+' conftest.er1 >conftest.err
19020 rm -f conftest.er1
19021 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019023 (exit $ac_status); } && {
19024 test -z "$ac_c_werror_flag" ||
19025 test ! -s conftest.err
19026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019027
19028
19029cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019030#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019031_ACEOF
19032
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019033 was_it_defined=yes
19034
Guido van Rossumf78abae1997-01-21 22:02:36 +000019035else
Martin v. Löwis11437992002-04-12 09:54:03 +000019036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019037sed 's/^/| /' conftest.$ac_ext >&5
19038
Brett Cannon19fab762007-06-02 03:02:29 +000019039
Martin v. Löwiseba40652007-08-30 20:10:57 +000019040fi
19041
19042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19043{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19044echo "${ECHO_T}$was_it_defined" >&6; }
19045
19046{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19047echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019048if test "${ac_cv_struct_addrinfo+set}" = set; then
19049 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019050else
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019052/* confdefs.h. */
19053_ACEOF
19054cat confdefs.h >>conftest.$ac_ext
19055cat >>conftest.$ac_ext <<_ACEOF
19056/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019057
19058# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019059int
19060main ()
19061{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019062struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019063 ;
19064 return 0;
19065}
19066_ACEOF
19067rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019068if { (ac_try="$ac_compile"
19069case "(($ac_try" in
19070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19071 *) ac_try_echo=$ac_try;;
19072esac
19073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019076 grep -v '^ *+' conftest.er1 >conftest.err
19077 rm -f conftest.er1
19078 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019080 (exit $ac_status); } && {
19081 test -z "$ac_c_werror_flag" ||
19082 test ! -s conftest.err
19083 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019084 ac_cv_struct_addrinfo=yes
19085else
Martin v. Löwis11437992002-04-12 09:54:03 +000019086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019087sed 's/^/| /' conftest.$ac_ext >&5
19088
Martin v. Löwiseba40652007-08-30 20:10:57 +000019089 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019090fi
19091
Martin v. Löwiseba40652007-08-30 20:10:57 +000019092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19093fi
19094
19095{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19096echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019097if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019098
19099cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019100#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019101_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019102
19103fi
19104
Martin v. Löwiseba40652007-08-30 20:10:57 +000019105{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19106echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019107if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19108 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019109else
Martin v. Löwis11437992002-04-12 09:54:03 +000019110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019111/* confdefs.h. */
19112_ACEOF
19113cat confdefs.h >>conftest.$ac_ext
19114cat >>conftest.$ac_ext <<_ACEOF
19115/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019116
19117# include <sys/types.h>
19118# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019119int
19120main ()
19121{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019122struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019123 ;
19124 return 0;
19125}
19126_ACEOF
19127rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019128if { (ac_try="$ac_compile"
19129case "(($ac_try" in
19130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19131 *) ac_try_echo=$ac_try;;
19132esac
19133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019136 grep -v '^ *+' conftest.er1 >conftest.err
19137 rm -f conftest.er1
19138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019140 (exit $ac_status); } && {
19141 test -z "$ac_c_werror_flag" ||
19142 test ! -s conftest.err
19143 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019144 ac_cv_struct_sockaddr_storage=yes
19145else
Martin v. Löwis11437992002-04-12 09:54:03 +000019146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019147sed 's/^/| /' conftest.$ac_ext >&5
19148
Martin v. Löwiseba40652007-08-30 20:10:57 +000019149 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019150fi
19151
Martin v. Löwiseba40652007-08-30 20:10:57 +000019152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19153fi
19154
19155{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19156echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019157if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019158
19159cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019160#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019161_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019162
19163fi
19164
Guido van Rossum627b2d71993-12-24 10:39:16 +000019165# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019166
Michael W. Hudson54241132001-12-07 15:38:26 +000019167
Martin v. Löwiseba40652007-08-30 20:10:57 +000019168{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19169echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019170if test "${ac_cv_c_char_unsigned+set}" = set; then
19171 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019172else
Martin v. Löwis11437992002-04-12 09:54:03 +000019173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019174/* confdefs.h. */
19175_ACEOF
19176cat confdefs.h >>conftest.$ac_ext
19177cat >>conftest.$ac_ext <<_ACEOF
19178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019179$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019180int
19181main ()
19182{
19183static int test_array [1 - 2 * !(((char) -1) < 0)];
19184test_array [0] = 0
19185
19186 ;
19187 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019188}
Martin v. Löwis11437992002-04-12 09:54:03 +000019189_ACEOF
19190rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019191if { (ac_try="$ac_compile"
19192case "(($ac_try" in
19193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19194 *) ac_try_echo=$ac_try;;
19195esac
19196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019199 grep -v '^ *+' conftest.er1 >conftest.err
19200 rm -f conftest.er1
19201 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019203 (exit $ac_status); } && {
19204 test -z "$ac_c_werror_flag" ||
19205 test ! -s conftest.err
19206 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019207 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019208else
19209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019210sed 's/^/| /' conftest.$ac_ext >&5
19211
Martin v. Löwiseba40652007-08-30 20:10:57 +000019212 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019214
19215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019217{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19218echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019219if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019220 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019221#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019222_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019223
19224fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019225
Martin v. Löwiseba40652007-08-30 20:10:57 +000019226{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19227echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019228if test "${ac_cv_c_const+set}" = set; then
19229 echo $ECHO_N "(cached) $ECHO_C" >&6
19230else
19231 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019232/* confdefs.h. */
19233_ACEOF
19234cat confdefs.h >>conftest.$ac_ext
19235cat >>conftest.$ac_ext <<_ACEOF
19236/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019237
Martin v. Löwis11437992002-04-12 09:54:03 +000019238int
19239main ()
19240{
19241/* FIXME: Include the comments suggested by Paul. */
19242#ifndef __cplusplus
19243 /* Ultrix mips cc rejects this. */
19244 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019245 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019246 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019247 char const *const *pcpcc;
19248 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019249 /* NEC SVR4.0.2 mips cc rejects this. */
19250 struct point {int x, y;};
19251 static struct point const zero = {0,0};
19252 /* AIX XL C 1.02.0.0 rejects this.
19253 It does not let you subtract one const X* pointer from another in
19254 an arm of an if-expression whose if-part is not a constant
19255 expression */
19256 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019257 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019258 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019259 ++pcpcc;
19260 ppc = (char**) pcpcc;
19261 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019262 { /* SCO 3.2v4 cc rejects this. */
19263 char *t;
19264 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019265
Martin v. Löwis11437992002-04-12 09:54:03 +000019266 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019267 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019268 }
19269 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19270 int x[] = {25, 17};
19271 const int *foo = &x[0];
19272 ++foo;
19273 }
19274 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19275 typedef const int *iptr;
19276 iptr p = 0;
19277 ++p;
19278 }
19279 { /* AIX XL C 1.02.0.0 rejects this saying
19280 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19281 struct s { int j; const int *ap[3]; };
19282 struct s *b; b->j = 5;
19283 }
19284 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19285 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019286 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019287 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019288 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019289#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019290
Martin v. Löwis11437992002-04-12 09:54:03 +000019291 ;
19292 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019293}
Martin v. Löwis11437992002-04-12 09:54:03 +000019294_ACEOF
19295rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019296if { (ac_try="$ac_compile"
19297case "(($ac_try" in
19298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19299 *) ac_try_echo=$ac_try;;
19300esac
19301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19302 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019304 grep -v '^ *+' conftest.er1 >conftest.err
19305 rm -f conftest.er1
19306 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019308 (exit $ac_status); } && {
19309 test -z "$ac_c_werror_flag" ||
19310 test ! -s conftest.err
19311 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019312 ac_cv_c_const=yes
19313else
Martin v. Löwis11437992002-04-12 09:54:03 +000019314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019315sed 's/^/| /' conftest.$ac_ext >&5
19316
Martin v. Löwiseba40652007-08-30 20:10:57 +000019317 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019319
19320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019322{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19323echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019324if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019325
19326cat >>confdefs.h <<\_ACEOF
19327#define const
19328_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019329
19330fi
19331
Michael W. Hudson54241132001-12-07 15:38:26 +000019332
Guido van Rossumda88dad1995-01-26 00:46:29 +000019333works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019334{ echo "$as_me:$LINENO: checking for working volatile" >&5
19335echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019336cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019337/* confdefs.h. */
19338_ACEOF
19339cat confdefs.h >>conftest.$ac_ext
19340cat >>conftest.$ac_ext <<_ACEOF
19341/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019342
Martin v. Löwis11437992002-04-12 09:54:03 +000019343int
19344main ()
19345{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019346volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019347 ;
19348 return 0;
19349}
19350_ACEOF
19351rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019352if { (ac_try="$ac_compile"
19353case "(($ac_try" in
19354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19355 *) ac_try_echo=$ac_try;;
19356esac
19357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19358 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019360 grep -v '^ *+' conftest.er1 >conftest.err
19361 rm -f conftest.er1
19362 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019364 (exit $ac_status); } && {
19365 test -z "$ac_c_werror_flag" ||
19366 test ! -s conftest.err
19367 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019368 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019369else
Martin v. Löwis11437992002-04-12 09:54:03 +000019370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019371sed 's/^/| /' conftest.$ac_ext >&5
19372
Martin v. Löwis11437992002-04-12 09:54:03 +000019373
19374cat >>confdefs.h <<\_ACEOF
19375#define volatile
19376_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019377
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019378
Guido van Rossum627b2d71993-12-24 10:39:16 +000019379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019380
19381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19382{ echo "$as_me:$LINENO: result: $works" >&5
19383echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019384
Guido van Rossumda88dad1995-01-26 00:46:29 +000019385works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019386{ echo "$as_me:$LINENO: checking for working signed char" >&5
19387echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019389/* confdefs.h. */
19390_ACEOF
19391cat confdefs.h >>conftest.$ac_ext
19392cat >>conftest.$ac_ext <<_ACEOF
19393/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019394
Martin v. Löwis11437992002-04-12 09:54:03 +000019395int
19396main ()
19397{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019398signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019399 ;
19400 return 0;
19401}
19402_ACEOF
19403rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019404if { (ac_try="$ac_compile"
19405case "(($ac_try" in
19406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19407 *) ac_try_echo=$ac_try;;
19408esac
19409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019412 grep -v '^ *+' conftest.er1 >conftest.err
19413 rm -f conftest.er1
19414 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019416 (exit $ac_status); } && {
19417 test -z "$ac_c_werror_flag" ||
19418 test ! -s conftest.err
19419 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019420 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019421else
Martin v. Löwis11437992002-04-12 09:54:03 +000019422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019423sed 's/^/| /' conftest.$ac_ext >&5
19424
Martin v. Löwis11437992002-04-12 09:54:03 +000019425
19426cat >>confdefs.h <<\_ACEOF
19427#define signed
19428_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019429
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019430
Guido van Rossum7f43da71994-08-01 12:15:30 +000019431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019432
19433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19434{ echo "$as_me:$LINENO: result: $works" >&5
19435echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019436
Guido van Rossumda88dad1995-01-26 00:46:29 +000019437have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019438{ echo "$as_me:$LINENO: checking for prototypes" >&5
19439echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019440cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019441/* confdefs.h. */
19442_ACEOF
19443cat confdefs.h >>conftest.$ac_ext
19444cat >>conftest.$ac_ext <<_ACEOF
19445/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019446int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019447int
19448main ()
19449{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019450return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019451 ;
19452 return 0;
19453}
19454_ACEOF
19455rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019456if { (ac_try="$ac_compile"
19457case "(($ac_try" in
19458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19459 *) ac_try_echo=$ac_try;;
19460esac
19461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19462 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019464 grep -v '^ *+' conftest.er1 >conftest.err
19465 rm -f conftest.er1
19466 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019468 (exit $ac_status); } && {
19469 test -z "$ac_c_werror_flag" ||
19470 test ! -s conftest.err
19471 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019472
19473
19474cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019475#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019476_ACEOF
19477
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019478 have_prototypes=yes
19479
Guido van Rossumf78abae1997-01-21 22:02:36 +000019480else
Martin v. Löwis11437992002-04-12 09:54:03 +000019481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019482sed 's/^/| /' conftest.$ac_ext >&5
19483
Martin v. Löwiseba40652007-08-30 20:10:57 +000019484
Guido van Rossum7f43da71994-08-01 12:15:30 +000019485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019486
19487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19488{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
19489echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019490
Guido van Rossumda88dad1995-01-26 00:46:29 +000019491works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019492{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19493echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019494cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019495/* confdefs.h. */
19496_ACEOF
19497cat confdefs.h >>conftest.$ac_ext
19498cat >>conftest.$ac_ext <<_ACEOF
19499/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019500
19501#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019502int foo(int x, ...) {
19503 va_list va;
19504 va_start(va, x);
19505 va_arg(va, int);
19506 va_arg(va, char *);
19507 va_arg(va, double);
19508 return 0;
19509}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019510
Martin v. Löwis11437992002-04-12 09:54:03 +000019511int
19512main ()
19513{
Guido van Rossum90eea071996-08-30 20:58:57 +000019514return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019515 ;
19516 return 0;
19517}
19518_ACEOF
19519rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019520if { (ac_try="$ac_compile"
19521case "(($ac_try" in
19522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19523 *) ac_try_echo=$ac_try;;
19524esac
19525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19526 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019528 grep -v '^ *+' conftest.er1 >conftest.err
19529 rm -f conftest.er1
19530 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019532 (exit $ac_status); } && {
19533 test -z "$ac_c_werror_flag" ||
19534 test ! -s conftest.err
19535 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019536
19537
19538cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019539#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019540_ACEOF
19541
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019542 works=yes
19543
Guido van Rossumf78abae1997-01-21 22:02:36 +000019544else
Martin v. Löwis11437992002-04-12 09:54:03 +000019545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019546sed 's/^/| /' conftest.$ac_ext >&5
19547
Martin v. Löwiseba40652007-08-30 20:10:57 +000019548
Guido van Rossum627b2d71993-12-24 10:39:16 +000019549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019550
19551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19552{ echo "$as_me:$LINENO: result: $works" >&5
19553echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019554
Martin v. Löwisd6320502004-08-12 13:45:08 +000019555# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000019556{ echo "$as_me:$LINENO: checking for socketpair" >&5
19557echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019558cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000019559/* confdefs.h. */
19560_ACEOF
19561cat confdefs.h >>conftest.$ac_ext
19562cat >>conftest.$ac_ext <<_ACEOF
19563/* end confdefs.h. */
19564
19565#include <sys/types.h>
19566#include <sys/socket.h>
19567
19568int
19569main ()
19570{
19571void *x=socketpair
19572 ;
19573 return 0;
19574}
19575_ACEOF
19576rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019577if { (ac_try="$ac_compile"
19578case "(($ac_try" in
19579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19580 *) ac_try_echo=$ac_try;;
19581esac
19582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19583 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000019584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019585 grep -v '^ *+' conftest.er1 >conftest.err
19586 rm -f conftest.er1
19587 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000019588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019589 (exit $ac_status); } && {
19590 test -z "$ac_c_werror_flag" ||
19591 test ! -s conftest.err
19592 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000019593
19594cat >>confdefs.h <<\_ACEOF
19595#define HAVE_SOCKETPAIR 1
19596_ACEOF
19597
Martin v. Löwiseba40652007-08-30 20:10:57 +000019598 { echo "$as_me:$LINENO: result: yes" >&5
19599echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019600else
19601 echo "$as_me: failed program was:" >&5
19602sed 's/^/| /' conftest.$ac_ext >&5
19603
Martin v. Löwiseba40652007-08-30 20:10:57 +000019604 { echo "$as_me:$LINENO: result: no" >&5
19605echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019606
19607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019608
19609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000019610
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019611# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000019612{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
19613echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019615/* confdefs.h. */
19616_ACEOF
19617cat confdefs.h >>conftest.$ac_ext
19618cat >>conftest.$ac_ext <<_ACEOF
19619/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019620#include <sys/types.h>
19621#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019622int
19623main ()
19624{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019625struct sockaddr x;
19626x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019627 ;
19628 return 0;
19629}
19630_ACEOF
19631rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019632if { (ac_try="$ac_compile"
19633case "(($ac_try" in
19634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19635 *) ac_try_echo=$ac_try;;
19636esac
19637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019640 grep -v '^ *+' conftest.er1 >conftest.err
19641 rm -f conftest.er1
19642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019644 (exit $ac_status); } && {
19645 test -z "$ac_c_werror_flag" ||
19646 test ! -s conftest.err
19647 } && test -s conftest.$ac_objext; then
19648 { echo "$as_me:$LINENO: result: yes" >&5
19649echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019650
19651cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019652#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019653_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019654
19655else
Martin v. Löwis11437992002-04-12 09:54:03 +000019656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019657sed 's/^/| /' conftest.$ac_ext >&5
19658
Martin v. Löwiseba40652007-08-30 20:10:57 +000019659 { echo "$as_me:$LINENO: result: no" >&5
19660echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019662
19663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019664
Guido van Rossumda88dad1995-01-26 00:46:29 +000019665va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019666{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
19667echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019668cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019669/* confdefs.h. */
19670_ACEOF
19671cat confdefs.h >>conftest.$ac_ext
19672cat >>conftest.$ac_ext <<_ACEOF
19673/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019674
19675#ifdef HAVE_STDARG_PROTOTYPES
19676#include <stdarg.h>
19677#else
19678#include <varargs.h>
19679#endif
19680
Martin v. Löwis11437992002-04-12 09:54:03 +000019681int
19682main ()
19683{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019684va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000019685 ;
19686 return 0;
19687}
19688_ACEOF
19689rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019690if { (ac_try="$ac_compile"
19691case "(($ac_try" in
19692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19693 *) ac_try_echo=$ac_try;;
19694esac
19695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019698 grep -v '^ *+' conftest.er1 >conftest.err
19699 rm -f conftest.er1
19700 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019702 (exit $ac_status); } && {
19703 test -z "$ac_c_werror_flag" ||
19704 test ! -s conftest.err
19705 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019706 :
19707else
Martin v. Löwis11437992002-04-12 09:54:03 +000019708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019709sed 's/^/| /' conftest.$ac_ext >&5
19710
Martin v. Löwis11437992002-04-12 09:54:03 +000019711
19712
19713cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019714#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019715_ACEOF
19716
Guido van Rossumda88dad1995-01-26 00:46:29 +000019717 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019718
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019720
19721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19722{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
19723echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019724
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019725# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000019726
19727
19728
Martin v. Löwiseba40652007-08-30 20:10:57 +000019729{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
19730echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019731if test "${ac_cv_func_gethostbyname_r+set}" = set; then
19732 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019733else
Martin v. Löwis11437992002-04-12 09:54:03 +000019734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019735/* confdefs.h. */
19736_ACEOF
19737cat confdefs.h >>conftest.$ac_ext
19738cat >>conftest.$ac_ext <<_ACEOF
19739/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019740/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
19741 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19742#define gethostbyname_r innocuous_gethostbyname_r
19743
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019744/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019745 which can conflict with char gethostbyname_r (); below.
19746 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019747 <limits.h> exists even on freestanding compilers. */
19748
19749#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019750# include <limits.h>
19751#else
19752# include <assert.h>
19753#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019754
19755#undef gethostbyname_r
19756
Martin v. Löwiseba40652007-08-30 20:10:57 +000019757/* Override any GCC internal prototype to avoid an error.
19758 Use char because int might match the return type of a GCC
19759 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019760#ifdef __cplusplus
19761extern "C"
19762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019763char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019764/* The GNU C library defines this for functions which it implements
19765 to always fail with ENOSYS. Some functions are actually named
19766 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019767#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019768choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019769#endif
19770
Skip Montanaro6dead952003-09-25 14:50:04 +000019771int
19772main ()
19773{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019774return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019775 ;
19776 return 0;
19777}
19778_ACEOF
19779rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019780if { (ac_try="$ac_link"
19781case "(($ac_try" in
19782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19783 *) ac_try_echo=$ac_try;;
19784esac
19785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19786 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019788 grep -v '^ *+' conftest.er1 >conftest.err
19789 rm -f conftest.er1
19790 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019792 (exit $ac_status); } && {
19793 test -z "$ac_c_werror_flag" ||
19794 test ! -s conftest.err
19795 } && test -s conftest$ac_exeext &&
19796 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019797 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019798else
Martin v. Löwis11437992002-04-12 09:54:03 +000019799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019800sed 's/^/| /' conftest.$ac_ext >&5
19801
Martin v. Löwiseba40652007-08-30 20:10:57 +000019802 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019804
19805rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019806 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019808{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
19809echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019810if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019811
Martin v. Löwis11437992002-04-12 09:54:03 +000019812 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019813#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019814_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019815
Martin v. Löwiseba40652007-08-30 20:10:57 +000019816 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
19817echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019818 OLD_CFLAGS=$CFLAGS
19819 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019821/* confdefs.h. */
19822_ACEOF
19823cat confdefs.h >>conftest.$ac_ext
19824cat >>conftest.$ac_ext <<_ACEOF
19825/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019826
19827# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019828
Martin v. Löwis11437992002-04-12 09:54:03 +000019829int
19830main ()
19831{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019832
19833 char *name;
19834 struct hostent *he, *res;
19835 char buffer[2048];
19836 int buflen = 2048;
19837 int h_errnop;
19838
19839 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019840
19841 ;
19842 return 0;
19843}
19844_ACEOF
19845rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019846if { (ac_try="$ac_compile"
19847case "(($ac_try" in
19848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19849 *) ac_try_echo=$ac_try;;
19850esac
19851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19852 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019854 grep -v '^ *+' conftest.er1 >conftest.err
19855 rm -f conftest.er1
19856 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019858 (exit $ac_status); } && {
19859 test -z "$ac_c_werror_flag" ||
19860 test ! -s conftest.err
19861 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019862
19863 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019864#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019865_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019866
Martin v. Löwis11437992002-04-12 09:54:03 +000019867
19868cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019869#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019870_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019871
Martin v. Löwiseba40652007-08-30 20:10:57 +000019872 { echo "$as_me:$LINENO: result: yes" >&5
19873echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019874
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019875else
Martin v. Löwis11437992002-04-12 09:54:03 +000019876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019877sed 's/^/| /' conftest.$ac_ext >&5
19878
Martin v. Löwis11437992002-04-12 09:54:03 +000019879
Martin v. Löwiseba40652007-08-30 20:10:57 +000019880 { echo "$as_me:$LINENO: result: no" >&5
19881echo "${ECHO_T}no" >&6; }
19882 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
19883echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019885/* confdefs.h. */
19886_ACEOF
19887cat confdefs.h >>conftest.$ac_ext
19888cat >>conftest.$ac_ext <<_ACEOF
19889/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019890
19891# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019892
Martin v. Löwis11437992002-04-12 09:54:03 +000019893int
19894main ()
19895{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019896
19897 char *name;
19898 struct hostent *he;
19899 char buffer[2048];
19900 int buflen = 2048;
19901 int h_errnop;
19902
19903 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019904
19905 ;
19906 return 0;
19907}
19908_ACEOF
19909rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019910if { (ac_try="$ac_compile"
19911case "(($ac_try" in
19912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19913 *) ac_try_echo=$ac_try;;
19914esac
19915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019918 grep -v '^ *+' conftest.er1 >conftest.err
19919 rm -f conftest.er1
19920 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019922 (exit $ac_status); } && {
19923 test -z "$ac_c_werror_flag" ||
19924 test ! -s conftest.err
19925 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019926
19927 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019928#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019929_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019930
Martin v. Löwis11437992002-04-12 09:54:03 +000019931
19932cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019933#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019934_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019935
Martin v. Löwiseba40652007-08-30 20:10:57 +000019936 { echo "$as_me:$LINENO: result: yes" >&5
19937echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019938
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019939else
Martin v. Löwis11437992002-04-12 09:54:03 +000019940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019941sed 's/^/| /' conftest.$ac_ext >&5
19942
Martin v. Löwis11437992002-04-12 09:54:03 +000019943
Martin v. Löwiseba40652007-08-30 20:10:57 +000019944 { echo "$as_me:$LINENO: result: no" >&5
19945echo "${ECHO_T}no" >&6; }
19946 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
19947echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019949/* confdefs.h. */
19950_ACEOF
19951cat confdefs.h >>conftest.$ac_ext
19952cat >>conftest.$ac_ext <<_ACEOF
19953/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019954
19955# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019956
Martin v. Löwis11437992002-04-12 09:54:03 +000019957int
19958main ()
19959{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019960
19961 char *name;
19962 struct hostent *he;
19963 struct hostent_data data;
19964
19965 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000019966
19967 ;
19968 return 0;
19969}
19970_ACEOF
19971rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019972if { (ac_try="$ac_compile"
19973case "(($ac_try" in
19974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19975 *) ac_try_echo=$ac_try;;
19976esac
19977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019980 grep -v '^ *+' conftest.er1 >conftest.err
19981 rm -f conftest.er1
19982 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019984 (exit $ac_status); } && {
19985 test -z "$ac_c_werror_flag" ||
19986 test ! -s conftest.err
19987 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019988
19989 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019990#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019991_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019992
Martin v. Löwis11437992002-04-12 09:54:03 +000019993
19994cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019995#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019996_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019997
Martin v. Löwiseba40652007-08-30 20:10:57 +000019998 { echo "$as_me:$LINENO: result: yes" >&5
19999echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020000
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020001else
Martin v. Löwis11437992002-04-12 09:54:03 +000020002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020003sed 's/^/| /' conftest.$ac_ext >&5
20004
Martin v. Löwis11437992002-04-12 09:54:03 +000020005
Martin v. Löwiseba40652007-08-30 20:10:57 +000020006 { echo "$as_me:$LINENO: result: no" >&5
20007echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020008
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020010
20011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020012
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020014
20015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020016
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020018
20019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020020 CFLAGS=$OLD_CFLAGS
20021
20022else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020023
Martin v. Löwis11437992002-04-12 09:54:03 +000020024
20025for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020026do
Martin v. Löwis11437992002-04-12 09:54:03 +000020027as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020028{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20029echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20030if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020031 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020032else
Martin v. Löwis11437992002-04-12 09:54:03 +000020033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020034/* confdefs.h. */
20035_ACEOF
20036cat confdefs.h >>conftest.$ac_ext
20037cat >>conftest.$ac_ext <<_ACEOF
20038/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020039/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20040 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20041#define $ac_func innocuous_$ac_func
20042
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020043/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020044 which can conflict with char $ac_func (); below.
20045 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020046 <limits.h> exists even on freestanding compilers. */
20047
20048#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020049# include <limits.h>
20050#else
20051# include <assert.h>
20052#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020053
20054#undef $ac_func
20055
Martin v. Löwiseba40652007-08-30 20:10:57 +000020056/* Override any GCC internal prototype to avoid an error.
20057 Use char because int might match the return type of a GCC
20058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020059#ifdef __cplusplus
20060extern "C"
20061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020062char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020063/* The GNU C library defines this for functions which it implements
20064 to always fail with ENOSYS. Some functions are actually named
20065 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020066#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020067choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020068#endif
20069
Skip Montanaro6dead952003-09-25 14:50:04 +000020070int
20071main ()
20072{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020073return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020074 ;
20075 return 0;
20076}
20077_ACEOF
20078rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020079if { (ac_try="$ac_link"
20080case "(($ac_try" in
20081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20082 *) ac_try_echo=$ac_try;;
20083esac
20084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20085 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020087 grep -v '^ *+' conftest.er1 >conftest.err
20088 rm -f conftest.er1
20089 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020091 (exit $ac_status); } && {
20092 test -z "$ac_c_werror_flag" ||
20093 test ! -s conftest.err
20094 } && test -s conftest$ac_exeext &&
20095 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020096 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020097else
Martin v. Löwis11437992002-04-12 09:54:03 +000020098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020099sed 's/^/| /' conftest.$ac_ext >&5
20100
Martin v. Löwiseba40652007-08-30 20:10:57 +000020101 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020103
20104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020105 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020107ac_res=`eval echo '${'$as_ac_var'}'`
20108 { echo "$as_me:$LINENO: result: $ac_res" >&5
20109echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020110if test `eval echo '${'$as_ac_var'}'` = yes; then
20111 cat >>confdefs.h <<_ACEOF
20112#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20113_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020114
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020115fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020116done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020117
Michael W. Hudson54241132001-12-07 15:38:26 +000020118
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020119fi
20120
Michael W. Hudson54241132001-12-07 15:38:26 +000020121
20122
20123
20124
20125
20126
Guido van Rossum627b2d71993-12-24 10:39:16 +000020127# checks for system services
20128# (none yet)
20129
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020130# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020131{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20132echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020133if test "${ac_cv_func___fpu_control+set}" = set; then
20134 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020135else
Martin v. Löwis11437992002-04-12 09:54:03 +000020136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020137/* confdefs.h. */
20138_ACEOF
20139cat confdefs.h >>conftest.$ac_ext
20140cat >>conftest.$ac_ext <<_ACEOF
20141/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020142/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20143 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20144#define __fpu_control innocuous___fpu_control
20145
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020146/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020147 which can conflict with char __fpu_control (); below.
20148 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020149 <limits.h> exists even on freestanding compilers. */
20150
20151#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020152# include <limits.h>
20153#else
20154# include <assert.h>
20155#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020156
20157#undef __fpu_control
20158
Martin v. Löwiseba40652007-08-30 20:10:57 +000020159/* Override any GCC internal prototype to avoid an error.
20160 Use char because int might match the return type of a GCC
20161 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020162#ifdef __cplusplus
20163extern "C"
20164#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020165char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020166/* The GNU C library defines this for functions which it implements
20167 to always fail with ENOSYS. Some functions are actually named
20168 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020169#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020170choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020171#endif
20172
Skip Montanaro6dead952003-09-25 14:50:04 +000020173int
20174main ()
20175{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020176return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020177 ;
20178 return 0;
20179}
20180_ACEOF
20181rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020182if { (ac_try="$ac_link"
20183case "(($ac_try" in
20184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20185 *) ac_try_echo=$ac_try;;
20186esac
20187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20188 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020190 grep -v '^ *+' conftest.er1 >conftest.err
20191 rm -f conftest.er1
20192 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020194 (exit $ac_status); } && {
20195 test -z "$ac_c_werror_flag" ||
20196 test ! -s conftest.err
20197 } && test -s conftest$ac_exeext &&
20198 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020199 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020200else
Martin v. Löwis11437992002-04-12 09:54:03 +000020201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020202sed 's/^/| /' conftest.$ac_ext >&5
20203
Martin v. Löwiseba40652007-08-30 20:10:57 +000020204 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020206
20207rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020208 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020210{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20211echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020212if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020213 :
20214else
Martin v. Löwis11437992002-04-12 09:54:03 +000020215
Martin v. Löwiseba40652007-08-30 20:10:57 +000020216{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20217echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020218if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020220else
Martin v. Löwis11437992002-04-12 09:54:03 +000020221 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020222LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020224/* confdefs.h. */
20225_ACEOF
20226cat confdefs.h >>conftest.$ac_ext
20227cat >>conftest.$ac_ext <<_ACEOF
20228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020229
Martin v. Löwiseba40652007-08-30 20:10:57 +000020230/* Override any GCC internal prototype to avoid an error.
20231 Use char because int might match the return type of a GCC
20232 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020233#ifdef __cplusplus
20234extern "C"
20235#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020236char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020237int
20238main ()
20239{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020240return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020241 ;
20242 return 0;
20243}
20244_ACEOF
20245rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020246if { (ac_try="$ac_link"
20247case "(($ac_try" in
20248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20249 *) ac_try_echo=$ac_try;;
20250esac
20251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20252 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020254 grep -v '^ *+' conftest.er1 >conftest.err
20255 rm -f conftest.er1
20256 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020258 (exit $ac_status); } && {
20259 test -z "$ac_c_werror_flag" ||
20260 test ! -s conftest.err
20261 } && test -s conftest$ac_exeext &&
20262 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020263 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020264else
Martin v. Löwis11437992002-04-12 09:54:03 +000020265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020266sed 's/^/| /' conftest.$ac_ext >&5
20267
Martin v. Löwiseba40652007-08-30 20:10:57 +000020268 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020270
20271rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020273LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020275{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20276echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020277if test $ac_cv_lib_ieee___fpu_control = yes; then
20278 cat >>confdefs.h <<_ACEOF
20279#define HAVE_LIBIEEE 1
20280_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020281
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020282 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020283
Guido van Rossum627b2d71993-12-24 10:39:16 +000020284fi
20285
Michael W. Hudson54241132001-12-07 15:38:26 +000020286
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020287fi
20288
Michael W. Hudson54241132001-12-07 15:38:26 +000020289
Guido van Rossum7f253911997-05-09 02:42:48 +000020290# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020291{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20292echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020293
Martin v. Löwiseba40652007-08-30 20:10:57 +000020294# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020295if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020296 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020297if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020298then
20299
20300cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020301#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020302_ACEOF
20303
Martin v. Löwiseba40652007-08-30 20:10:57 +000020304 { echo "$as_me:$LINENO: result: yes" >&5
20305echo "${ECHO_T}yes" >&6; }
20306else { echo "$as_me:$LINENO: result: no" >&5
20307echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020308fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020309else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020310 { echo "$as_me:$LINENO: result: no" >&5
20311echo "${ECHO_T}no" >&6; }
20312fi
20313
Guido van Rossum7f253911997-05-09 02:42:48 +000020314
Guido van Rossum7f43da71994-08-01 12:15:30 +000020315# check for --with-libm=...
20316
Guido van Rossum563e7081996-09-10 18:20:48 +000020317case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020318Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020319BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020320*) LIBM=-lm
20321esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020322{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20323echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020324
Martin v. Löwiseba40652007-08-30 20:10:57 +000020325# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020326if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020327 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020328if test "$withval" = no
20329then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020330 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20331echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020332elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020333then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020334 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20335echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020336else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20337echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20338 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020339fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020340else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020341 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20342echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20343fi
20344
Guido van Rossum7f43da71994-08-01 12:15:30 +000020345
20346# check for --with-libc=...
20347
Martin v. Löwiseba40652007-08-30 20:10:57 +000020348{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20349echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020350
Martin v. Löwiseba40652007-08-30 20:10:57 +000020351# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020352if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020353 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020354if test "$withval" = no
20355then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020356 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20357echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020358elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020359then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020360 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20361echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020362else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20363echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20364 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020365fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020366else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020367 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20368echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20369fi
20370
Guido van Rossum7f43da71994-08-01 12:15:30 +000020371
Christian Heimes0a8143f2007-12-18 23:22:54 +000020372# ************************************
20373# * Check for mathematical functions *
20374# ************************************
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020375# check for hypot() in math library
20376LIBS_SAVE=$LIBS
20377LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000020378
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020379for ac_func in hypot
20380do
Martin v. Löwis11437992002-04-12 09:54:03 +000020381as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020382{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20383echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20384if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020386else
Martin v. Löwis11437992002-04-12 09:54:03 +000020387 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020388/* confdefs.h. */
20389_ACEOF
20390cat confdefs.h >>conftest.$ac_ext
20391cat >>conftest.$ac_ext <<_ACEOF
20392/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020393/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20394 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20395#define $ac_func innocuous_$ac_func
20396
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020397/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020398 which can conflict with char $ac_func (); below.
20399 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020400 <limits.h> exists even on freestanding compilers. */
20401
20402#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020403# include <limits.h>
20404#else
20405# include <assert.h>
20406#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020407
20408#undef $ac_func
20409
Martin v. Löwiseba40652007-08-30 20:10:57 +000020410/* Override any GCC internal prototype to avoid an error.
20411 Use char because int might match the return type of a GCC
20412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020413#ifdef __cplusplus
20414extern "C"
20415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020416char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020417/* The GNU C library defines this for functions which it implements
20418 to always fail with ENOSYS. Some functions are actually named
20419 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020420#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020421choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020422#endif
20423
Skip Montanaro6dead952003-09-25 14:50:04 +000020424int
20425main ()
20426{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020427return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020428 ;
20429 return 0;
20430}
20431_ACEOF
20432rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020433if { (ac_try="$ac_link"
20434case "(($ac_try" in
20435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20436 *) ac_try_echo=$ac_try;;
20437esac
20438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20439 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020441 grep -v '^ *+' conftest.er1 >conftest.err
20442 rm -f conftest.er1
20443 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020445 (exit $ac_status); } && {
20446 test -z "$ac_c_werror_flag" ||
20447 test ! -s conftest.err
20448 } && test -s conftest$ac_exeext &&
20449 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020450 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020451else
Martin v. Löwis11437992002-04-12 09:54:03 +000020452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020453sed 's/^/| /' conftest.$ac_ext >&5
20454
Martin v. Löwiseba40652007-08-30 20:10:57 +000020455 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020457
20458rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020459 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020461ac_res=`eval echo '${'$as_ac_var'}'`
20462 { echo "$as_me:$LINENO: result: $ac_res" >&5
20463echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020464if test `eval echo '${'$as_ac_var'}'` = yes; then
20465 cat >>confdefs.h <<_ACEOF
20466#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20467_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020468
Michael W. Hudson54241132001-12-07 15:38:26 +000020469else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020470 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020471 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020472 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20473 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020474esac
20475
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020476fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020477done
20478
Michael W. Hudson54241132001-12-07 15:38:26 +000020479
Christian Heimes0a8143f2007-12-18 23:22:54 +000020480
20481
20482
20483
20484
20485for ac_func in copysign isfinite isnan isinf
20486do
20487as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20488{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20489echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20490if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20491 echo $ECHO_N "(cached) $ECHO_C" >&6
20492else
20493 cat >conftest.$ac_ext <<_ACEOF
20494/* confdefs.h. */
20495_ACEOF
20496cat confdefs.h >>conftest.$ac_ext
20497cat >>conftest.$ac_ext <<_ACEOF
20498/* end confdefs.h. */
20499/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20500 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20501#define $ac_func innocuous_$ac_func
20502
20503/* System header to define __stub macros and hopefully few prototypes,
20504 which can conflict with char $ac_func (); below.
20505 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20506 <limits.h> exists even on freestanding compilers. */
20507
20508#ifdef __STDC__
20509# include <limits.h>
20510#else
20511# include <assert.h>
20512#endif
20513
20514#undef $ac_func
20515
20516/* Override any GCC internal prototype to avoid an error.
20517 Use char because int might match the return type of a GCC
20518 builtin and then its argument prototype would still apply. */
20519#ifdef __cplusplus
20520extern "C"
20521#endif
20522char $ac_func ();
20523/* The GNU C library defines this for functions which it implements
20524 to always fail with ENOSYS. Some functions are actually named
20525 something starting with __ and the normal name is an alias. */
20526#if defined __stub_$ac_func || defined __stub___$ac_func
20527choke me
20528#endif
20529
20530int
20531main ()
20532{
20533return $ac_func ();
20534 ;
20535 return 0;
20536}
20537_ACEOF
20538rm -f conftest.$ac_objext conftest$ac_exeext
20539if { (ac_try="$ac_link"
20540case "(($ac_try" in
20541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20542 *) ac_try_echo=$ac_try;;
20543esac
20544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20545 (eval "$ac_link") 2>conftest.er1
20546 ac_status=$?
20547 grep -v '^ *+' conftest.er1 >conftest.err
20548 rm -f conftest.er1
20549 cat conftest.err >&5
20550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20551 (exit $ac_status); } && {
20552 test -z "$ac_c_werror_flag" ||
20553 test ! -s conftest.err
20554 } && test -s conftest$ac_exeext &&
20555 $as_test_x conftest$ac_exeext; then
20556 eval "$as_ac_var=yes"
20557else
20558 echo "$as_me: failed program was:" >&5
20559sed 's/^/| /' conftest.$ac_ext >&5
20560
20561 eval "$as_ac_var=no"
20562fi
20563
20564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20565 conftest$ac_exeext conftest.$ac_ext
20566fi
20567ac_res=`eval echo '${'$as_ac_var'}'`
20568 { echo "$as_me:$LINENO: result: $ac_res" >&5
20569echo "${ECHO_T}$ac_res" >&6; }
20570if test `eval echo '${'$as_ac_var'}'` = yes; then
20571 cat >>confdefs.h <<_ACEOF
20572#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20573_ACEOF
20574
20575fi
20576done
20577
20578
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020579LIBS=$LIBS_SAVE
20580
Guido van Rossumef2255b2000-03-10 22:30:29 +000020581# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000020582if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020583 { echo "$as_me:$LINENO: checking for wchar.h" >&5
20584echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020585if test "${ac_cv_header_wchar_h+set}" = set; then
20586 echo $ECHO_N "(cached) $ECHO_C" >&6
20587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020588{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20589echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000020590else
Martin v. Löwis11437992002-04-12 09:54:03 +000020591 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000020592{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
20593echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020594cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020595/* confdefs.h. */
20596_ACEOF
20597cat confdefs.h >>conftest.$ac_ext
20598cat >>conftest.$ac_ext <<_ACEOF
20599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020600$ac_includes_default
20601#include <wchar.h>
20602_ACEOF
20603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020604if { (ac_try="$ac_compile"
20605case "(($ac_try" in
20606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20607 *) ac_try_echo=$ac_try;;
20608esac
20609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020612 grep -v '^ *+' conftest.er1 >conftest.err
20613 rm -f conftest.er1
20614 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020616 (exit $ac_status); } && {
20617 test -z "$ac_c_werror_flag" ||
20618 test ! -s conftest.err
20619 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020620 ac_header_compiler=yes
20621else
20622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020623sed 's/^/| /' conftest.$ac_ext >&5
20624
Martin v. Löwiseba40652007-08-30 20:10:57 +000020625 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020627
20628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20629{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20630echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020631
20632# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000020633{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
20634echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020635cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020636/* confdefs.h. */
20637_ACEOF
20638cat confdefs.h >>conftest.$ac_ext
20639cat >>conftest.$ac_ext <<_ACEOF
20640/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020641#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020642_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000020643if { (ac_try="$ac_cpp conftest.$ac_ext"
20644case "(($ac_try" in
20645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20646 *) ac_try_echo=$ac_try;;
20647esac
20648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20649 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020650 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020651 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000020652 rm -f conftest.er1
20653 cat conftest.err >&5
20654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020655 (exit $ac_status); } >/dev/null && {
20656 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20657 test ! -s conftest.err
20658 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020659 ac_header_preproc=yes
20660else
20661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020662sed 's/^/| /' conftest.$ac_ext >&5
20663
Martin v. Löwis11437992002-04-12 09:54:03 +000020664 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000020665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020666
Martin v. Löwis11437992002-04-12 09:54:03 +000020667rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020668{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20669echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020670
20671# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020672case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20673 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000020674 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
20675echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020676 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
20677echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
20678 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020679 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020680 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020681 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
20682echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020683 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
20684echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
20685 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
20686echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
20687 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
20688echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020689 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
20690echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020691 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
20692echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000020693 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000020694## ------------------------------------------------ ##
20695## Report this to http://www.python.org/python-bugs ##
20696## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000020697_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000020698 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000020699 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020700esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020701{ echo "$as_me:$LINENO: checking for wchar.h" >&5
20702echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020703if test "${ac_cv_header_wchar_h+set}" = set; then
20704 echo $ECHO_N "(cached) $ECHO_C" >&6
20705else
20706 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000020707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020708{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20709echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020710
20711fi
20712if test $ac_cv_header_wchar_h = yes; then
20713
20714
20715cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000020716#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020717_ACEOF
20718
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020719 wchar_h="yes"
20720
Guido van Rossumef2255b2000-03-10 22:30:29 +000020721else
Martin v. Löwis11437992002-04-12 09:54:03 +000020722 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000020723
20724fi
20725
Michael W. Hudson54241132001-12-07 15:38:26 +000020726
Martin v. Löwis11437992002-04-12 09:54:03 +000020727
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020728# determine wchar_t size
20729if test "$wchar_h" = yes
20730then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020731 { echo "$as_me:$LINENO: checking for wchar_t" >&5
20732echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020733if test "${ac_cv_type_wchar_t+set}" = set; then
20734 echo $ECHO_N "(cached) $ECHO_C" >&6
20735else
20736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020737/* confdefs.h. */
20738_ACEOF
20739cat confdefs.h >>conftest.$ac_ext
20740cat >>conftest.$ac_ext <<_ACEOF
20741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020742#include <wchar.h>
20743
Martin v. Löwiseba40652007-08-30 20:10:57 +000020744typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020745int
20746main ()
20747{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020748if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000020749 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020750if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000020751 return 0;
20752 ;
20753 return 0;
20754}
20755_ACEOF
20756rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020757if { (ac_try="$ac_compile"
20758case "(($ac_try" in
20759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20760 *) ac_try_echo=$ac_try;;
20761esac
20762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020765 grep -v '^ *+' conftest.er1 >conftest.err
20766 rm -f conftest.er1
20767 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020769 (exit $ac_status); } && {
20770 test -z "$ac_c_werror_flag" ||
20771 test ! -s conftest.err
20772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020773 ac_cv_type_wchar_t=yes
20774else
20775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020776sed 's/^/| /' conftest.$ac_ext >&5
20777
Martin v. Löwiseba40652007-08-30 20:10:57 +000020778 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020779fi
Brett Cannon19fab762007-06-02 03:02:29 +000020780
Martin v. Löwiseba40652007-08-30 20:10:57 +000020781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20782fi
20783{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
20784echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
20785
20786# The cast to long int works around a bug in the HP C Compiler
20787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20789# This bug is HP SR number 8606223364.
20790{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
20791echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020792if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20793 echo $ECHO_N "(cached) $ECHO_C" >&6
20794else
Martin v. Löwis11437992002-04-12 09:54:03 +000020795 if test "$cross_compiling" = yes; then
20796 # Depending upon the size, compute the lo and hi bounds.
20797cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020798/* confdefs.h. */
20799_ACEOF
20800cat confdefs.h >>conftest.$ac_ext
20801cat >>conftest.$ac_ext <<_ACEOF
20802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020803#include <wchar.h>
20804
Martin v. Löwiseba40652007-08-30 20:10:57 +000020805 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020806int
20807main ()
20808{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020809static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020810test_array [0] = 0
20811
20812 ;
20813 return 0;
20814}
20815_ACEOF
20816rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020817if { (ac_try="$ac_compile"
20818case "(($ac_try" in
20819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20820 *) ac_try_echo=$ac_try;;
20821esac
20822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020825 grep -v '^ *+' conftest.er1 >conftest.err
20826 rm -f conftest.er1
20827 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020829 (exit $ac_status); } && {
20830 test -z "$ac_c_werror_flag" ||
20831 test ! -s conftest.err
20832 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020833 ac_lo=0 ac_mid=0
20834 while :; do
20835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020836/* confdefs.h. */
20837_ACEOF
20838cat confdefs.h >>conftest.$ac_ext
20839cat >>conftest.$ac_ext <<_ACEOF
20840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020841#include <wchar.h>
20842
Martin v. Löwiseba40652007-08-30 20:10:57 +000020843 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020844int
20845main ()
20846{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020847static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020848test_array [0] = 0
20849
20850 ;
20851 return 0;
20852}
20853_ACEOF
20854rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020855if { (ac_try="$ac_compile"
20856case "(($ac_try" in
20857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20858 *) ac_try_echo=$ac_try;;
20859esac
20860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020863 grep -v '^ *+' conftest.er1 >conftest.err
20864 rm -f conftest.er1
20865 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020867 (exit $ac_status); } && {
20868 test -z "$ac_c_werror_flag" ||
20869 test ! -s conftest.err
20870 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020871 ac_hi=$ac_mid; break
20872else
20873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020874sed 's/^/| /' conftest.$ac_ext >&5
20875
Martin v. Löwiseba40652007-08-30 20:10:57 +000020876 ac_lo=`expr $ac_mid + 1`
20877 if test $ac_lo -le $ac_mid; then
20878 ac_lo= ac_hi=
20879 break
20880 fi
20881 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000020882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020883
20884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020885 done
20886else
20887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020888sed 's/^/| /' conftest.$ac_ext >&5
20889
Martin v. Löwiseba40652007-08-30 20:10:57 +000020890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020891/* confdefs.h. */
20892_ACEOF
20893cat confdefs.h >>conftest.$ac_ext
20894cat >>conftest.$ac_ext <<_ACEOF
20895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020896#include <wchar.h>
20897
Martin v. Löwiseba40652007-08-30 20:10:57 +000020898 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020899int
20900main ()
20901{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020902static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020903test_array [0] = 0
20904
20905 ;
20906 return 0;
20907}
20908_ACEOF
20909rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020910if { (ac_try="$ac_compile"
20911case "(($ac_try" in
20912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20913 *) ac_try_echo=$ac_try;;
20914esac
20915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020918 grep -v '^ *+' conftest.er1 >conftest.err
20919 rm -f conftest.er1
20920 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020922 (exit $ac_status); } && {
20923 test -z "$ac_c_werror_flag" ||
20924 test ! -s conftest.err
20925 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020926 ac_hi=-1 ac_mid=-1
20927 while :; do
20928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020929/* confdefs.h. */
20930_ACEOF
20931cat confdefs.h >>conftest.$ac_ext
20932cat >>conftest.$ac_ext <<_ACEOF
20933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020934#include <wchar.h>
20935
Martin v. Löwiseba40652007-08-30 20:10:57 +000020936 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020937int
20938main ()
20939{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020940static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020941test_array [0] = 0
20942
20943 ;
20944 return 0;
20945}
20946_ACEOF
20947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020948if { (ac_try="$ac_compile"
20949case "(($ac_try" in
20950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20951 *) ac_try_echo=$ac_try;;
20952esac
20953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020956 grep -v '^ *+' conftest.er1 >conftest.err
20957 rm -f conftest.er1
20958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020960 (exit $ac_status); } && {
20961 test -z "$ac_c_werror_flag" ||
20962 test ! -s conftest.err
20963 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020964 ac_lo=$ac_mid; break
20965else
20966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020967sed 's/^/| /' conftest.$ac_ext >&5
20968
Martin v. Löwiseba40652007-08-30 20:10:57 +000020969 ac_hi=`expr '(' $ac_mid ')' - 1`
20970 if test $ac_mid -le $ac_hi; then
20971 ac_lo= ac_hi=
20972 break
20973 fi
20974 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000020975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020976
20977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020978 done
20979else
20980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020981sed 's/^/| /' conftest.$ac_ext >&5
20982
Martin v. Löwiseba40652007-08-30 20:10:57 +000020983 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000020984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020985
20986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020988
20989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020990# Binary search between lo and hi bounds.
20991while test "x$ac_lo" != "x$ac_hi"; do
20992 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020994/* confdefs.h. */
20995_ACEOF
20996cat confdefs.h >>conftest.$ac_ext
20997cat >>conftest.$ac_ext <<_ACEOF
20998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020999#include <wchar.h>
21000
Martin v. Löwiseba40652007-08-30 20:10:57 +000021001 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021002int
21003main ()
21004{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021006test_array [0] = 0
21007
21008 ;
21009 return 0;
21010}
21011_ACEOF
21012rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021013if { (ac_try="$ac_compile"
21014case "(($ac_try" in
21015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21016 *) ac_try_echo=$ac_try;;
21017esac
21018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021021 grep -v '^ *+' conftest.er1 >conftest.err
21022 rm -f conftest.er1
21023 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021025 (exit $ac_status); } && {
21026 test -z "$ac_c_werror_flag" ||
21027 test ! -s conftest.err
21028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021029 ac_hi=$ac_mid
21030else
21031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021032sed 's/^/| /' conftest.$ac_ext >&5
21033
Martin v. Löwiseba40652007-08-30 20:10:57 +000021034 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021036
21037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021038done
21039case $ac_lo in
21040?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021041'') if test "$ac_cv_type_wchar_t" = yes; then
21042 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021043See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021044echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021045See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021046 { (exit 77); exit 77; }; }
21047 else
21048 ac_cv_sizeof_wchar_t=0
21049 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021050esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021051else
Martin v. Löwis11437992002-04-12 09:54:03 +000021052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021053/* confdefs.h. */
21054_ACEOF
21055cat confdefs.h >>conftest.$ac_ext
21056cat >>conftest.$ac_ext <<_ACEOF
21057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021058#include <wchar.h>
21059
Martin v. Löwiseba40652007-08-30 20:10:57 +000021060 typedef wchar_t ac__type_sizeof_;
21061static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21062static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021063#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021064#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021065int
21066main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021067{
Martin v. Löwis11437992002-04-12 09:54:03 +000021068
21069 FILE *f = fopen ("conftest.val", "w");
21070 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021071 return 1;
21072 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021073 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021074 long int i = longval ();
21075 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21076 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021077 fprintf (f, "%ld\n", i);
21078 }
21079 else
21080 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021081 unsigned long int i = ulongval ();
21082 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21083 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021084 fprintf (f, "%lu\n", i);
21085 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021086 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021087
21088 ;
21089 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021090}
Martin v. Löwis11437992002-04-12 09:54:03 +000021091_ACEOF
21092rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021093if { (ac_try="$ac_link"
21094case "(($ac_try" in
21095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21096 *) ac_try_echo=$ac_try;;
21097esac
21098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21099 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021100 ac_status=$?
21101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21102 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021103 { (case "(($ac_try" in
21104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21105 *) ac_try_echo=$ac_try;;
21106esac
21107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21108 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021109 ac_status=$?
21110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21111 (exit $ac_status); }; }; then
21112 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021113else
Martin v. Löwis11437992002-04-12 09:54:03 +000021114 echo "$as_me: program exited with status $ac_status" >&5
21115echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021116sed 's/^/| /' conftest.$ac_ext >&5
21117
Martin v. Löwis11437992002-04-12 09:54:03 +000021118( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021119if test "$ac_cv_type_wchar_t" = yes; then
21120 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021121See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021122echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021123See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021124 { (exit 77); exit 77; }; }
21125 else
21126 ac_cv_sizeof_wchar_t=0
21127 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021129rm -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 +000021130fi
21131rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21134echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21135
21136
21137
Martin v. Löwis11437992002-04-12 09:54:03 +000021138cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021139#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021140_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021141
Michael W. Hudson54241132001-12-07 15:38:26 +000021142
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021143fi
21144
Martin v. Löwiseba40652007-08-30 20:10:57 +000021145{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21146echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021147have_ucs4_tcl=no
21148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021149/* confdefs.h. */
21150_ACEOF
21151cat confdefs.h >>conftest.$ac_ext
21152cat >>conftest.$ac_ext <<_ACEOF
21153/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021154
21155#include <tcl.h>
21156#if TCL_UTF_MAX != 6
21157# error "NOT UCS4_TCL"
21158#endif
21159int
21160main ()
21161{
21162
21163 ;
21164 return 0;
21165}
21166_ACEOF
21167rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021168if { (ac_try="$ac_compile"
21169case "(($ac_try" in
21170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21171 *) ac_try_echo=$ac_try;;
21172esac
21173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021176 grep -v '^ *+' conftest.er1 >conftest.err
21177 rm -f conftest.er1
21178 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021180 (exit $ac_status); } && {
21181 test -z "$ac_c_werror_flag" ||
21182 test ! -s conftest.err
21183 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021184
21185
21186cat >>confdefs.h <<\_ACEOF
21187#define HAVE_UCS4_TCL 1
21188_ACEOF
21189
21190 have_ucs4_tcl=yes
21191
21192else
21193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021194sed 's/^/| /' conftest.$ac_ext >&5
21195
Martin v. Löwiseba40652007-08-30 20:10:57 +000021196
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021198
21199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21200{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21201echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021202
Skip Montanaro6dead952003-09-25 14:50:04 +000021203# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021204if test "$wchar_h" = yes
21205then
21206 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021207 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21208echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021209 if test "${ac_cv_wchar_t_signed+set}" = set; then
21210 echo $ECHO_N "(cached) $ECHO_C" >&6
21211else
21212
21213 if test "$cross_compiling" = yes; then
21214 ac_cv_wchar_t_signed=yes
21215else
21216 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021217/* confdefs.h. */
21218_ACEOF
21219cat confdefs.h >>conftest.$ac_ext
21220cat >>conftest.$ac_ext <<_ACEOF
21221/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021222
21223 #include <wchar.h>
21224 int main()
21225 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021226 /* Success: exit code 0 */
21227 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021228 }
21229
21230_ACEOF
21231rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021232if { (ac_try="$ac_link"
21233case "(($ac_try" in
21234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21235 *) ac_try_echo=$ac_try;;
21236esac
21237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21238 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021239 ac_status=$?
21240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21241 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021242 { (case "(($ac_try" in
21243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21244 *) ac_try_echo=$ac_try;;
21245esac
21246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21247 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021248 ac_status=$?
21249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21250 (exit $ac_status); }; }; then
21251 ac_cv_wchar_t_signed=yes
21252else
21253 echo "$as_me: program exited with status $ac_status" >&5
21254echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021255sed 's/^/| /' conftest.$ac_ext >&5
21256
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021257( exit $ac_status )
21258ac_cv_wchar_t_signed=no
21259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021260rm -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 +000021261fi
21262
Martin v. Löwiseba40652007-08-30 20:10:57 +000021263
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021264fi
21265
Martin v. Löwiseba40652007-08-30 20:10:57 +000021266 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21267echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21268fi
21269
21270{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21271echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21272# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021273if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021274 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021275else
21276 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021277fi
21278
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021279
21280if test $enable_unicode = yes
21281then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021282 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021283 case "$have_ucs4_tcl" in
21284 yes) enable_unicode="ucs4"
21285 ;;
21286 *) enable_unicode="ucs2"
21287 ;;
21288 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021289fi
21290
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021291
21292
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021293case "$enable_unicode" in
21294ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021295 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021296#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021297_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021298
21299 ;;
21300ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021301 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021302#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021303_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021304
21305 ;;
21306esac
21307
Michael W. Hudson54241132001-12-07 15:38:26 +000021308
Martin v. Löwis11437992002-04-12 09:54:03 +000021309
21310
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021311
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021312if test "$enable_unicode" = "no"
21313then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021314 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021315 { echo "$as_me:$LINENO: result: not used" >&5
21316echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021317else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021318 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021319
21320cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021321#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021322_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021323
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021324
21325 # wchar_t is only usable if it maps to an unsigned type
21326 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021327 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021328 then
21329 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021330
Martin v. Löwis11437992002-04-12 09:54:03 +000021331cat >>confdefs.h <<\_ACEOF
21332#define HAVE_USABLE_WCHAR_T 1
21333_ACEOF
21334
21335 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021336#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021337_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021338
21339 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21340 then
21341 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021342 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021343#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021344_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021345
21346 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21347 then
21348 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021349 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021350#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021351_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021352
21353 else
21354 PY_UNICODE_TYPE="no type found"
21355 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021356 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21357echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021358fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021359
21360# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021361{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21362echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021363if test "${ac_cv_c_bigendian+set}" = set; then
21364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021365else
Martin v. Löwis11437992002-04-12 09:54:03 +000021366 # See if sys/param.h defines the BYTE_ORDER macro.
21367cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021368/* confdefs.h. */
21369_ACEOF
21370cat confdefs.h >>conftest.$ac_ext
21371cat >>conftest.$ac_ext <<_ACEOF
21372/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021373#include <sys/types.h>
21374#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021375
Martin v. Löwis11437992002-04-12 09:54:03 +000021376int
21377main ()
21378{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021379#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21380 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021381 bogus endian macros
21382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021383
21384 ;
21385 return 0;
21386}
21387_ACEOF
21388rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021389if { (ac_try="$ac_compile"
21390case "(($ac_try" in
21391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21392 *) ac_try_echo=$ac_try;;
21393esac
21394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21395 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021397 grep -v '^ *+' conftest.er1 >conftest.err
21398 rm -f conftest.er1
21399 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021401 (exit $ac_status); } && {
21402 test -z "$ac_c_werror_flag" ||
21403 test ! -s conftest.err
21404 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021405 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021406cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021407/* confdefs.h. */
21408_ACEOF
21409cat confdefs.h >>conftest.$ac_ext
21410cat >>conftest.$ac_ext <<_ACEOF
21411/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021412#include <sys/types.h>
21413#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021414
Martin v. Löwis11437992002-04-12 09:54:03 +000021415int
21416main ()
21417{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021418#if BYTE_ORDER != BIG_ENDIAN
21419 not big endian
21420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021421
21422 ;
21423 return 0;
21424}
21425_ACEOF
21426rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021427if { (ac_try="$ac_compile"
21428case "(($ac_try" in
21429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21430 *) ac_try_echo=$ac_try;;
21431esac
21432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21433 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021435 grep -v '^ *+' conftest.er1 >conftest.err
21436 rm -f conftest.er1
21437 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021439 (exit $ac_status); } && {
21440 test -z "$ac_c_werror_flag" ||
21441 test ! -s conftest.err
21442 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021443 ac_cv_c_bigendian=yes
21444else
Martin v. Löwis11437992002-04-12 09:54:03 +000021445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021446sed 's/^/| /' conftest.$ac_ext >&5
21447
Martin v. Löwiseba40652007-08-30 20:10:57 +000021448 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021450
21451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021452else
Martin v. Löwis11437992002-04-12 09:54:03 +000021453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021454sed 's/^/| /' conftest.$ac_ext >&5
21455
Martin v. Löwiseba40652007-08-30 20:10:57 +000021456 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000021457if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021458 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000021459 ac_cv_c_bigendian=unknown
21460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021461/* confdefs.h. */
21462_ACEOF
21463cat confdefs.h >>conftest.$ac_ext
21464cat >>conftest.$ac_ext <<_ACEOF
21465/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021466short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
21467short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021468void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021469short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
21470short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021471void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021472int
21473main ()
21474{
21475 _ascii (); _ebcdic ();
21476 ;
21477 return 0;
21478}
21479_ACEOF
21480rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021481if { (ac_try="$ac_compile"
21482case "(($ac_try" in
21483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21484 *) ac_try_echo=$ac_try;;
21485esac
21486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021489 grep -v '^ *+' conftest.er1 >conftest.err
21490 rm -f conftest.er1
21491 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021493 (exit $ac_status); } && {
21494 test -z "$ac_c_werror_flag" ||
21495 test ! -s conftest.err
21496 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021497 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021498 ac_cv_c_bigendian=yes
21499fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021500if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021501 if test "$ac_cv_c_bigendian" = unknown; then
21502 ac_cv_c_bigendian=no
21503 else
21504 # finding both strings is unlikely to happen, but who knows?
21505 ac_cv_c_bigendian=unknown
21506 fi
21507fi
21508else
21509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021510sed 's/^/| /' conftest.$ac_ext >&5
21511
Martin v. Löwiseba40652007-08-30 20:10:57 +000021512
Martin v. Löwis11437992002-04-12 09:54:03 +000021513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021514
21515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021516else
21517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021518/* confdefs.h. */
21519_ACEOF
21520cat confdefs.h >>conftest.$ac_ext
21521cat >>conftest.$ac_ext <<_ACEOF
21522/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021523$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021524int
21525main ()
21526{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021527
Guido van Rossumef2255b2000-03-10 22:30:29 +000021528 /* Are we little or big endian? From Harbison&Steele. */
21529 union
21530 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021531 long int l;
21532 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000021533 } u;
21534 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021535 return u.c[sizeof (long int) - 1] == 1;
21536
21537 ;
21538 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021539}
Martin v. Löwis11437992002-04-12 09:54:03 +000021540_ACEOF
21541rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021542if { (ac_try="$ac_link"
21543case "(($ac_try" in
21544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21545 *) ac_try_echo=$ac_try;;
21546esac
21547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21548 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021549 ac_status=$?
21550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21551 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021552 { (case "(($ac_try" in
21553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21554 *) ac_try_echo=$ac_try;;
21555esac
21556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21557 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021558 ac_status=$?
21559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21560 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021561 ac_cv_c_bigendian=no
21562else
Martin v. Löwis11437992002-04-12 09:54:03 +000021563 echo "$as_me: program exited with status $ac_status" >&5
21564echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021565sed 's/^/| /' conftest.$ac_ext >&5
21566
Martin v. Löwis11437992002-04-12 09:54:03 +000021567( exit $ac_status )
21568ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000021569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021570rm -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 +000021571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021572
21573
Martin v. Löwis11437992002-04-12 09:54:03 +000021574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021575
21576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021578{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
21579echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021580case $ac_cv_c_bigendian in
21581 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000021582
Martin v. Löwis11437992002-04-12 09:54:03 +000021583cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021584#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021585_ACEOF
21586 ;;
21587 no)
21588 ;;
21589 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000021590 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021591presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021592echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021593presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
21594 { (exit 1); exit 1; }; } ;;
21595esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000021596
Michael W. Hudson54241132001-12-07 15:38:26 +000021597
Ronald Oussoren988117f2006-04-29 11:31:35 +000021598
21599
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021600# Check whether right shifting a negative integer extends the sign bit
21601# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000021602{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
21603echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021604if test "${ac_cv_rshift_extends_sign+set}" = set; then
21605 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000021606else
Martin v. Löwis11437992002-04-12 09:54:03 +000021607
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021608if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021609 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021610else
Martin v. Löwis11437992002-04-12 09:54:03 +000021611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021612/* confdefs.h. */
21613_ACEOF
21614cat confdefs.h >>conftest.$ac_ext
21615cat >>conftest.$ac_ext <<_ACEOF
21616/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021617
21618int main()
21619{
Vladimir Marangozova6180282000-07-12 05:05:06 +000021620 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021621}
21622
Martin v. Löwis11437992002-04-12 09:54:03 +000021623_ACEOF
21624rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021625if { (ac_try="$ac_link"
21626case "(($ac_try" in
21627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21628 *) ac_try_echo=$ac_try;;
21629esac
21630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21631 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021632 ac_status=$?
21633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21634 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021635 { (case "(($ac_try" in
21636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21637 *) ac_try_echo=$ac_try;;
21638esac
21639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21640 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021641 ac_status=$?
21642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21643 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000021644 ac_cv_rshift_extends_sign=yes
21645else
Martin v. Löwis11437992002-04-12 09:54:03 +000021646 echo "$as_me: program exited with status $ac_status" >&5
21647echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021648sed 's/^/| /' conftest.$ac_ext >&5
21649
Martin v. Löwis11437992002-04-12 09:54:03 +000021650( exit $ac_status )
21651ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000021652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021653rm -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 +000021654fi
21655
Martin v. Löwiseba40652007-08-30 20:10:57 +000021656
21657fi
21658
21659{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
21660echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000021661if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021662then
Martin v. Löwis11437992002-04-12 09:54:03 +000021663
21664cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021665#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021666_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021667
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021668fi
21669
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021670# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000021671{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
21672echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021673if test "${ac_cv_have_getc_unlocked+set}" = set; then
21674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021675else
Martin v. Löwis11437992002-04-12 09:54:03 +000021676
21677cat >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. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021683#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021684int
21685main ()
21686{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021687
21688 FILE *f = fopen("/dev/null", "r");
21689 flockfile(f);
21690 getc_unlocked(f);
21691 funlockfile(f);
21692
Martin v. Löwis11437992002-04-12 09:54:03 +000021693 ;
21694 return 0;
21695}
21696_ACEOF
21697rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021698if { (ac_try="$ac_link"
21699case "(($ac_try" in
21700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21701 *) ac_try_echo=$ac_try;;
21702esac
21703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21704 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021706 grep -v '^ *+' conftest.er1 >conftest.err
21707 rm -f conftest.er1
21708 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021710 (exit $ac_status); } && {
21711 test -z "$ac_c_werror_flag" ||
21712 test ! -s conftest.err
21713 } && test -s conftest$ac_exeext &&
21714 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021715 ac_cv_have_getc_unlocked=yes
21716else
Martin v. Löwis11437992002-04-12 09:54:03 +000021717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021718sed 's/^/| /' conftest.$ac_ext >&5
21719
Martin v. Löwiseba40652007-08-30 20:10:57 +000021720 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021722
21723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021724 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021725fi
21726
Martin v. Löwiseba40652007-08-30 20:10:57 +000021727{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
21728echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021729if test "$ac_cv_have_getc_unlocked" = yes
21730then
Martin v. Löwis11437992002-04-12 09:54:03 +000021731
21732cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021733#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021734_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021735
21736fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021737
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021738# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000021739# save the value of LIBS so we don't actually link Python with readline
21740LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021741
Martin v. Löwiseba40652007-08-30 20:10:57 +000021742{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
21743echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021744if test "${ac_cv_lib_readline_readline+set}" = set; then
21745 echo $ECHO_N "(cached) $ECHO_C" >&6
21746else
21747 ac_check_lib_save_LIBS=$LIBS
21748LIBS="-lreadline $LIBS"
21749cat >conftest.$ac_ext <<_ACEOF
21750/* confdefs.h. */
21751_ACEOF
21752cat confdefs.h >>conftest.$ac_ext
21753cat >>conftest.$ac_ext <<_ACEOF
21754/* end confdefs.h. */
21755
Martin v. Löwiseba40652007-08-30 20:10:57 +000021756/* Override any GCC internal prototype to avoid an error.
21757 Use char because int might match the return type of a GCC
21758 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021759#ifdef __cplusplus
21760extern "C"
21761#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021762char readline ();
21763int
21764main ()
21765{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021766return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021767 ;
21768 return 0;
21769}
21770_ACEOF
21771rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021772if { (ac_try="$ac_link"
21773case "(($ac_try" in
21774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21775 *) ac_try_echo=$ac_try;;
21776esac
21777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21778 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021779 ac_status=$?
21780 grep -v '^ *+' conftest.er1 >conftest.err
21781 rm -f conftest.er1
21782 cat conftest.err >&5
21783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021784 (exit $ac_status); } && {
21785 test -z "$ac_c_werror_flag" ||
21786 test ! -s conftest.err
21787 } && test -s conftest$ac_exeext &&
21788 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021789 ac_cv_lib_readline_readline=yes
21790else
21791 echo "$as_me: failed program was:" >&5
21792sed 's/^/| /' conftest.$ac_ext >&5
21793
Martin v. Löwiseba40652007-08-30 20:10:57 +000021794 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021796
21797rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021798 conftest$ac_exeext conftest.$ac_ext
21799LIBS=$ac_check_lib_save_LIBS
21800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021801{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
21802echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021803if test $ac_cv_lib_readline_readline = yes; then
21804 cat >>confdefs.h <<_ACEOF
21805#define HAVE_LIBREADLINE 1
21806_ACEOF
21807
21808 LIBS="-lreadline $LIBS"
21809
21810fi
21811
21812if test "$ac_cv_have_readline_readline" = no
21813then
21814
Martin v. Löwiseba40652007-08-30 20:10:57 +000021815{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
21816echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021817if test "${ac_cv_lib_termcap_readline+set}" = set; then
21818 echo $ECHO_N "(cached) $ECHO_C" >&6
21819else
21820 ac_check_lib_save_LIBS=$LIBS
21821LIBS="-ltermcap $LIBS"
21822cat >conftest.$ac_ext <<_ACEOF
21823/* confdefs.h. */
21824_ACEOF
21825cat confdefs.h >>conftest.$ac_ext
21826cat >>conftest.$ac_ext <<_ACEOF
21827/* end confdefs.h. */
21828
Martin v. Löwiseba40652007-08-30 20:10:57 +000021829/* Override any GCC internal prototype to avoid an error.
21830 Use char because int might match the return type of a GCC
21831 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021832#ifdef __cplusplus
21833extern "C"
21834#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021835char readline ();
21836int
21837main ()
21838{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021839return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021840 ;
21841 return 0;
21842}
21843_ACEOF
21844rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021845if { (ac_try="$ac_link"
21846case "(($ac_try" in
21847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21848 *) ac_try_echo=$ac_try;;
21849esac
21850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21851 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021852 ac_status=$?
21853 grep -v '^ *+' conftest.er1 >conftest.err
21854 rm -f conftest.er1
21855 cat conftest.err >&5
21856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021857 (exit $ac_status); } && {
21858 test -z "$ac_c_werror_flag" ||
21859 test ! -s conftest.err
21860 } && test -s conftest$ac_exeext &&
21861 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021862 ac_cv_lib_termcap_readline=yes
21863else
21864 echo "$as_me: failed program was:" >&5
21865sed 's/^/| /' conftest.$ac_ext >&5
21866
Martin v. Löwiseba40652007-08-30 20:10:57 +000021867 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021869
21870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021871 conftest$ac_exeext conftest.$ac_ext
21872LIBS=$ac_check_lib_save_LIBS
21873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021874{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
21875echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021876if test $ac_cv_lib_termcap_readline = yes; then
21877 cat >>confdefs.h <<_ACEOF
21878#define HAVE_LIBTERMCAP 1
21879_ACEOF
21880
21881 LIBS="-ltermcap $LIBS"
21882
21883fi
21884
21885fi
21886
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021887# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000021888{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
21889echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021890if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
21891 echo $ECHO_N "(cached) $ECHO_C" >&6
21892else
21893 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021894LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021895cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021896/* confdefs.h. */
21897_ACEOF
21898cat confdefs.h >>conftest.$ac_ext
21899cat >>conftest.$ac_ext <<_ACEOF
21900/* end confdefs.h. */
21901
Martin v. Löwiseba40652007-08-30 20:10:57 +000021902/* Override any GCC internal prototype to avoid an error.
21903 Use char because int might match the return type of a GCC
21904 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021905#ifdef __cplusplus
21906extern "C"
21907#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021908char rl_callback_handler_install ();
21909int
21910main ()
21911{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021912return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021913 ;
21914 return 0;
21915}
21916_ACEOF
21917rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021918if { (ac_try="$ac_link"
21919case "(($ac_try" in
21920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21921 *) ac_try_echo=$ac_try;;
21922esac
21923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21924 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021926 grep -v '^ *+' conftest.er1 >conftest.err
21927 rm -f conftest.er1
21928 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021930 (exit $ac_status); } && {
21931 test -z "$ac_c_werror_flag" ||
21932 test ! -s conftest.err
21933 } && test -s conftest$ac_exeext &&
21934 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021935 ac_cv_lib_readline_rl_callback_handler_install=yes
21936else
21937 echo "$as_me: failed program was:" >&5
21938sed 's/^/| /' conftest.$ac_ext >&5
21939
Martin v. Löwiseba40652007-08-30 20:10:57 +000021940 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021942
21943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021944 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021945LIBS=$ac_check_lib_save_LIBS
21946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021947{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
21948echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021949if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
21950
21951cat >>confdefs.h <<\_ACEOF
21952#define HAVE_RL_CALLBACK 1
21953_ACEOF
21954
21955fi
21956
21957
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021958# check for readline 2.2
21959cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021960/* confdefs.h. */
21961_ACEOF
21962cat confdefs.h >>conftest.$ac_ext
21963cat >>conftest.$ac_ext <<_ACEOF
21964/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021965#include <readline/readline.h>
21966_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021967if { (ac_try="$ac_cpp conftest.$ac_ext"
21968case "(($ac_try" in
21969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21970 *) ac_try_echo=$ac_try;;
21971esac
21972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21973 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021974 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021975 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021976 rm -f conftest.er1
21977 cat conftest.err >&5
21978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021979 (exit $ac_status); } >/dev/null && {
21980 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21981 test ! -s conftest.err
21982 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021983 have_readline=yes
21984else
21985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021986sed 's/^/| /' conftest.$ac_ext >&5
21987
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021988 have_readline=no
21989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021990
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021991rm -f conftest.err conftest.$ac_ext
21992if test $have_readline = yes
21993then
21994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021995/* confdefs.h. */
21996_ACEOF
21997cat confdefs.h >>conftest.$ac_ext
21998cat >>conftest.$ac_ext <<_ACEOF
21999/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022000#include <readline/readline.h>
22001
22002_ACEOF
22003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022004 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022005
22006cat >>confdefs.h <<\_ACEOF
22007#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22008_ACEOF
22009
22010fi
22011rm -f conftest*
22012
22013fi
22014
Martin v. Löwis0daad592001-09-30 21:09:59 +000022015# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022016{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22017echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022018if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22019 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022020else
Martin v. Löwis11437992002-04-12 09:54:03 +000022021 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022022LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022024/* confdefs.h. */
22025_ACEOF
22026cat confdefs.h >>conftest.$ac_ext
22027cat >>conftest.$ac_ext <<_ACEOF
22028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022029
Martin v. Löwiseba40652007-08-30 20:10:57 +000022030/* Override any GCC internal prototype to avoid an error.
22031 Use char because int might match the return type of a GCC
22032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022033#ifdef __cplusplus
22034extern "C"
22035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022036char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022037int
22038main ()
22039{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022040return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022041 ;
22042 return 0;
22043}
22044_ACEOF
22045rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022046if { (ac_try="$ac_link"
22047case "(($ac_try" in
22048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22049 *) ac_try_echo=$ac_try;;
22050esac
22051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022054 grep -v '^ *+' conftest.er1 >conftest.err
22055 rm -f conftest.er1
22056 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022058 (exit $ac_status); } && {
22059 test -z "$ac_c_werror_flag" ||
22060 test ! -s conftest.err
22061 } && test -s conftest$ac_exeext &&
22062 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022063 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022064else
Martin v. Löwis11437992002-04-12 09:54:03 +000022065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022066sed 's/^/| /' conftest.$ac_ext >&5
22067
Martin v. Löwiseba40652007-08-30 20:10:57 +000022068 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022070
22071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022073LIBS=$ac_check_lib_save_LIBS
22074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022075{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22076echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022077if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022078
Martin v. Löwis11437992002-04-12 09:54:03 +000022079cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022080#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022081_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022082
Martin v. Löwis0daad592001-09-30 21:09:59 +000022083fi
22084
Michael W. Hudson54241132001-12-07 15:38:26 +000022085
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022086# also in 4.0
22087{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22088echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22089if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22090 echo $ECHO_N "(cached) $ECHO_C" >&6
22091else
22092 ac_check_lib_save_LIBS=$LIBS
22093LIBS="-lreadline $LIBS"
22094cat >conftest.$ac_ext <<_ACEOF
22095/* confdefs.h. */
22096_ACEOF
22097cat confdefs.h >>conftest.$ac_ext
22098cat >>conftest.$ac_ext <<_ACEOF
22099/* end confdefs.h. */
22100
22101/* Override any GCC internal prototype to avoid an error.
22102 Use char because int might match the return type of a GCC
22103 builtin and then its argument prototype would still apply. */
22104#ifdef __cplusplus
22105extern "C"
22106#endif
22107char rl_completion_display_matches_hook ();
22108int
22109main ()
22110{
22111return rl_completion_display_matches_hook ();
22112 ;
22113 return 0;
22114}
22115_ACEOF
22116rm -f conftest.$ac_objext conftest$ac_exeext
22117if { (ac_try="$ac_link"
22118case "(($ac_try" in
22119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22120 *) ac_try_echo=$ac_try;;
22121esac
22122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22123 (eval "$ac_link") 2>conftest.er1
22124 ac_status=$?
22125 grep -v '^ *+' conftest.er1 >conftest.err
22126 rm -f conftest.er1
22127 cat conftest.err >&5
22128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22129 (exit $ac_status); } && {
22130 test -z "$ac_c_werror_flag" ||
22131 test ! -s conftest.err
22132 } && test -s conftest$ac_exeext &&
22133 $as_test_x conftest$ac_exeext; then
22134 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22135else
22136 echo "$as_me: failed program was:" >&5
22137sed 's/^/| /' conftest.$ac_ext >&5
22138
22139 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22140fi
22141
22142rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22143 conftest$ac_exeext conftest.$ac_ext
22144LIBS=$ac_check_lib_save_LIBS
22145fi
22146{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22147echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22148if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22149
22150cat >>confdefs.h <<\_ACEOF
22151#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22152_ACEOF
22153
22154fi
22155
22156
Martin v. Löwis0daad592001-09-30 21:09:59 +000022157# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022158{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22159echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022160if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22161 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022162else
Martin v. Löwis11437992002-04-12 09:54:03 +000022163 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022164LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022165cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022166/* confdefs.h. */
22167_ACEOF
22168cat confdefs.h >>conftest.$ac_ext
22169cat >>conftest.$ac_ext <<_ACEOF
22170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022171
Martin v. Löwiseba40652007-08-30 20:10:57 +000022172/* Override any GCC internal prototype to avoid an error.
22173 Use char because int might match the return type of a GCC
22174 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022175#ifdef __cplusplus
22176extern "C"
22177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022178char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022179int
22180main ()
22181{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022182return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022183 ;
22184 return 0;
22185}
22186_ACEOF
22187rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022188if { (ac_try="$ac_link"
22189case "(($ac_try" in
22190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22191 *) ac_try_echo=$ac_try;;
22192esac
22193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22194 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022196 grep -v '^ *+' conftest.er1 >conftest.err
22197 rm -f conftest.er1
22198 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022200 (exit $ac_status); } && {
22201 test -z "$ac_c_werror_flag" ||
22202 test ! -s conftest.err
22203 } && test -s conftest$ac_exeext &&
22204 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022205 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022206else
Martin v. Löwis11437992002-04-12 09:54:03 +000022207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022208sed 's/^/| /' conftest.$ac_ext >&5
22209
Martin v. Löwiseba40652007-08-30 20:10:57 +000022210 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022212
22213rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022214 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022215LIBS=$ac_check_lib_save_LIBS
22216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022217{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22218echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022219if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022220
Martin v. Löwis11437992002-04-12 09:54:03 +000022221cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022222#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022223_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022224
Guido van Rossum353ae582001-07-10 16:45:32 +000022225fi
22226
Jack Jansendd19cf82001-12-06 22:36:17 +000022227
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022228# also in readline 4.2
22229cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022230/* confdefs.h. */
22231_ACEOF
22232cat confdefs.h >>conftest.$ac_ext
22233cat >>conftest.$ac_ext <<_ACEOF
22234/* end confdefs.h. */
22235#include <readline/readline.h>
22236_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022237if { (ac_try="$ac_cpp conftest.$ac_ext"
22238case "(($ac_try" in
22239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22240 *) ac_try_echo=$ac_try;;
22241esac
22242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22243 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022244 ac_status=$?
22245 grep -v '^ *+' conftest.er1 >conftest.err
22246 rm -f conftest.er1
22247 cat conftest.err >&5
22248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022249 (exit $ac_status); } >/dev/null && {
22250 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22251 test ! -s conftest.err
22252 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022253 have_readline=yes
22254else
22255 echo "$as_me: failed program was:" >&5
22256sed 's/^/| /' conftest.$ac_ext >&5
22257
22258 have_readline=no
22259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022260
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022261rm -f conftest.err conftest.$ac_ext
22262if test $have_readline = yes
22263then
22264 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022265/* confdefs.h. */
22266_ACEOF
22267cat confdefs.h >>conftest.$ac_ext
22268cat >>conftest.$ac_ext <<_ACEOF
22269/* end confdefs.h. */
22270#include <readline/readline.h>
22271
22272_ACEOF
22273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22274 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22275
22276cat >>confdefs.h <<\_ACEOF
22277#define HAVE_RL_CATCH_SIGNAL 1
22278_ACEOF
22279
22280fi
22281rm -f conftest*
22282
22283fi
22284
Martin v. Löwis82bca632006-02-10 20:49:30 +000022285# End of readline checks: restore LIBS
22286LIBS=$LIBS_no_readline
22287
Martin v. Löwiseba40652007-08-30 20:10:57 +000022288{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22289echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022290if test "${ac_cv_broken_nice+set}" = set; then
22291 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022292else
Martin v. Löwis11437992002-04-12 09:54:03 +000022293
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022294if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022295 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022296else
Martin v. Löwis11437992002-04-12 09:54:03 +000022297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022298/* confdefs.h. */
22299_ACEOF
22300cat confdefs.h >>conftest.$ac_ext
22301cat >>conftest.$ac_ext <<_ACEOF
22302/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022303
22304int main()
22305{
22306 int val1 = nice(1);
22307 if (val1 != -1 && val1 == nice(2))
22308 exit(0);
22309 exit(1);
22310}
22311
Martin v. Löwis11437992002-04-12 09:54:03 +000022312_ACEOF
22313rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022314if { (ac_try="$ac_link"
22315case "(($ac_try" in
22316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22317 *) ac_try_echo=$ac_try;;
22318esac
22319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22320 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022321 ac_status=$?
22322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022324 { (case "(($ac_try" in
22325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22326 *) ac_try_echo=$ac_try;;
22327esac
22328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22329 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022330 ac_status=$?
22331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22332 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022333 ac_cv_broken_nice=yes
22334else
Martin v. Löwis11437992002-04-12 09:54:03 +000022335 echo "$as_me: program exited with status $ac_status" >&5
22336echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022337sed 's/^/| /' conftest.$ac_ext >&5
22338
Martin v. Löwis11437992002-04-12 09:54:03 +000022339( exit $ac_status )
22340ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022342rm -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 +000022343fi
22344
Martin v. Löwiseba40652007-08-30 20:10:57 +000022345
22346fi
22347
22348{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22349echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022350if test "$ac_cv_broken_nice" = yes
22351then
Martin v. Löwis11437992002-04-12 09:54:03 +000022352
22353cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022354#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022355_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022356
22357fi
22358
Martin v. Löwiseba40652007-08-30 20:10:57 +000022359{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22360echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022361if test "$cross_compiling" = yes; then
22362 ac_cv_broken_poll=no
22363else
22364 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022365/* confdefs.h. */
22366_ACEOF
22367cat confdefs.h >>conftest.$ac_ext
22368cat >>conftest.$ac_ext <<_ACEOF
22369/* end confdefs.h. */
22370
22371#include <poll.h>
22372
22373int main (void)
22374 {
22375 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22376
22377 close (42);
22378
22379 int poll_test = poll (&poll_struct, 1, 0);
22380
22381 if (poll_test < 0)
22382 {
22383 exit(0);
22384 }
22385 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22386 {
22387 exit(0);
22388 }
22389 else
22390 {
22391 exit(1);
22392 }
22393 }
22394
22395_ACEOF
22396rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022397if { (ac_try="$ac_link"
22398case "(($ac_try" in
22399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22400 *) ac_try_echo=$ac_try;;
22401esac
22402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22403 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022404 ac_status=$?
22405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22406 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022407 { (case "(($ac_try" in
22408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22409 *) ac_try_echo=$ac_try;;
22410esac
22411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22412 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022413 ac_status=$?
22414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22415 (exit $ac_status); }; }; then
22416 ac_cv_broken_poll=yes
22417else
22418 echo "$as_me: program exited with status $ac_status" >&5
22419echo "$as_me: failed program was:" >&5
22420sed 's/^/| /' conftest.$ac_ext >&5
22421
22422( exit $ac_status )
22423ac_cv_broken_poll=no
22424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022425rm -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 +000022426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022427
22428
22429{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
22430echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022431if test "$ac_cv_broken_poll" = yes
22432then
22433
22434cat >>confdefs.h <<\_ACEOF
22435#define HAVE_BROKEN_POLL 1
22436_ACEOF
22437
22438fi
22439
Brett Cannon43802422005-02-10 20:48:03 +000022440# 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 +000022441# (which is not required by ISO C or UNIX spec) and/or if we support
22442# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000022443{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
22444echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022445if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
22446 echo $ECHO_N "(cached) $ECHO_C" >&6
22447else
22448 cat >conftest.$ac_ext <<_ACEOF
22449/* confdefs.h. */
22450_ACEOF
22451cat confdefs.h >>conftest.$ac_ext
22452cat >>conftest.$ac_ext <<_ACEOF
22453/* end confdefs.h. */
22454#include <sys/types.h>
22455#include <$ac_cv_struct_tm>
22456
22457
22458int
22459main ()
22460{
22461static struct tm ac_aggr;
22462if (ac_aggr.tm_zone)
22463return 0;
22464 ;
22465 return 0;
22466}
22467_ACEOF
22468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022469if { (ac_try="$ac_compile"
22470case "(($ac_try" in
22471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22472 *) ac_try_echo=$ac_try;;
22473esac
22474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22475 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022476 ac_status=$?
22477 grep -v '^ *+' conftest.er1 >conftest.err
22478 rm -f conftest.er1
22479 cat conftest.err >&5
22480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022481 (exit $ac_status); } && {
22482 test -z "$ac_c_werror_flag" ||
22483 test ! -s conftest.err
22484 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022485 ac_cv_member_struct_tm_tm_zone=yes
22486else
22487 echo "$as_me: failed program was:" >&5
22488sed 's/^/| /' conftest.$ac_ext >&5
22489
Martin v. Löwiseba40652007-08-30 20:10:57 +000022490 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000022491/* confdefs.h. */
22492_ACEOF
22493cat confdefs.h >>conftest.$ac_ext
22494cat >>conftest.$ac_ext <<_ACEOF
22495/* end confdefs.h. */
22496#include <sys/types.h>
22497#include <$ac_cv_struct_tm>
22498
22499
22500int
22501main ()
22502{
22503static struct tm ac_aggr;
22504if (sizeof ac_aggr.tm_zone)
22505return 0;
22506 ;
22507 return 0;
22508}
22509_ACEOF
22510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022511if { (ac_try="$ac_compile"
22512case "(($ac_try" in
22513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22514 *) ac_try_echo=$ac_try;;
22515esac
22516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22517 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022518 ac_status=$?
22519 grep -v '^ *+' conftest.er1 >conftest.err
22520 rm -f conftest.er1
22521 cat conftest.err >&5
22522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022523 (exit $ac_status); } && {
22524 test -z "$ac_c_werror_flag" ||
22525 test ! -s conftest.err
22526 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022527 ac_cv_member_struct_tm_tm_zone=yes
22528else
22529 echo "$as_me: failed program was:" >&5
22530sed 's/^/| /' conftest.$ac_ext >&5
22531
Martin v. Löwiseba40652007-08-30 20:10:57 +000022532 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000022533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022534
22535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022537
22538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022540{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
22541echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022542if test $ac_cv_member_struct_tm_tm_zone = yes; then
22543
22544cat >>confdefs.h <<_ACEOF
22545#define HAVE_STRUCT_TM_TM_ZONE 1
22546_ACEOF
22547
22548
22549fi
22550
22551if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
22552
22553cat >>confdefs.h <<\_ACEOF
22554#define HAVE_TM_ZONE 1
22555_ACEOF
22556
22557else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022558 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
22559echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
22560if test "${ac_cv_have_decl_tzname+set}" = set; then
22561 echo $ECHO_N "(cached) $ECHO_C" >&6
22562else
22563 cat >conftest.$ac_ext <<_ACEOF
22564/* confdefs.h. */
22565_ACEOF
22566cat confdefs.h >>conftest.$ac_ext
22567cat >>conftest.$ac_ext <<_ACEOF
22568/* end confdefs.h. */
22569#include <time.h>
22570
22571int
22572main ()
22573{
22574#ifndef tzname
22575 (void) tzname;
22576#endif
22577
22578 ;
22579 return 0;
22580}
22581_ACEOF
22582rm -f conftest.$ac_objext
22583if { (ac_try="$ac_compile"
22584case "(($ac_try" in
22585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22586 *) ac_try_echo=$ac_try;;
22587esac
22588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22589 (eval "$ac_compile") 2>conftest.er1
22590 ac_status=$?
22591 grep -v '^ *+' conftest.er1 >conftest.err
22592 rm -f conftest.er1
22593 cat conftest.err >&5
22594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22595 (exit $ac_status); } && {
22596 test -z "$ac_c_werror_flag" ||
22597 test ! -s conftest.err
22598 } && test -s conftest.$ac_objext; then
22599 ac_cv_have_decl_tzname=yes
22600else
22601 echo "$as_me: failed program was:" >&5
22602sed 's/^/| /' conftest.$ac_ext >&5
22603
22604 ac_cv_have_decl_tzname=no
22605fi
22606
22607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22608fi
22609{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
22610echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
22611if test $ac_cv_have_decl_tzname = yes; then
22612
22613cat >>confdefs.h <<_ACEOF
22614#define HAVE_DECL_TZNAME 1
22615_ACEOF
22616
22617
22618else
22619 cat >>confdefs.h <<_ACEOF
22620#define HAVE_DECL_TZNAME 0
22621_ACEOF
22622
22623
22624fi
22625
22626
22627 { echo "$as_me:$LINENO: checking for tzname" >&5
22628echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022629if test "${ac_cv_var_tzname+set}" = set; then
22630 echo $ECHO_N "(cached) $ECHO_C" >&6
22631else
22632 cat >conftest.$ac_ext <<_ACEOF
22633/* confdefs.h. */
22634_ACEOF
22635cat confdefs.h >>conftest.$ac_ext
22636cat >>conftest.$ac_ext <<_ACEOF
22637/* end confdefs.h. */
22638#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000022639#if !HAVE_DECL_TZNAME
22640extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000022641#endif
22642
22643int
22644main ()
22645{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022646return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000022647 ;
22648 return 0;
22649}
22650_ACEOF
22651rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022652if { (ac_try="$ac_link"
22653case "(($ac_try" in
22654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22655 *) ac_try_echo=$ac_try;;
22656esac
22657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22658 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022659 ac_status=$?
22660 grep -v '^ *+' conftest.er1 >conftest.err
22661 rm -f conftest.er1
22662 cat conftest.err >&5
22663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022664 (exit $ac_status); } && {
22665 test -z "$ac_c_werror_flag" ||
22666 test ! -s conftest.err
22667 } && test -s conftest$ac_exeext &&
22668 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000022669 ac_cv_var_tzname=yes
22670else
22671 echo "$as_me: failed program was:" >&5
22672sed 's/^/| /' conftest.$ac_ext >&5
22673
Martin v. Löwiseba40652007-08-30 20:10:57 +000022674 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000022675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022676
22677rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000022678 conftest$ac_exeext conftest.$ac_ext
22679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022680{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
22681echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022682 if test $ac_cv_var_tzname = yes; then
22683
22684cat >>confdefs.h <<\_ACEOF
22685#define HAVE_TZNAME 1
22686_ACEOF
22687
22688 fi
22689fi
22690
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022691
Martin v. Löwis1d459062005-03-14 21:23:33 +000022692# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000022693{ echo "$as_me:$LINENO: checking for working tzset()" >&5
22694echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022695if test "${ac_cv_working_tzset+set}" = set; then
22696 echo $ECHO_N "(cached) $ECHO_C" >&6
22697else
22698
22699if test "$cross_compiling" = yes; then
22700 ac_cv_working_tzset=no
22701else
22702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022703/* confdefs.h. */
22704_ACEOF
22705cat confdefs.h >>conftest.$ac_ext
22706cat >>conftest.$ac_ext <<_ACEOF
22707/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022708
22709#include <stdlib.h>
22710#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000022711#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000022712
22713#if HAVE_TZNAME
22714extern char *tzname[];
22715#endif
22716
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022717int main()
22718{
Brett Cannon18367812003-09-19 00:59:16 +000022719 /* Note that we need to ensure that not only does tzset(3)
22720 do 'something' with localtime, but it works as documented
22721 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000022722 This includes making sure that tzname is set properly if
22723 tm->tm_zone does not exist since it is the alternative way
22724 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000022725
22726 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000022727 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000022728 */
22729
Martin v. Löwis1d459062005-03-14 21:23:33 +000022730 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000022731 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
22732
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022733 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022734 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022735 if (localtime(&groundhogday)->tm_hour != 0)
22736 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022737#if HAVE_TZNAME
22738 /* For UTC, tzname[1] is sometimes "", sometimes " " */
22739 if (strcmp(tzname[0], "UTC") ||
22740 (tzname[1][0] != 0 && tzname[1][0] != ' '))
22741 exit(1);
22742#endif
Brett Cannon18367812003-09-19 00:59:16 +000022743
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022744 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022745 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022746 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022747 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022748#if HAVE_TZNAME
22749 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
22750 exit(1);
22751#endif
Brett Cannon18367812003-09-19 00:59:16 +000022752
22753 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
22754 tzset();
22755 if (localtime(&groundhogday)->tm_hour != 11)
22756 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022757#if HAVE_TZNAME
22758 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
22759 exit(1);
22760#endif
22761
22762#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000022763 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
22764 exit(1);
22765 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
22766 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022767#endif
Brett Cannon18367812003-09-19 00:59:16 +000022768
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022769 exit(0);
22770}
22771
22772_ACEOF
22773rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022774if { (ac_try="$ac_link"
22775case "(($ac_try" in
22776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22777 *) ac_try_echo=$ac_try;;
22778esac
22779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22780 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022781 ac_status=$?
22782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22783 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022784 { (case "(($ac_try" in
22785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22786 *) ac_try_echo=$ac_try;;
22787esac
22788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22789 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022790 ac_status=$?
22791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22792 (exit $ac_status); }; }; then
22793 ac_cv_working_tzset=yes
22794else
22795 echo "$as_me: program exited with status $ac_status" >&5
22796echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022797sed 's/^/| /' conftest.$ac_ext >&5
22798
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022799( exit $ac_status )
22800ac_cv_working_tzset=no
22801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022802rm -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 +000022803fi
22804
Martin v. Löwiseba40652007-08-30 20:10:57 +000022805
22806fi
22807
22808{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
22809echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022810if test "$ac_cv_working_tzset" = yes
22811then
22812
22813cat >>confdefs.h <<\_ACEOF
22814#define HAVE_WORKING_TZSET 1
22815_ACEOF
22816
22817fi
22818
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022819# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000022820{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
22821echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022822if test "${ac_cv_stat_tv_nsec+set}" = set; then
22823 echo $ECHO_N "(cached) $ECHO_C" >&6
22824else
22825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022826/* confdefs.h. */
22827_ACEOF
22828cat confdefs.h >>conftest.$ac_ext
22829cat >>conftest.$ac_ext <<_ACEOF
22830/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022831#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022832int
22833main ()
22834{
22835
22836struct stat st;
22837st.st_mtim.tv_nsec = 1;
22838
22839 ;
22840 return 0;
22841}
22842_ACEOF
22843rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022844if { (ac_try="$ac_compile"
22845case "(($ac_try" in
22846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22847 *) ac_try_echo=$ac_try;;
22848esac
22849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22850 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022852 grep -v '^ *+' conftest.er1 >conftest.err
22853 rm -f conftest.er1
22854 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022856 (exit $ac_status); } && {
22857 test -z "$ac_c_werror_flag" ||
22858 test ! -s conftest.err
22859 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000022860 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022861else
22862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022863sed 's/^/| /' conftest.$ac_ext >&5
22864
Martin v. Löwiseba40652007-08-30 20:10:57 +000022865 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022866fi
22867
Martin v. Löwiseba40652007-08-30 20:10:57 +000022868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22869fi
22870
22871{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
22872echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022873if test "$ac_cv_stat_tv_nsec" = yes
22874then
22875
22876cat >>confdefs.h <<\_ACEOF
22877#define HAVE_STAT_TV_NSEC 1
22878_ACEOF
22879
22880fi
22881
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022882# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000022883{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
22884echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022885if test "${ac_cv_stat_tv_nsec2+set}" = set; then
22886 echo $ECHO_N "(cached) $ECHO_C" >&6
22887else
22888 cat >conftest.$ac_ext <<_ACEOF
22889/* confdefs.h. */
22890_ACEOF
22891cat confdefs.h >>conftest.$ac_ext
22892cat >>conftest.$ac_ext <<_ACEOF
22893/* end confdefs.h. */
22894#include <sys/stat.h>
22895int
22896main ()
22897{
22898
22899struct stat st;
22900st.st_mtimespec.tv_nsec = 1;
22901
22902 ;
22903 return 0;
22904}
22905_ACEOF
22906rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022907if { (ac_try="$ac_compile"
22908case "(($ac_try" in
22909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22910 *) ac_try_echo=$ac_try;;
22911esac
22912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022914 ac_status=$?
22915 grep -v '^ *+' conftest.er1 >conftest.err
22916 rm -f conftest.er1
22917 cat conftest.err >&5
22918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022919 (exit $ac_status); } && {
22920 test -z "$ac_c_werror_flag" ||
22921 test ! -s conftest.err
22922 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022923 ac_cv_stat_tv_nsec2=yes
22924else
22925 echo "$as_me: failed program was:" >&5
22926sed 's/^/| /' conftest.$ac_ext >&5
22927
Martin v. Löwiseba40652007-08-30 20:10:57 +000022928 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022929fi
22930
Martin v. Löwiseba40652007-08-30 20:10:57 +000022931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22932fi
22933
22934{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
22935echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022936if test "$ac_cv_stat_tv_nsec2" = yes
22937then
22938
22939cat >>confdefs.h <<\_ACEOF
22940#define HAVE_STAT_TV_NSEC2 1
22941_ACEOF
22942
22943fi
22944
Jack Jansen666b1e72001-10-31 12:11:48 +000022945# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000022946{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
22947echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022948if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
22949 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022950else
Martin v. Löwis11437992002-04-12 09:54:03 +000022951 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022952/* confdefs.h. */
22953_ACEOF
22954cat confdefs.h >>conftest.$ac_ext
22955cat >>conftest.$ac_ext <<_ACEOF
22956/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000022957#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022958int
22959main ()
22960{
Jack Jansen666b1e72001-10-31 12:11:48 +000022961
22962 int rtn;
22963 rtn = mvwdelch(0,0,0);
22964
Martin v. Löwis11437992002-04-12 09:54:03 +000022965 ;
22966 return 0;
22967}
22968_ACEOF
22969rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022970if { (ac_try="$ac_compile"
22971case "(($ac_try" in
22972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22973 *) ac_try_echo=$ac_try;;
22974esac
22975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22976 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022978 grep -v '^ *+' conftest.er1 >conftest.err
22979 rm -f conftest.er1
22980 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022982 (exit $ac_status); } && {
22983 test -z "$ac_c_werror_flag" ||
22984 test ! -s conftest.err
22985 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000022986 ac_cv_mvwdelch_is_expression=yes
22987else
Martin v. Löwis11437992002-04-12 09:54:03 +000022988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022989sed 's/^/| /' conftest.$ac_ext >&5
22990
Martin v. Löwiseba40652007-08-30 20:10:57 +000022991 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000022992fi
22993
Martin v. Löwiseba40652007-08-30 20:10:57 +000022994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22995fi
22996
22997{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
22998echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000022999
23000if test "$ac_cv_mvwdelch_is_expression" = yes
23001then
Martin v. Löwis11437992002-04-12 09:54:03 +000023002
23003cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023004#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023005_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023006
23007fi
23008
Martin v. Löwiseba40652007-08-30 20:10:57 +000023009{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23010echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023011if test "${ac_cv_window_has_flags+set}" = set; then
23012 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023013else
Martin v. Löwis11437992002-04-12 09:54:03 +000023014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023015/* confdefs.h. */
23016_ACEOF
23017cat confdefs.h >>conftest.$ac_ext
23018cat >>conftest.$ac_ext <<_ACEOF
23019/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023020#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023021int
23022main ()
23023{
Jack Jansen666b1e72001-10-31 12:11:48 +000023024
23025 WINDOW *w;
23026 w->_flags = 0;
23027
Martin v. Löwis11437992002-04-12 09:54:03 +000023028 ;
23029 return 0;
23030}
23031_ACEOF
23032rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023033if { (ac_try="$ac_compile"
23034case "(($ac_try" in
23035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23036 *) ac_try_echo=$ac_try;;
23037esac
23038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23039 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023041 grep -v '^ *+' conftest.er1 >conftest.err
23042 rm -f conftest.er1
23043 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023045 (exit $ac_status); } && {
23046 test -z "$ac_c_werror_flag" ||
23047 test ! -s conftest.err
23048 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023049 ac_cv_window_has_flags=yes
23050else
Martin v. Löwis11437992002-04-12 09:54:03 +000023051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023052sed 's/^/| /' conftest.$ac_ext >&5
23053
Martin v. Löwiseba40652007-08-30 20:10:57 +000023054 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023055fi
23056
Martin v. Löwiseba40652007-08-30 20:10:57 +000023057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23058fi
23059
23060{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23061echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023062
Jack Jansen666b1e72001-10-31 12:11:48 +000023063
23064if test "$ac_cv_window_has_flags" = yes
23065then
Martin v. Löwis11437992002-04-12 09:54:03 +000023066
23067cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023068#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023069_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023070
23071fi
23072
Martin v. Löwiseba40652007-08-30 20:10:57 +000023073{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23074echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023075cat >conftest.$ac_ext <<_ACEOF
23076/* confdefs.h. */
23077_ACEOF
23078cat confdefs.h >>conftest.$ac_ext
23079cat >>conftest.$ac_ext <<_ACEOF
23080/* end confdefs.h. */
23081#include <curses.h>
23082int
23083main ()
23084{
23085void *x=is_term_resized
23086 ;
23087 return 0;
23088}
23089_ACEOF
23090rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023091if { (ac_try="$ac_compile"
23092case "(($ac_try" in
23093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23094 *) ac_try_echo=$ac_try;;
23095esac
23096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23097 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023098 ac_status=$?
23099 grep -v '^ *+' conftest.er1 >conftest.err
23100 rm -f conftest.er1
23101 cat conftest.err >&5
23102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023103 (exit $ac_status); } && {
23104 test -z "$ac_c_werror_flag" ||
23105 test ! -s conftest.err
23106 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023107
23108cat >>confdefs.h <<\_ACEOF
23109#define HAVE_CURSES_IS_TERM_RESIZED 1
23110_ACEOF
23111
Martin v. Löwiseba40652007-08-30 20:10:57 +000023112 { echo "$as_me:$LINENO: result: yes" >&5
23113echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023114else
23115 echo "$as_me: failed program was:" >&5
23116sed 's/^/| /' conftest.$ac_ext >&5
23117
Martin v. Löwiseba40652007-08-30 20:10:57 +000023118 { echo "$as_me:$LINENO: result: no" >&5
23119echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023120
23121fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023122
Martin v. Löwiseba40652007-08-30 20:10:57 +000023123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23124
23125{ echo "$as_me:$LINENO: checking for resize_term" >&5
23126echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023127cat >conftest.$ac_ext <<_ACEOF
23128/* confdefs.h. */
23129_ACEOF
23130cat confdefs.h >>conftest.$ac_ext
23131cat >>conftest.$ac_ext <<_ACEOF
23132/* end confdefs.h. */
23133#include <curses.h>
23134int
23135main ()
23136{
23137void *x=resize_term
23138 ;
23139 return 0;
23140}
23141_ACEOF
23142rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023143if { (ac_try="$ac_compile"
23144case "(($ac_try" in
23145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23146 *) ac_try_echo=$ac_try;;
23147esac
23148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23149 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023150 ac_status=$?
23151 grep -v '^ *+' conftest.er1 >conftest.err
23152 rm -f conftest.er1
23153 cat conftest.err >&5
23154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023155 (exit $ac_status); } && {
23156 test -z "$ac_c_werror_flag" ||
23157 test ! -s conftest.err
23158 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023159
23160cat >>confdefs.h <<\_ACEOF
23161#define HAVE_CURSES_RESIZE_TERM 1
23162_ACEOF
23163
Martin v. Löwiseba40652007-08-30 20:10:57 +000023164 { echo "$as_me:$LINENO: result: yes" >&5
23165echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023166else
23167 echo "$as_me: failed program was:" >&5
23168sed 's/^/| /' conftest.$ac_ext >&5
23169
Martin v. Löwiseba40652007-08-30 20:10:57 +000023170 { echo "$as_me:$LINENO: result: no" >&5
23171echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023172
23173fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023174
Martin v. Löwiseba40652007-08-30 20:10:57 +000023175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23176
23177{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23178echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023179cat >conftest.$ac_ext <<_ACEOF
23180/* confdefs.h. */
23181_ACEOF
23182cat confdefs.h >>conftest.$ac_ext
23183cat >>conftest.$ac_ext <<_ACEOF
23184/* end confdefs.h. */
23185#include <curses.h>
23186int
23187main ()
23188{
23189void *x=resizeterm
23190 ;
23191 return 0;
23192}
23193_ACEOF
23194rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023195if { (ac_try="$ac_compile"
23196case "(($ac_try" in
23197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23198 *) ac_try_echo=$ac_try;;
23199esac
23200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23201 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023202 ac_status=$?
23203 grep -v '^ *+' conftest.er1 >conftest.err
23204 rm -f conftest.er1
23205 cat conftest.err >&5
23206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023207 (exit $ac_status); } && {
23208 test -z "$ac_c_werror_flag" ||
23209 test ! -s conftest.err
23210 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023211
23212cat >>confdefs.h <<\_ACEOF
23213#define HAVE_CURSES_RESIZETERM 1
23214_ACEOF
23215
Martin v. Löwiseba40652007-08-30 20:10:57 +000023216 { echo "$as_me:$LINENO: result: yes" >&5
23217echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023218else
23219 echo "$as_me: failed program was:" >&5
23220sed 's/^/| /' conftest.$ac_ext >&5
23221
Martin v. Löwiseba40652007-08-30 20:10:57 +000023222 { echo "$as_me:$LINENO: result: no" >&5
23223echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023224
23225fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023226
Martin v. Löwiseba40652007-08-30 20:10:57 +000023227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23228
23229{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23230echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023231
23232if test -r /dev/ptmx
23233then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023234 { echo "$as_me:$LINENO: result: yes" >&5
23235echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023236
23237cat >>confdefs.h <<\_ACEOF
23238#define HAVE_DEV_PTMX 1
23239_ACEOF
23240
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023241else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023242 { echo "$as_me:$LINENO: result: no" >&5
23243echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023244fi
23245
Martin v. Löwiseba40652007-08-30 20:10:57 +000023246{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23247echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023248
23249if test -r /dev/ptc
23250then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023251 { echo "$as_me:$LINENO: result: yes" >&5
23252echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023253
23254cat >>confdefs.h <<\_ACEOF
23255#define HAVE_DEV_PTC 1
23256_ACEOF
23257
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023258else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023259 { echo "$as_me:$LINENO: result: no" >&5
23260echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023261fi
23262
Martin v. Löwiseba40652007-08-30 20:10:57 +000023263{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23264echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023265if test "$cross_compiling" = yes; then
23266 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23267See \`config.log' for more details." >&5
23268echo "$as_me: error: cannot run test program while cross compiling
23269See \`config.log' for more details." >&2;}
23270 { (exit 1); exit 1; }; }
23271else
23272 cat >conftest.$ac_ext <<_ACEOF
23273/* confdefs.h. */
23274_ACEOF
23275cat confdefs.h >>conftest.$ac_ext
23276cat >>conftest.$ac_ext <<_ACEOF
23277/* end confdefs.h. */
23278#include <stdio.h>
23279#include <stddef.h>
23280#include <string.h>
23281
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023282#ifdef HAVE_SYS_TYPES_H
23283#include <sys/types.h>
23284#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023285
23286#ifdef HAVE_SSIZE_T
23287typedef ssize_t Py_ssize_t;
23288#elif SIZEOF_VOID_P == SIZEOF_LONG
23289typedef long Py_ssize_t;
23290#else
23291typedef int Py_ssize_t;
23292#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023293
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023294int main()
23295{
23296 char buffer[256];
23297
Brett Cannon09d12362006-05-11 05:11:33 +000023298 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23299 return 1;
23300
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023301 if (strcmp(buffer, "123"))
23302 return 1;
23303
23304 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23305 return 1;
23306
23307 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023308 return 1;
23309
23310 return 0;
23311}
23312_ACEOF
23313rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023314if { (ac_try="$ac_link"
23315case "(($ac_try" in
23316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23317 *) ac_try_echo=$ac_try;;
23318esac
23319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23320 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023321 ac_status=$?
23322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023324 { (case "(($ac_try" in
23325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23326 *) ac_try_echo=$ac_try;;
23327esac
23328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23329 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023330 ac_status=$?
23331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23332 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023333 { echo "$as_me:$LINENO: result: yes" >&5
23334echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023335
23336cat >>confdefs.h <<\_ACEOF
23337#define PY_FORMAT_SIZE_T "z"
23338_ACEOF
23339
23340else
23341 echo "$as_me: program exited with status $ac_status" >&5
23342echo "$as_me: failed program was:" >&5
23343sed 's/^/| /' conftest.$ac_ext >&5
23344
23345( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023346{ echo "$as_me:$LINENO: result: no" >&5
23347echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023349rm -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 +000023350fi
23351
Martin v. Löwiseba40652007-08-30 20:10:57 +000023352
23353
23354{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23355echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023356if test "${ac_cv_type_socklen_t+set}" = set; then
23357 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023358else
Martin v. Löwis11437992002-04-12 09:54:03 +000023359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023360/* confdefs.h. */
23361_ACEOF
23362cat confdefs.h >>conftest.$ac_ext
23363cat >>conftest.$ac_ext <<_ACEOF
23364/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023365
23366#ifdef HAVE_SYS_TYPES_H
23367#include <sys/types.h>
23368#endif
23369#ifdef HAVE_SYS_SOCKET_H
23370#include <sys/socket.h>
23371#endif
23372
23373
Martin v. Löwiseba40652007-08-30 20:10:57 +000023374typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023375int
23376main ()
23377{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023378if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023379 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023380if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023381 return 0;
23382 ;
23383 return 0;
23384}
23385_ACEOF
23386rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023387if { (ac_try="$ac_compile"
23388case "(($ac_try" in
23389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23390 *) ac_try_echo=$ac_try;;
23391esac
23392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23393 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023395 grep -v '^ *+' conftest.er1 >conftest.err
23396 rm -f conftest.er1
23397 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023399 (exit $ac_status); } && {
23400 test -z "$ac_c_werror_flag" ||
23401 test ! -s conftest.err
23402 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000023403 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000023404else
Martin v. Löwis11437992002-04-12 09:54:03 +000023405 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023406sed 's/^/| /' conftest.$ac_ext >&5
23407
Martin v. Löwiseba40652007-08-30 20:10:57 +000023408 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000023409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023410
23411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023413{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23414echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023415if test $ac_cv_type_socklen_t = yes; then
23416 :
23417else
Guido van Rossum95713eb2000-05-18 20:53:31 +000023418
Martin v. Löwis01c04012002-11-11 14:58:44 +000023419cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023420#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000023421_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023422
23423fi
23424
Michael W. Hudson54241132001-12-07 15:38:26 +000023425
Michael W. Hudson54241132001-12-07 15:38:26 +000023426
23427
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000023428for h in `(cd $srcdir;echo Python/thread_*.h)`
23429do
23430 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
23431done
23432
Michael W. Hudson54241132001-12-07 15:38:26 +000023433
Neal Norwitzd24499d2005-12-18 21:36:39 +000023434SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023435{ echo "$as_me:$LINENO: checking for build directories" >&5
23436echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023437for dir in $SRCDIRS; do
23438 if test ! -d $dir; then
23439 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000023440 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023441done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023442{ echo "$as_me:$LINENO: result: done" >&5
23443echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000023444
Guido van Rossum627b2d71993-12-24 10:39:16 +000023445# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000023446ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000023447
Martin v. Löwis11437992002-04-12 09:54:03 +000023448cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023449# This file is a shell script that caches the results of configure
23450# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000023451# scripts and configure runs, see configure's option --config-cache.
23452# It is not useful on other systems. If it contains results you don't
23453# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023454#
Martin v. Löwis11437992002-04-12 09:54:03 +000023455# config.status only pays attention to the cache file if you give it
23456# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023457#
Skip Montanaro6dead952003-09-25 14:50:04 +000023458# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000023459# loading this file, other *unset* `ac_cv_foo' will be assigned the
23460# following values.
23461
23462_ACEOF
23463
Guido van Rossumf78abae1997-01-21 22:02:36 +000023464# The following way of writing the cache mishandles newlines in values,
23465# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023466# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023467# Ultrix sh set writes to stderr and can't be redirected directly,
23468# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023469(
23470 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23471 eval ac_val=\$$ac_var
23472 case $ac_val in #(
23473 *${as_nl}*)
23474 case $ac_var in #(
23475 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23476echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23477 esac
23478 case $ac_var in #(
23479 _ | IFS | as_nl) ;; #(
23480 *) $as_unset $ac_var ;;
23481 esac ;;
23482 esac
23483 done
23484
Martin v. Löwis11437992002-04-12 09:54:03 +000023485 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000023486 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23487 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000023488 # `set' does not quote correctly, so add quotes (double-quote
23489 # substitution turns \\\\ into \\, and sed turns \\ into \).
23490 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023491 "s/'/'\\\\''/g;
23492 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023493 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000023494 *)
23495 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023496 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000023497 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023498 esac |
23499 sort
23500) |
Martin v. Löwis11437992002-04-12 09:54:03 +000023501 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023502 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000023503 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000023504 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000023505 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23506 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000023507 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23508 :end' >>confcache
23509if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23510 if test -w "$cache_file"; then
23511 test "x$cache_file" != "x/dev/null" &&
23512 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23513echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023514 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023515 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023516 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23517echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023518 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023519fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023520rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000023521
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023522test "x$prefix" = xNONE && prefix=$ac_default_prefix
23523# Let make expand exec_prefix.
23524test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000023525
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023526DEFS=-DHAVE_CONFIG_H
23527
Skip Montanaro6dead952003-09-25 14:50:04 +000023528ac_libobjs=
23529ac_ltlibobjs=
23530for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23531 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023532 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23533 ac_i=`echo "$ac_i" | sed "$ac_script"`
23534 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23535 # will be set to the directory where LIBOBJS objects are built.
23536 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23537 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000023538done
23539LIBOBJS=$ac_libobjs
23540
23541LTLIBOBJS=$ac_ltlibobjs
23542
23543
Martin v. Löwis11437992002-04-12 09:54:03 +000023544
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023545: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000023546ac_clean_files_save=$ac_clean_files
23547ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23548{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23549echo "$as_me: creating $CONFIG_STATUS" >&6;}
23550cat >$CONFIG_STATUS <<_ACEOF
23551#! $SHELL
23552# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023553# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023554# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000023555# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023556
Martin v. Löwis11437992002-04-12 09:54:03 +000023557debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000023558ac_cs_recheck=false
23559ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023560SHELL=\${CONFIG_SHELL-$SHELL}
23561_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000023562
Martin v. Löwis11437992002-04-12 09:54:03 +000023563cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023564## --------------------- ##
23565## M4sh Initialization. ##
23566## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000023567
Martin v. Löwiseba40652007-08-30 20:10:57 +000023568# Be more Bourne compatible
23569DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023570if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23571 emulate sh
23572 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023573 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23574 # is contrary to our usage. Disable this feature.
23575 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023576 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000023577else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023578 case `(set -o) 2>/dev/null` in
23579 *posix*) set -o posix ;;
23580esac
23581
Martin v. Löwis11437992002-04-12 09:54:03 +000023582fi
Michael W. Hudson54241132001-12-07 15:38:26 +000023583
Skip Montanaro6dead952003-09-25 14:50:04 +000023584
Martin v. Löwis11437992002-04-12 09:54:03 +000023585
23586
Martin v. Löwiseba40652007-08-30 20:10:57 +000023587# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000023588# Avoid depending upon Character Ranges.
23589as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23590as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23591as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23592as_cr_digits='0123456789'
23593as_cr_alnum=$as_cr_Letters$as_cr_digits
23594
23595# The user is always right.
23596if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023597 echo "#! /bin/sh" >conf$$.sh
23598 echo "exit 0" >>conf$$.sh
23599 chmod +x conf$$.sh
23600 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023601 PATH_SEPARATOR=';'
23602 else
23603 PATH_SEPARATOR=:
23604 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023605 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023606fi
23607
Martin v. Löwiseba40652007-08-30 20:10:57 +000023608# Support unset when possible.
23609if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23610 as_unset=unset
23611else
23612 as_unset=false
23613fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023614
Martin v. Löwiseba40652007-08-30 20:10:57 +000023615
23616# IFS
23617# We need space, tab and new line, in precisely that order. Quoting is
23618# there to prevent editors from complaining about space-tab.
23619# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23620# splitting by setting IFS to empty value.)
23621as_nl='
23622'
23623IFS=" "" $as_nl"
23624
23625# Find who we are. Look in the path if we contain no directory separator.
23626case $0 in
23627 *[\\/]* ) as_myself=$0 ;;
23628 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000023629for as_dir in $PATH
23630do
23631 IFS=$as_save_IFS
23632 test -z "$as_dir" && as_dir=.
23633 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23634done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023635IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000023636
Martin v. Löwiseba40652007-08-30 20:10:57 +000023637 ;;
23638esac
23639# We did not find ourselves, most probably we were run as `sh COMMAND'
23640# in which case we are not to be found in the path.
23641if test "x$as_myself" = x; then
23642 as_myself=$0
23643fi
23644if test ! -f "$as_myself"; then
23645 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23646 { (exit 1); exit 1; }
23647fi
23648
23649# Work around bugs in pre-3.0 UWIN ksh.
23650for as_var in ENV MAIL MAILPATH
23651do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23652done
23653PS1='$ '
23654PS2='> '
23655PS4='+ '
23656
23657# NLS nuisances.
23658for as_var in \
23659 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23660 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23661 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000023662do
Martin v. Löwiseba40652007-08-30 20:10:57 +000023663 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23664 eval $as_var=C; export $as_var
23665 else
23666 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23667 fi
23668done
23669
23670# Required to use basename.
23671if expr a : '\(a\)' >/dev/null 2>&1 &&
23672 test "X`expr 00001 : '.*\(...\)'`" = X001; then
23673 as_expr=expr
23674else
23675 as_expr=false
23676fi
23677
23678if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
23679 as_basename=basename
23680else
23681 as_basename=false
23682fi
23683
23684
23685# Name of the executable.
23686as_me=`$as_basename -- "$0" ||
23687$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23688 X"$0" : 'X\(//\)$' \| \
23689 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
23690echo X/"$0" |
23691 sed '/^.*\/\([^/][^/]*\)\/*$/{
23692 s//\1/
23693 q
23694 }
23695 /^X\/\(\/\/\)$/{
23696 s//\1/
23697 q
23698 }
23699 /^X\/\(\/\).*/{
23700 s//\1/
23701 q
23702 }
23703 s/.*/./; q'`
23704
23705# CDPATH.
23706$as_unset CDPATH
23707
23708
23709
Martin v. Löwis11437992002-04-12 09:54:03 +000023710 as_lineno_1=$LINENO
23711 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000023712 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000023713 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000023714
Martin v. Löwis11437992002-04-12 09:54:03 +000023715 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23716 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000023717 # line-number line after each line using $LINENO; the second 'sed'
23718 # does the real work. The second script uses 'N' to pair each
23719 # line-number line with the line containing $LINENO, and appends
23720 # trailing '-' during substitution so that $LINENO is not a special
23721 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000023722 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000023723 # scripts with optimization help from Paolo Bonzini. Blame Lee
23724 # E. McMahon (1931-1989) for sed's syntax. :-)
23725 sed -n '
23726 p
23727 /[$]LINENO/=
23728 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000023729 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023730 s/[$]LINENO.*/&-/
23731 t lineno
23732 b
23733 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000023734 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000023735 :loop
23736 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000023737 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000023738 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000023739 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000023740 chmod +x "$as_me.lineno" ||
23741 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023742 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023743
Martin v. Löwis11437992002-04-12 09:54:03 +000023744 # Don't try to exec as it changes $[0], causing all sort of problems
23745 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000023746 # original and so on. Autoconf is especially sensitive to this).
23747 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000023748 # Exit status is that of the last command.
23749 exit
23750}
23751
23752
Martin v. Löwiseba40652007-08-30 20:10:57 +000023753if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23754 as_dirname=dirname
23755else
23756 as_dirname=false
23757fi
23758
23759ECHO_C= ECHO_N= ECHO_T=
23760case `echo -n x` in
23761-n*)
23762 case `echo 'x\c'` in
23763 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23764 *) ECHO_C='\c';;
23765 esac;;
23766*)
23767 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000023768esac
23769
Martin v. Löwiseba40652007-08-30 20:10:57 +000023770if expr a : '\(a\)' >/dev/null 2>&1 &&
23771 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023772 as_expr=expr
23773else
23774 as_expr=false
23775fi
23776
23777rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000023778if test -d conf$$.dir; then
23779 rm -f conf$$.dir/conf$$.file
23780else
23781 rm -f conf$$.dir
23782 mkdir conf$$.dir
23783fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023784echo >conf$$.file
23785if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023786 as_ln_s='ln -s'
23787 # ... but there are two gotchas:
23788 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23789 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23790 # In both cases, we have to default to `cp -p'.
23791 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000023792 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000023793elif ln conf$$.file conf$$ 2>/dev/null; then
23794 as_ln_s=ln
23795else
23796 as_ln_s='cp -p'
23797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023798rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23799rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000023800
Skip Montanaro6dead952003-09-25 14:50:04 +000023801if mkdir -p . 2>/dev/null; then
23802 as_mkdir_p=:
23803else
Skip Montanarof0d5f792004-08-15 14:08:23 +000023804 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000023805 as_mkdir_p=false
23806fi
23807
Martin v. Löwiseba40652007-08-30 20:10:57 +000023808if test -x / >/dev/null 2>&1; then
23809 as_test_x='test -x'
23810else
23811 if ls -dL / >/dev/null 2>&1; then
23812 as_ls_L_option=L
23813 else
23814 as_ls_L_option=
23815 fi
23816 as_test_x='
23817 eval sh -c '\''
23818 if test -d "$1"; then
23819 test -d "$1/.";
23820 else
23821 case $1 in
23822 -*)set "./$1";;
23823 esac;
23824 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
23825 ???[sx]*):;;*)false;;esac;fi
23826 '\'' sh
23827 '
23828fi
23829as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000023830
23831# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023832as_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 +000023833
23834# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023835as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000023836
23837
Martin v. Löwis11437992002-04-12 09:54:03 +000023838exec 6>&1
23839
Martin v. Löwiseba40652007-08-30 20:10:57 +000023840# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000023841# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000023842# values after options handling.
23843ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000023844This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000023845generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000023846
23847 CONFIG_FILES = $CONFIG_FILES
23848 CONFIG_HEADERS = $CONFIG_HEADERS
23849 CONFIG_LINKS = $CONFIG_LINKS
23850 CONFIG_COMMANDS = $CONFIG_COMMANDS
23851 $ $0 $@
23852
Martin v. Löwiseba40652007-08-30 20:10:57 +000023853on `(hostname || uname -n) 2>/dev/null | sed 1q`
23854"
23855
Martin v. Löwis11437992002-04-12 09:54:03 +000023856_ACEOF
23857
Martin v. Löwiseba40652007-08-30 20:10:57 +000023858cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023859# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023860config_files="$ac_config_files"
23861config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000023862
Martin v. Löwiseba40652007-08-30 20:10:57 +000023863_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023864
23865cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023866ac_cs_usage="\
23867\`$as_me' instantiates files from templates according to the
23868current configuration.
23869
23870Usage: $0 [OPTIONS] [FILE]...
23871
23872 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000023873 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000023874 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000023875 -d, --debug don't remove temporary files
23876 --recheck update $as_me by reconfiguring in the same conditions
23877 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023878 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023879 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023880 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023881
23882Configuration files:
23883$config_files
23884
23885Configuration headers:
23886$config_headers
23887
23888Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000023889
Martin v. Löwiseba40652007-08-30 20:10:57 +000023890_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023891cat >>$CONFIG_STATUS <<_ACEOF
23892ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000023893python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000023894configured by $0, generated by GNU Autoconf 2.61,
23895 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000023896
Martin v. Löwiseba40652007-08-30 20:10:57 +000023897Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000023898This config.status script is free software; the Free Software Foundation
23899gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000023900
23901ac_pwd='$ac_pwd'
23902srcdir='$srcdir'
23903INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000023904_ACEOF
23905
23906cat >>$CONFIG_STATUS <<\_ACEOF
23907# If no file are specified by the user, then we need to provide default
23908# value. By we need to know if files were specified by the user.
23909ac_need_defaults=:
23910while test $# != 0
23911do
23912 case $1 in
23913 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000023914 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23915 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000023916 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000023917 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023918 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023919 ac_option=$1
23920 ac_optarg=$2
23921 ac_shift=shift
23922 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023923 esac
23924
Skip Montanaro6dead952003-09-25 14:50:04 +000023925 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000023926 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000023927 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23928 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023929 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23930 echo "$ac_cs_version"; exit ;;
23931 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000023932 debug=: ;;
23933 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000023934 $ac_shift
23935 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023936 ac_need_defaults=false;;
23937 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000023938 $ac_shift
23939 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023940 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023941 --he | --h)
23942 # Conflict between --help and --header
23943 { echo "$as_me: error: ambiguous option: $1
23944Try \`$0 --help' for more information." >&2
23945 { (exit 1); exit 1; }; };;
23946 --help | --hel | -h )
23947 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000023948 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23949 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23950 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023951
23952 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023953 -*) { echo "$as_me: error: unrecognized option: $1
23954Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023955 { (exit 1); exit 1; }; } ;;
23956
Martin v. Löwiseba40652007-08-30 20:10:57 +000023957 *) ac_config_targets="$ac_config_targets $1"
23958 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023959
23960 esac
23961 shift
23962done
23963
Skip Montanaro6dead952003-09-25 14:50:04 +000023964ac_configure_extra_args=
23965
23966if $ac_cs_silent; then
23967 exec 6>/dev/null
23968 ac_configure_extra_args="$ac_configure_extra_args --silent"
23969fi
23970
23971_ACEOF
23972cat >>$CONFIG_STATUS <<_ACEOF
23973if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023974 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23975 CONFIG_SHELL=$SHELL
23976 export CONFIG_SHELL
23977 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000023978fi
23979
Martin v. Löwis11437992002-04-12 09:54:03 +000023980_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023981cat >>$CONFIG_STATUS <<\_ACEOF
23982exec 5>>config.log
23983{
23984 echo
23985 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23986## Running $as_me. ##
23987_ASBOX
23988 echo "$ac_log"
23989} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023990
Martin v. Löwiseba40652007-08-30 20:10:57 +000023991_ACEOF
23992cat >>$CONFIG_STATUS <<_ACEOF
23993_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023994
23995cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023996
23997# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000023998for ac_config_target in $ac_config_targets
23999do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024000 case $ac_config_target in
24001 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24002 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24003 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24004 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
24005 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24006 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24007
Martin v. Löwis11437992002-04-12 09:54:03 +000024008 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24009echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24010 { (exit 1); exit 1; }; };;
24011 esac
24012done
24013
Martin v. Löwiseba40652007-08-30 20:10:57 +000024014
Martin v. Löwis11437992002-04-12 09:54:03 +000024015# If the user did not use the arguments to specify the items to instantiate,
24016# then the envvar interface is used. Set only those that are not.
24017# We use the long form for the default assignment because of an extremely
24018# bizarre bug on SunOS 4.1.3.
24019if $ac_need_defaults; then
24020 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24021 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24022fi
24023
Skip Montanaro6dead952003-09-25 14:50:04 +000024024# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024025# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024026# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024027# Hook for its removal unless debugging.
24028# Note that there is a small window in which the directory will not be cleaned:
24029# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024030$debug ||
24031{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024032 tmp=
24033 trap 'exit_status=$?
24034 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24035' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024036 trap '{ (exit 1); exit 1; }' 1 2 13 15
24037}
Martin v. Löwis11437992002-04-12 09:54:03 +000024038# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024039
Martin v. Löwis11437992002-04-12 09:54:03 +000024040{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024041 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024042 test -n "$tmp" && test -d "$tmp"
24043} ||
24044{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024045 tmp=./conf$$-$RANDOM
24046 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024047} ||
24048{
Skip Montanaro6dead952003-09-25 14:50:04 +000024049 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024050 { (exit 1); exit 1; }
24051}
24052
Martin v. Löwis11437992002-04-12 09:54:03 +000024053#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024054# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024055#
24056
24057# No need to generate the scripts if there are no CONFIG_FILES.
24058# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024059if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024060
24061_ACEOF
24062
Martin v. Löwiseba40652007-08-30 20:10:57 +000024063
24064
24065ac_delim='%!_!# '
24066for ac_last_try in false false false false false :; do
24067 cat >conf$$subs.sed <<_ACEOF
24068SHELL!$SHELL$ac_delim
24069PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24070PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24071PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24072PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24073PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24074PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24075exec_prefix!$exec_prefix$ac_delim
24076prefix!$prefix$ac_delim
24077program_transform_name!$program_transform_name$ac_delim
24078bindir!$bindir$ac_delim
24079sbindir!$sbindir$ac_delim
24080libexecdir!$libexecdir$ac_delim
24081datarootdir!$datarootdir$ac_delim
24082datadir!$datadir$ac_delim
24083sysconfdir!$sysconfdir$ac_delim
24084sharedstatedir!$sharedstatedir$ac_delim
24085localstatedir!$localstatedir$ac_delim
24086includedir!$includedir$ac_delim
24087oldincludedir!$oldincludedir$ac_delim
24088docdir!$docdir$ac_delim
24089infodir!$infodir$ac_delim
24090htmldir!$htmldir$ac_delim
24091dvidir!$dvidir$ac_delim
24092pdfdir!$pdfdir$ac_delim
24093psdir!$psdir$ac_delim
24094libdir!$libdir$ac_delim
24095localedir!$localedir$ac_delim
24096mandir!$mandir$ac_delim
24097DEFS!$DEFS$ac_delim
24098ECHO_C!$ECHO_C$ac_delim
24099ECHO_N!$ECHO_N$ac_delim
24100ECHO_T!$ECHO_T$ac_delim
24101LIBS!$LIBS$ac_delim
24102build_alias!$build_alias$ac_delim
24103host_alias!$host_alias$ac_delim
24104target_alias!$target_alias$ac_delim
24105VERSION!$VERSION$ac_delim
24106SOVERSION!$SOVERSION$ac_delim
24107CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24108UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24109PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
24110PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24111PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24112PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24113FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24114FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24115FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24116FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24117FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24118MACHDEP!$MACHDEP$ac_delim
24119SGI_ABI!$SGI_ABI$ac_delim
24120EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24121EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24122CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24123EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24124CC!$CC$ac_delim
24125CFLAGS!$CFLAGS$ac_delim
24126LDFLAGS!$LDFLAGS$ac_delim
24127CPPFLAGS!$CPPFLAGS$ac_delim
24128ac_ct_CC!$ac_ct_CC$ac_delim
24129EXEEXT!$EXEEXT$ac_delim
24130OBJEXT!$OBJEXT$ac_delim
24131CXX!$CXX$ac_delim
24132MAINCC!$MAINCC$ac_delim
24133CPP!$CPP$ac_delim
24134GREP!$GREP$ac_delim
24135EGREP!$EGREP$ac_delim
24136BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24137LIBRARY!$LIBRARY$ac_delim
24138LDLIBRARY!$LDLIBRARY$ac_delim
24139DLLLIBRARY!$DLLLIBRARY$ac_delim
24140BLDLIBRARY!$BLDLIBRARY$ac_delim
24141LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24142INSTSONAME!$INSTSONAME$ac_delim
24143RUNSHARED!$RUNSHARED$ac_delim
24144LINKCC!$LINKCC$ac_delim
24145RANLIB!$RANLIB$ac_delim
24146AR!$AR$ac_delim
24147SVNVERSION!$SVNVERSION$ac_delim
24148INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24149INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24150INSTALL_DATA!$INSTALL_DATA$ac_delim
24151LN!$LN$ac_delim
24152OPT!$OPT$ac_delim
24153BASECFLAGS!$BASECFLAGS$ac_delim
24154OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24155LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24156SO!$SO$ac_delim
24157LDSHARED!$LDSHARED$ac_delim
24158BLDSHARED!$BLDSHARED$ac_delim
24159CCSHARED!$CCSHARED$ac_delim
24160LINKFORSHARED!$LINKFORSHARED$ac_delim
24161CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24162SHLIBS!$SHLIBS$ac_delim
24163USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
24164SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
24165_ACEOF
24166
24167 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24168 break
24169 elif $ac_last_try; then
24170 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24171echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24172 { (exit 1); exit 1; }; }
24173 else
24174 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024175 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024176done
24177
24178ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24179if test -n "$ac_eof"; then
24180 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24181 ac_eof=`expr $ac_eof + 1`
24182fi
24183
24184cat >>$CONFIG_STATUS <<_ACEOF
24185cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24186/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24187_ACEOF
24188sed '
24189s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24190s/^/s,@/; s/!/@,|#_!!_#|/
24191:n
24192t n
24193s/'"$ac_delim"'$/,g/; t
24194s/$/\\/; p
24195N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24196' >>$CONFIG_STATUS <conf$$subs.sed
24197rm -f conf$$subs.sed
24198cat >>$CONFIG_STATUS <<_ACEOF
24199CEOF$ac_eof
24200_ACEOF
24201
24202
24203ac_delim='%!_!# '
24204for ac_last_try in false false false false false :; do
24205 cat >conf$$subs.sed <<_ACEOF
24206USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24207LDLAST!$LDLAST$ac_delim
24208THREADOBJ!$THREADOBJ$ac_delim
24209DLINCLDIR!$DLINCLDIR$ac_delim
24210DYNLOADFILE!$DYNLOADFILE$ac_delim
24211MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24212TRUE!$TRUE$ac_delim
24213LIBOBJS!$LIBOBJS$ac_delim
24214HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24215HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24216HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24217HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24218HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24219LIBM!$LIBM$ac_delim
24220LIBC!$LIBC$ac_delim
24221UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24222THREADHEADERS!$THREADHEADERS$ac_delim
24223SRCDIRS!$SRCDIRS$ac_delim
24224LTLIBOBJS!$LTLIBOBJS$ac_delim
24225_ACEOF
24226
24227 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
24228 break
24229 elif $ac_last_try; then
24230 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24231echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24232 { (exit 1); exit 1; }; }
24233 else
24234 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24235 fi
24236done
24237
24238ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24239if test -n "$ac_eof"; then
24240 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24241 ac_eof=`expr $ac_eof + 1`
24242fi
24243
24244cat >>$CONFIG_STATUS <<_ACEOF
24245cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24246/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24247_ACEOF
24248sed '
24249s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24250s/^/s,@/; s/!/@,|#_!!_#|/
24251:n
24252t n
24253s/'"$ac_delim"'$/,g/; t
24254s/$/\\/; p
24255N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24256' >>$CONFIG_STATUS <conf$$subs.sed
24257rm -f conf$$subs.sed
24258cat >>$CONFIG_STATUS <<_ACEOF
24259:end
24260s/|#_!!_#|//g
24261CEOF$ac_eof
24262_ACEOF
24263
24264
24265# VPATH may cause trouble with some makes, so we remove $(srcdir),
24266# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24267# trailing colons and then remove the whole line if VPATH becomes empty
24268# (actually we leave an empty line to preserve line numbers).
24269if test "x$srcdir" = x.; then
24270 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24271s/:*\$(srcdir):*/:/
24272s/:*\${srcdir}:*/:/
24273s/:*@srcdir@:*/:/
24274s/^\([^=]*=[ ]*\):*/\1/
24275s/:*$//
24276s/^[^=]*=[ ]*$//
24277}'
24278fi
24279
24280cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024281fi # test -n "$CONFIG_FILES"
24282
Martin v. Löwiseba40652007-08-30 20:10:57 +000024283
24284for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24285do
24286 case $ac_tag in
24287 :[FHLC]) ac_mode=$ac_tag; continue;;
24288 esac
24289 case $ac_mode$ac_tag in
24290 :[FHL]*:*);;
24291 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24292echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24293 { (exit 1); exit 1; }; };;
24294 :[FH]-) ac_tag=-:-;;
24295 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24296 esac
24297 ac_save_IFS=$IFS
24298 IFS=:
24299 set x $ac_tag
24300 IFS=$ac_save_IFS
24301 shift
24302 ac_file=$1
24303 shift
24304
24305 case $ac_mode in
24306 :L) ac_source=$1;;
24307 :[FH])
24308 ac_file_inputs=
24309 for ac_f
24310 do
24311 case $ac_f in
24312 -) ac_f="$tmp/stdin";;
24313 *) # Look for the file first in the build tree, then in the source tree
24314 # (if the path is not absolute). The absolute path cannot be DOS-style,
24315 # because $ac_f cannot contain `:'.
24316 test -f "$ac_f" ||
24317 case $ac_f in
24318 [\\/$]*) false;;
24319 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24320 esac ||
24321 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24322echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24323 { (exit 1); exit 1; }; };;
24324 esac
24325 ac_file_inputs="$ac_file_inputs $ac_f"
24326 done
24327
24328 # Let's still pretend it is `configure' which instantiates (i.e., don't
24329 # use $as_me), people would be surprised to read:
24330 # /* config.h. Generated by config.status. */
24331 configure_input="Generated from "`IFS=:
24332 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24333 if test x"$ac_file" != x-; then
24334 configure_input="$ac_file. $configure_input"
24335 { echo "$as_me:$LINENO: creating $ac_file" >&5
24336echo "$as_me: creating $ac_file" >&6;}
24337 fi
24338
24339 case $ac_tag in
24340 *:-:* | *:-) cat >"$tmp/stdin";;
24341 esac
24342 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024343 esac
24344
Martin v. Löwiseba40652007-08-30 20:10:57 +000024345 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024346$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024347 X"$ac_file" : 'X\(//\)[^/]' \| \
24348 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024349 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024350echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024351 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24352 s//\1/
24353 q
24354 }
24355 /^X\(\/\/\)[^/].*/{
24356 s//\1/
24357 q
24358 }
24359 /^X\(\/\/\)$/{
24360 s//\1/
24361 q
24362 }
24363 /^X\(\/\).*/{
24364 s//\1/
24365 q
24366 }
24367 s/.*/./; q'`
24368 { as_dir="$ac_dir"
24369 case $as_dir in #(
24370 -*) as_dir=./$as_dir;;
24371 esac
24372 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024373 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024374 while :; do
24375 case $as_dir in #(
24376 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24377 *) as_qdir=$as_dir;;
24378 esac
24379 as_dirs="'$as_qdir' $as_dirs"
24380 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024381$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024382 X"$as_dir" : 'X\(//\)[^/]' \| \
24383 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024384 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024385echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024386 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24387 s//\1/
24388 q
24389 }
24390 /^X\(\/\/\)[^/].*/{
24391 s//\1/
24392 q
24393 }
24394 /^X\(\/\/\)$/{
24395 s//\1/
24396 q
24397 }
24398 /^X\(\/\).*/{
24399 s//\1/
24400 q
24401 }
24402 s/.*/./; q'`
24403 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000024404 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024405 test -z "$as_dirs" || eval "mkdir $as_dirs"
24406 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24407echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000024408 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024409 ac_builddir=.
24410
Martin v. Löwiseba40652007-08-30 20:10:57 +000024411case "$ac_dir" in
24412.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24413*)
Martin v. Löwis11437992002-04-12 09:54:03 +000024414 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000024415 # A ".." for each directory in $ac_dir_suffix.
24416 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24417 case $ac_top_builddir_sub in
24418 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24419 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24420 esac ;;
24421esac
24422ac_abs_top_builddir=$ac_pwd
24423ac_abs_builddir=$ac_pwd$ac_dir_suffix
24424# for backward compatibility:
24425ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000024426
24427case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024428 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000024429 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024430 ac_top_srcdir=$ac_top_builddir_sub
24431 ac_abs_top_srcdir=$ac_pwd ;;
24432 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000024433 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024434 ac_top_srcdir=$srcdir
24435 ac_abs_top_srcdir=$srcdir ;;
24436 *) # Relative name.
24437 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24438 ac_top_srcdir=$ac_top_build_prefix$srcdir
24439 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024440esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024441ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000024442
Martin v. Löwis11437992002-04-12 09:54:03 +000024443
Martin v. Löwiseba40652007-08-30 20:10:57 +000024444 case $ac_mode in
24445 :F)
24446 #
24447 # CONFIG_FILE
24448 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024449
24450 case $INSTALL in
24451 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024452 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024453 esac
Brett Cannon19fab762007-06-02 03:02:29 +000024454_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024455
24456cat >>$CONFIG_STATUS <<\_ACEOF
24457# If the template does not know about datarootdir, expand it.
24458# FIXME: This hack should be removed a few years after 2.60.
24459ac_datarootdir_hack=; ac_datarootdir_seen=
24460
24461case `sed -n '/datarootdir/ {
24462 p
24463 q
24464}
24465/@datadir@/p
24466/@docdir@/p
24467/@infodir@/p
24468/@localedir@/p
24469/@mandir@/p
24470' $ac_file_inputs` in
24471*datarootdir*) ac_datarootdir_seen=yes;;
24472*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24473 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24474echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24475_ACEOF
24476cat >>$CONFIG_STATUS <<_ACEOF
24477 ac_datarootdir_hack='
24478 s&@datadir@&$datadir&g
24479 s&@docdir@&$docdir&g
24480 s&@infodir@&$infodir&g
24481 s&@localedir@&$localedir&g
24482 s&@mandir@&$mandir&g
24483 s&\\\${datarootdir}&$datarootdir&g' ;;
24484esac
24485_ACEOF
24486
24487# Neutralize VPATH when `$srcdir' = `.'.
24488# Shell code in configure.ac might set extrasub.
24489# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000024490cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024491 sed "$ac_vpsub
24492$extrasub
24493_ACEOF
24494cat >>$CONFIG_STATUS <<\_ACEOF
24495:t
24496/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000024497s&@configure_input@&$configure_input&;t t
24498s&@top_builddir@&$ac_top_builddir_sub&;t t
24499s&@srcdir@&$ac_srcdir&;t t
24500s&@abs_srcdir@&$ac_abs_srcdir&;t t
24501s&@top_srcdir@&$ac_top_srcdir&;t t
24502s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24503s&@builddir@&$ac_builddir&;t t
24504s&@abs_builddir@&$ac_abs_builddir&;t t
24505s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24506s&@INSTALL@&$ac_INSTALL&;t t
24507$ac_datarootdir_hack
24508" $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 +000024509
Martin v. Löwiseba40652007-08-30 20:10:57 +000024510test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24511 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24512 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24513 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24514which seems to be undefined. Please make sure it is defined." >&5
24515echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24516which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024517
Martin v. Löwiseba40652007-08-30 20:10:57 +000024518 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000024519 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024520 -) cat "$tmp/out"; rm -f "$tmp/out";;
24521 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024522 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024523 ;;
24524 :H)
24525 #
24526 # CONFIG_HEADER
24527 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024528_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024529
Martin v. Löwiseba40652007-08-30 20:10:57 +000024530# Transform confdefs.h into a sed script `conftest.defines', that
24531# substitutes the proper values into config.h.in to produce config.h.
24532rm -f conftest.defines conftest.tail
24533# First, append a space to every undef/define line, to ease matching.
24534echo 's/$/ /' >conftest.defines
24535# Then, protect against being on the right side of a sed subst, or in
24536# an unquoted here document, in config.status. If some macros were
24537# called several times there might be several #defines for the same
24538# symbol, which is useless. But do not sort them, since the last
24539# AC_DEFINE must be honored.
24540ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24541# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24542# NAME is the cpp macro being defined, VALUE is the value it is being given.
24543# PARAMS is the parameter list in the macro definition--in most cases, it's
24544# just an empty string.
24545ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24546ac_dB='\\)[ (].*,\\1define\\2'
24547ac_dC=' '
24548ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024549
Martin v. Löwiseba40652007-08-30 20:10:57 +000024550uniq confdefs.h |
24551 sed -n '
24552 t rset
24553 :rset
24554 s/^[ ]*#[ ]*define[ ][ ]*//
24555 t ok
24556 d
24557 :ok
24558 s/[\\&,]/\\&/g
24559 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24560 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24561 ' >>conftest.defines
24562
24563# Remove the space that was appended to ease matching.
24564# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024565# example, in the case of _POSIX_SOURCE, which is predefined and required
24566# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024567# (The regexp can be short, since the line contains either #define or #undef.)
24568echo 's/ $//
24569s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000024570
Martin v. Löwiseba40652007-08-30 20:10:57 +000024571# Break up conftest.defines:
24572ac_max_sed_lines=50
24573
24574# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24575# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24576# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24577# et cetera.
24578ac_in='$ac_file_inputs'
24579ac_out='"$tmp/out1"'
24580ac_nxt='"$tmp/out2"'
24581
24582while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000024583do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024584 # Write a here document:
24585 cat >>$CONFIG_STATUS <<_ACEOF
24586 # First, check the format of the line:
24587 cat >"\$tmp/defines.sed" <<\\CEOF
24588/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24589/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
24590b
24591:def
24592_ACEOF
24593 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000024594 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024595 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24596 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24597 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24598 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000024599 rm -f conftest.defines
24600 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000024601done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024602rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000024603
Martin v. Löwiseba40652007-08-30 20:10:57 +000024604echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000024605cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024606 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024607 echo "/* $configure_input */" >"$tmp/config.h"
24608 cat "$ac_result" >>"$tmp/config.h"
24609 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024610 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24611echo "$as_me: $ac_file is unchanged" >&6;}
24612 else
Martin v. Löwis11437992002-04-12 09:54:03 +000024613 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024614 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000024615 fi
24616 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024617 echo "/* $configure_input */"
24618 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000024619 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024620 rm -f "$tmp/out12"
24621 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000024622
Martin v. Löwiseba40652007-08-30 20:10:57 +000024623
24624 esac
24625
24626done # for ac_tag
24627
Guido van Rossum627b2d71993-12-24 10:39:16 +000024628
Martin v. Löwis11437992002-04-12 09:54:03 +000024629{ (exit 0); exit 0; }
24630_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024631chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000024632ac_clean_files=$ac_clean_files_save
24633
24634
24635# configure is writing to config.log, and then calls config.status.
24636# config.status does its own redirection, appending to config.log.
24637# Unfortunately, on DOS this fails, as config.log is still kept open
24638# by configure, so config.status won't be able to write to it; its
24639# output is simply discarded. So we exec the FD to /dev/null,
24640# effectively closing config.log, so it can be properly (re)opened and
24641# appended to by config.status. When coming back to configure, we
24642# need to make the FD available again.
24643if test "$no_create" != yes; then
24644 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024645 ac_config_status_args=
24646 test "$silent" = yes &&
24647 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000024648 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000024649 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024650 exec 5>>config.log
24651 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24652 # would make configure fail if this is the last instruction.
24653 $ac_cs_success || { (exit 1); exit 1; }
24654fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000024655
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024656
Martin v. Löwisf7afe952006-04-14 15:16:15 +000024657echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024658if test ! -f Modules/Setup
24659then
24660 cp $srcdir/Modules/Setup.dist Modules/Setup
24661fi
24662
Martin v. Löwisf7afe952006-04-14 15:16:15 +000024663echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024664if test ! -f Modules/Setup.local
24665then
24666 echo "# Edit this file for local setup changes" >Modules/Setup.local
24667fi
24668
24669echo "creating Makefile"
24670$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
24671 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000024672 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000024673
24674case $ac_sys_system in
24675BeOS)
24676 { echo "$as_me:$LINENO: WARNING:
24677
24678 Support for BeOS is deprecated as of Python 2.6.
24679 See PEP 11 for the gory details.
24680 " >&5
24681echo "$as_me: WARNING:
24682
24683 Support for BeOS is deprecated as of Python 2.6.
24684 See PEP 11 for the gory details.
24685 " >&2;}
24686 ;;
24687*) ;;
24688esac
24689
Neil Schemenauerc761fc82001-02-19 04:50:49 +000024690mv config.c Modules