blob: 28275ce8c935c9edfd505ea65b56c33a49e28398 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson8f66a4a2008-05-23 04:22:50 +00002# From configure.in Revision: 62644 .
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
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000661PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000662PYTHONFRAMEWORKDIR
663PYTHONFRAMEWORKPREFIX
664PYTHONFRAMEWORKINSTALLDIR
665FRAMEWORKINSTALLFIRST
666FRAMEWORKINSTALLLAST
667FRAMEWORKALTINSTALLFIRST
668FRAMEWORKALTINSTALLLAST
669FRAMEWORKUNIXTOOLSPREFIX
670MACHDEP
671SGI_ABI
672EXTRAPLATDIR
673EXTRAMACHDEPPATH
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697RANLIB
698AR
699SVNVERSION
700INSTALL_PROGRAM
701INSTALL_SCRIPT
702INSTALL_DATA
703LN
704OPT
705BASECFLAGS
706OTHER_LIBTOOL_OPT
707LIBTOOL_CRUFT
708SO
709LDSHARED
710BLDSHARED
711CCSHARED
712LINKFORSHARED
713CFLAGSFORSHARED
714SHLIBS
715USE_SIGNAL_MODULE
716SIGNAL_OBJS
717USE_THREAD_MODULE
718LDLAST
719THREADOBJ
720DLINCLDIR
721DYNLOADFILE
722MACHDEP_OBJS
723TRUE
724LIBOBJS
725HAVE_GETHOSTBYNAME_R_6_ARG
726HAVE_GETHOSTBYNAME_R_5_ARG
727HAVE_GETHOSTBYNAME_R_3_ARG
728HAVE_GETHOSTBYNAME_R
729HAVE_GETHOSTBYNAME
730LIBM
731LIBC
732UNICODE_OBJS
733THREADHEADERS
734SRCDIRS
735LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000736ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000737 ac_precious_vars='build_alias
738host_alias
739target_alias
740CC
741CFLAGS
742LDFLAGS
743LIBS
744CPPFLAGS
745CPP'
746
Guido van Rossum627b2d71993-12-24 10:39:16 +0000747
Guido van Rossum7f43da71994-08-01 12:15:30 +0000748# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000749ac_init_help=
750ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000751# The variables have the same names as the options, with
752# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000754exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756no_recursion=
757prefix=NONE
758program_prefix=NONE
759program_suffix=NONE
760program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000761silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000762site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000765x_includes=NONE
766x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000767
768# Installation directory options.
769# These are left unexpanded so users can "make install exec_prefix=/foo"
770# and all the variables that are supposed to be based on exec_prefix
771# by default will actually change.
772# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000773# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000774bindir='${exec_prefix}/bin'
775sbindir='${exec_prefix}/sbin'
776libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000777datarootdir='${prefix}/share'
778datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000779sysconfdir='${prefix}/etc'
780sharedstatedir='${prefix}/com'
781localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000782includedir='${prefix}/include'
783oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000784docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
785infodir='${datarootdir}/info'
786htmldir='${docdir}'
787dvidir='${docdir}'
788pdfdir='${docdir}'
789psdir='${docdir}'
790libdir='${exec_prefix}/lib'
791localedir='${datarootdir}/locale'
792mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000795ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000797do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798 # If the previous option needs an argument, assign it.
799 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000800 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801 ac_prev=
802 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000803 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804
Martin v. Löwiseba40652007-08-30 20:10:57 +0000805 case $ac_option in
806 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
807 *) ac_optarg=yes ;;
808 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000810 # Accept the important Cygnus configure options, so we can diagnose typos.
811
Martin v. Löwiseba40652007-08-30 20:10:57 +0000812 case $ac_dashdash$ac_option in
813 --)
814 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816 -bindir | --bindir | --bindi | --bind | --bin | --bi)
817 ac_prev=bindir ;;
818 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000819 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820
821 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000822 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000826 -cache-file | --cache-file | --cache-fil | --cache-fi \
827 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
828 ac_prev=cache_file ;;
829 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
830 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000831 cache_file=$ac_optarg ;;
832
833 --config-cache | -C)
834 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835
Martin v. Löwiseba40652007-08-30 20:10:57 +0000836 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000839 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840
Martin v. Löwiseba40652007-08-30 20:10:57 +0000841 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
842 | --dataroo | --dataro | --datar)
843 ac_prev=datarootdir ;;
844 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
845 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
846 datarootdir=$ac_optarg ;;
847
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000851 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
853 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000854 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
855 eval enable_$ac_feature=no ;;
856
857 -docdir | --docdir | --docdi | --doc | --do)
858 ac_prev=docdir ;;
859 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
860 docdir=$ac_optarg ;;
861
862 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
863 ac_prev=dvidir ;;
864 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
865 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866
867 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000868 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000870 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000871 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
872 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000873 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
874 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
877 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
878 | --exec | --exe | --ex)
879 ac_prev=exec_prefix ;;
880 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
881 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
882 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000883 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884
885 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886 # Obsolete; use --with-gas.
887 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
Martin v. Löwis11437992002-04-12 09:54:03 +0000889 -help | --help | --hel | --he | -h)
890 ac_init_help=long ;;
891 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
892 ac_init_help=recursive ;;
893 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
894 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
896 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Martin v. Löwiseba40652007-08-30 20:10:57 +0000901 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
902 ac_prev=htmldir ;;
903 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
904 | --ht=*)
905 htmldir=$ac_optarg ;;
906
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -includedir | --includedir | --includedi | --included | --include \
908 | --includ | --inclu | --incl | --inc)
909 ac_prev=includedir ;;
910 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
911 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913
914 -infodir | --infodir | --infodi | --infod | --info | --inf)
915 ac_prev=infodir ;;
916 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -libdir | --libdir | --libdi | --libd)
920 ac_prev=libdir ;;
921 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923
924 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
925 | --libexe | --libex | --libe)
926 ac_prev=libexecdir ;;
927 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
928 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
Martin v. Löwiseba40652007-08-30 20:10:57 +0000931 -localedir | --localedir | --localedi | --localed | --locale)
932 ac_prev=localedir ;;
933 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
934 localedir=$ac_optarg ;;
935
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000937 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 ac_prev=localstatedir ;;
939 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942
943 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
944 ac_prev=mandir ;;
945 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949 # Obsolete; use --without-fp.
950 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
952 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954 no_create=yes ;;
955
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
957 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
958 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
961 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
962 | --oldin | --oldi | --old | --ol | --o)
963 ac_prev=oldincludedir ;;
964 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
965 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
966 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
970 ac_prev=prefix ;;
971 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
974 -program-prefix | --program-prefix | --program-prefi | --program-pref \
975 | --program-pre | --program-pr | --program-p)
976 ac_prev=program_prefix ;;
977 -program-prefix=* | --program-prefix=* | --program-prefi=* \
978 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
981 -program-suffix | --program-suffix | --program-suffi | --program-suff \
982 | --program-suf | --program-su | --program-s)
983 ac_prev=program_suffix ;;
984 -program-suffix=* | --program-suffix=* | --program-suffi=* \
985 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -program-transform-name | --program-transform-name \
989 | --program-transform-nam | --program-transform-na \
990 | --program-transform-n | --program-transform- \
991 | --program-transform | --program-transfor \
992 | --program-transfo | --program-transf \
993 | --program-trans | --program-tran \
994 | --progr-tra | --program-tr | --program-t)
995 ac_prev=program_transform_name ;;
996 -program-transform-name=* | --program-transform-name=* \
997 | --program-transform-nam=* | --program-transform-na=* \
998 | --program-transform-n=* | --program-transform-=* \
999 | --program-transform=* | --program-transfor=* \
1000 | --program-transfo=* | --program-transf=* \
1001 | --program-trans=* | --program-tran=* \
1002 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Martin v. Löwiseba40652007-08-30 20:10:57 +00001005 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1006 ac_prev=pdfdir ;;
1007 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1008 pdfdir=$ac_optarg ;;
1009
1010 -psdir | --psdir | --psdi | --psd | --ps)
1011 ac_prev=psdir ;;
1012 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1013 psdir=$ac_optarg ;;
1014
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1016 | -silent | --silent | --silen | --sile | --sil)
1017 silent=yes ;;
1018
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1020 ac_prev=sbindir ;;
1021 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1022 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
1025 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1026 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1027 | --sharedst | --shareds | --shared | --share | --shar \
1028 | --sha | --sh)
1029 ac_prev=sharedstatedir ;;
1030 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1031 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1032 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1033 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036 -site | --site | --sit)
1037 ac_prev=site ;;
1038 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1042 ac_prev=srcdir ;;
1043 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1047 | --syscon | --sysco | --sysc | --sys | --sy)
1048 ac_prev=sysconfdir ;;
1049 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1050 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
1058 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1059 verbose=yes ;;
1060
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 -version | --version | --versio | --versi | --vers | -V)
1062 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001066 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001067 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 { echo "$as_me: error: invalid package name: $ac_package" >&2
1069 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001070 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1071 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001076 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 { echo "$as_me: error: invalid package name: $ac_package" >&2
1078 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001079 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1080 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 --x)
1083 # Obsolete; use --with-x.
1084 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1087 | --x-incl | --x-inc | --x-in | --x-i)
1088 ac_prev=x_includes ;;
1089 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1090 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1094 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1095 ac_prev=x_libraries ;;
1096 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1097 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 -*) { echo "$as_me: error: unrecognized option: $ac_option
1101Try \`$0 --help' for more information." >&2
1102 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 ;;
1104
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 *=*)
1106 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1107 # Reject names that are not valid shell variable names.
1108 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1109 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1110 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001111 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 export $ac_envvar ;;
1113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 # FIXME: should be removed in autoconf 3.0.
1116 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1117 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1118 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1119 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120 ;;
1121
1122 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001123done
1124
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1127 { echo "$as_me: error: missing argument to $ac_option" >&2
1128 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129fi
1130
Martin v. Löwiseba40652007-08-30 20:10:57 +00001131# Be sure to have absolute directory names.
1132for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1133 datadir sysconfdir sharedstatedir localstatedir includedir \
1134 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1135 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001137 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139 [\\/$]* | ?:[\\/]* ) continue;;
1140 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001142 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1143 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001144done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001145
Martin v. Löwis11437992002-04-12 09:54:03 +00001146# There might be people who depend on the old broken behavior: `$host'
1147# used to hold the argument of --host etc.
1148# FIXME: To remove some day.
1149build=$build_alias
1150host=$host_alias
1151target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153# FIXME: To remove some day.
1154if test "x$host_alias" != x; then
1155 if test "x$build_alias" = x; then
1156 cross_compiling=maybe
1157 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1158 If a cross compiler is detected then cross compile mode will be used." >&2
1159 elif test "x$build_alias" != "x$host_alias"; then
1160 cross_compiling=yes
1161 fi
1162fi
1163
1164ac_tool_prefix=
1165test -n "$host_alias" && ac_tool_prefix=$host_alias-
1166
1167test "$silent" = yes && exec 6>/dev/null
1168
Guido van Rossum627b2d71993-12-24 10:39:16 +00001169
Martin v. Löwiseba40652007-08-30 20:10:57 +00001170ac_pwd=`pwd` && test -n "$ac_pwd" &&
1171ac_ls_di=`ls -di .` &&
1172ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1173 { echo "$as_me: error: Working directory cannot be determined" >&2
1174 { (exit 1); exit 1; }; }
1175test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1176 { echo "$as_me: error: pwd does not report name of working directory" >&2
1177 { (exit 1); exit 1; }; }
1178
1179
Guido van Rossum627b2d71993-12-24 10:39:16 +00001180# Find the source files, if location was not specified.
1181if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001183 # Try the directory containing this script, then the parent directory.
1184 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001185$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001186 X"$0" : 'X\(//\)[^/]' \| \
1187 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001188 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001189echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1191 s//\1/
1192 q
1193 }
1194 /^X\(\/\/\)[^/].*/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)$/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\).*/{
1203 s//\1/
1204 q
1205 }
1206 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001208 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001209 srcdir=..
1210 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211else
1212 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001214if test ! -r "$srcdir/$ac_unique_file"; then
1215 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1216 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001219ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1220ac_abs_confdir=`(
1221 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001222 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223 pwd)`
1224# When building in place, set srcdir=.
1225if test "$ac_abs_confdir" = "$ac_pwd"; then
1226 srcdir=.
1227fi
1228# Remove unnecessary trailing slashes from srcdir.
1229# Double slashes in file names in object file debugging info
1230# mess up M-x gdb in Emacs.
1231case $srcdir in
1232*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1233esac
1234for ac_var in $ac_precious_vars; do
1235 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1236 eval ac_env_${ac_var}_value=\$${ac_var}
1237 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1239done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001240
Martin v. Löwis11437992002-04-12 09:54:03 +00001241#
1242# Report the --help message.
1243#
1244if test "$ac_init_help" = "long"; then
1245 # Omit some internal or obsolete options to make the list less imposing.
1246 # This message is too long to be a string in the A/UX 3.1 sh.
1247 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001248\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001249
1250Usage: $0 [OPTION]... [VAR=VALUE]...
1251
1252To assign environment variables (e.g., CC, CFLAGS...), specify them as
1253VAR=VALUE. See below for descriptions of some of the useful variables.
1254
1255Defaults for the options are specified in brackets.
1256
1257Configuration:
1258 -h, --help display this help and exit
1259 --help=short display options specific to this package
1260 --help=recursive display the short help of all the included packages
1261 -V, --version display version information and exit
1262 -q, --quiet, --silent do not print \`checking...' messages
1263 --cache-file=FILE cache test results in FILE [disabled]
1264 -C, --config-cache alias for \`--cache-file=config.cache'
1265 -n, --no-create do not create output files
1266 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1267
Martin v. Löwis11437992002-04-12 09:54:03 +00001268Installation directories:
1269 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001270 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001272 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
1274By default, \`make install' will install all the files in
1275\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1276an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1277for instance \`--prefix=\$HOME'.
1278
1279For better control, use the options below.
1280
1281Fine tuning of the installation directories:
1282 --bindir=DIR user executables [EPREFIX/bin]
1283 --sbindir=DIR system admin executables [EPREFIX/sbin]
1284 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001285 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1286 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1287 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1288 --libdir=DIR object code libraries [EPREFIX/lib]
1289 --includedir=DIR C header files [PREFIX/include]
1290 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001291 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1292 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1293 --infodir=DIR info documentation [DATAROOTDIR/info]
1294 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1295 --mandir=DIR man documentation [DATAROOTDIR/man]
1296 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1297 --htmldir=DIR html documentation [DOCDIR]
1298 --dvidir=DIR dvi documentation [DOCDIR]
1299 --pdfdir=DIR pdf documentation [DOCDIR]
1300 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001301_ACEOF
1302
1303 cat <<\_ACEOF
1304_ACEOF
1305fi
1306
1307if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001308 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001309 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001311 cat <<\_ACEOF
1312
1313Optional Features:
1314 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1315 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001316 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001317 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001318 --enable-framework[=INSTALLDIR]
1319 Build (MacOSX|Darwin) framework
1320 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001321 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
1325 --enable-unicode[=ucs[24]]
1326 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001331 --with-framework-name=FRAMEWORK
1332 specify an alternate name of the framework built
1333 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001335 --with-cxx-main=<compiler>
1336 compile main() and link python executable with C++
1337 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --with-suffix=.exe set executable suffix
1339 --with-pydebug build with Py_DEBUG defined
1340 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001341 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001342 --with-signal-module disable/enable signal module
1343 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1344 --with(out)-threads[=DIRECTORY]
1345 disable/enable thread support
1346 --with(out)-thread[=DIRECTORY]
1347 deprecated; use --with(out)-threads
1348 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001350 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001351 --with(out)-pymalloc disable/enable specialized mallocs
1352 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001353 --with-fpectl enable SIGFPE catching
1354 --with-libm=STRING math library
1355 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001356
1357Some influential environment variables:
1358 CC C compiler command
1359 CFLAGS C compiler flags
1360 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1361 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001362 LIBS libraries to pass to the linker, e.g. -l<library>
1363 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1364 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001365 CPP C preprocessor
1366
1367Use these variables to override the choices made by `configure' or to help
1368it to find libraries and programs with nonstandard names/locations.
1369
Martin v. Löwis1d459062005-03-14 21:23:33 +00001370Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001371_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001372ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001373fi
1374
1375if test "$ac_init_help" = "recursive"; then
1376 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001378 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 ac_builddir=.
1380
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381case "$ac_dir" in
1382.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1383*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385 # A ".." for each directory in $ac_dir_suffix.
1386 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1387 case $ac_top_builddir_sub in
1388 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1389 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1390 esac ;;
1391esac
1392ac_abs_top_builddir=$ac_pwd
1393ac_abs_builddir=$ac_pwd$ac_dir_suffix
1394# for backward compatibility:
1395ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
1397case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 ac_top_srcdir=$ac_top_builddir_sub
1401 ac_abs_top_srcdir=$ac_pwd ;;
1402 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001404 ac_top_srcdir=$srcdir
1405 ac_abs_top_srcdir=$srcdir ;;
1406 *) # Relative name.
1407 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1408 ac_top_srcdir=$ac_top_build_prefix$srcdir
1409 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001410esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001412
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 cd "$ac_dir" || { ac_status=$?; continue; }
1414 # Check for guested configure.
1415 if test -f "$ac_srcdir/configure.gnu"; then
1416 echo &&
1417 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1418 elif test -f "$ac_srcdir/configure"; then
1419 echo &&
1420 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 else
1422 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001423 fi || ac_status=$?
1424 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 done
1426fi
1427
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001429if $ac_init_version; then
1430 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001431python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001432generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001433
Martin v. Löwiseba40652007-08-30 20:10:57 +00001434Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14352002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001436This configure script is free software; the Free Software Foundation
1437gives unlimited permission to copy, distribute and modify it.
1438_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001442This file contains any messages produced by compilers while
1443running configure, to aid debugging if configure makes a mistake.
1444
Neal Norwitz9be57322006-08-18 05:39:20 +00001445It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001447
1448 $ $0 $@
1449
1450_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001452{
1453cat <<_ASUNAME
1454## --------- ##
1455## Platform. ##
1456## --------- ##
1457
1458hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1459uname -m = `(uname -m) 2>/dev/null || echo unknown`
1460uname -r = `(uname -r) 2>/dev/null || echo unknown`
1461uname -s = `(uname -s) 2>/dev/null || echo unknown`
1462uname -v = `(uname -v) 2>/dev/null || echo unknown`
1463
1464/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1465/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1466
1467/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1468/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1469/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001470/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001471/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1472/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1473/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1474
1475_ASUNAME
1476
1477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1478for as_dir in $PATH
1479do
1480 IFS=$as_save_IFS
1481 test -z "$as_dir" && as_dir=.
1482 echo "PATH: $as_dir"
1483done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001484IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486} >&5
1487
1488cat >&5 <<_ACEOF
1489
1490
1491## ----------- ##
1492## Core tests. ##
1493## ----------- ##
1494
1495_ACEOF
1496
1497
1498# Keep a trace of the command line.
1499# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001500# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001501# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001502# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001503ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001504ac_configure_args0=
1505ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001506ac_must_keep_next=false
1507for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001508do
Skip Montanaro6dead952003-09-25 14:50:04 +00001509 for ac_arg
1510 do
1511 case $ac_arg in
1512 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1513 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1514 | -silent | --silent | --silen | --sile | --sil)
1515 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001516 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001517 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1518 esac
1519 case $ac_pass in
1520 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1521 2)
1522 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1523 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001525 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001526 case $ac_arg in
1527 *=* | --config-cache | -C | -disable-* | --disable-* \
1528 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1529 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1530 | -with-* | --with-* | -without-* | --without-* | --x)
1531 case "$ac_configure_args0 " in
1532 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1533 esac
1534 ;;
1535 -* ) ac_must_keep_next=true ;;
1536 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001537 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001538 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001539 ;;
1540 esac
1541 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001542done
Skip Montanaro6dead952003-09-25 14:50:04 +00001543$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1544$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 +00001545
1546# When interrupted or exit'd, cleanup temporary files, and complete
1547# config.log. We remove comments because anyway the quotes in there
1548# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001549# WARNING: Use '\'' to represent an apostrophe within the trap.
1550# 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 +00001551trap 'exit_status=$?
1552 # Save into config.log some information that might help in debugging.
1553 {
1554 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001555
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 cat <<\_ASBOX
1557## ---------------- ##
1558## Cache variables. ##
1559## ---------------- ##
1560_ASBOX
1561 echo
1562 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563(
1564 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1565 eval ac_val=\$$ac_var
1566 case $ac_val in #(
1567 *${as_nl}*)
1568 case $ac_var in #(
1569 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1570echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1571 esac
1572 case $ac_var in #(
1573 _ | IFS | as_nl) ;; #(
1574 *) $as_unset $ac_var ;;
1575 esac ;;
1576 esac
1577 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001579 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1580 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 "s/'\''/'\''\\\\'\'''\''/g;
1583 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1584 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001585 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001586 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001587 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588 esac |
1589 sort
1590)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001592
1593 cat <<\_ASBOX
1594## ----------------- ##
1595## Output variables. ##
1596## ----------------- ##
1597_ASBOX
1598 echo
1599 for ac_var in $ac_subst_vars
1600 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 eval ac_val=\$$ac_var
1602 case $ac_val in
1603 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1604 esac
1605 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001606 done | sort
1607 echo
1608
1609 if test -n "$ac_subst_files"; then
1610 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001611## ------------------- ##
1612## File substitutions. ##
1613## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001614_ASBOX
1615 echo
1616 for ac_var in $ac_subst_files
1617 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618 eval ac_val=\$$ac_var
1619 case $ac_val in
1620 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1621 esac
1622 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001623 done | sort
1624 echo
1625 fi
1626
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 if test -s confdefs.h; then
1628 cat <<\_ASBOX
1629## ----------- ##
1630## confdefs.h. ##
1631## ----------- ##
1632_ASBOX
1633 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001634 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 echo
1636 fi
1637 test "$ac_signal" != 0 &&
1638 echo "$as_me: caught signal $ac_signal"
1639 echo "$as_me: exit $exit_status"
1640 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001641 rm -f core *.core core.conftest.* &&
1642 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001644' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001645for ac_signal in 1 2 13 15; do
1646 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1647done
1648ac_signal=0
1649
1650# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001651rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001652
1653# Predefined preprocessor variables.
1654
1655cat >>confdefs.h <<_ACEOF
1656#define PACKAGE_NAME "$PACKAGE_NAME"
1657_ACEOF
1658
1659
1660cat >>confdefs.h <<_ACEOF
1661#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1662_ACEOF
1663
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_VERSION "$PACKAGE_VERSION"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_STRING "$PACKAGE_STRING"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1677_ACEOF
1678
1679
1680# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001681# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001682if test -n "$CONFIG_SITE"; then
1683 set x "$CONFIG_SITE"
1684elif test "x$prefix" != xNONE; then
1685 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1686else
1687 set x "$ac_default_prefix/share/config.site" \
1688 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001690shift
1691for ac_site_file
1692do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001694 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1695echo "$as_me: loading site script $ac_site_file" >&6;}
1696 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001697 . "$ac_site_file"
1698 fi
1699done
1700
1701if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001702 # Some versions of bash will fail to source /dev/null (special
1703 # files actually), so we avoid doing that.
1704 if test -f "$cache_file"; then
1705 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1706echo "$as_me: loading cache $cache_file" >&6;}
1707 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001708 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1709 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001710 esac
1711 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712else
Martin v. Löwis11437992002-04-12 09:54:03 +00001713 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1714echo "$as_me: creating cache $cache_file" >&6;}
1715 >$cache_file
1716fi
1717
1718# Check that the precious variables saved in the cache have kept the same
1719# value.
1720ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001721for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1723 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001724 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1725 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 case $ac_old_set,$ac_new_set in
1727 set,)
1728 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1729echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,set)
1732 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1733echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1734 ac_cache_corrupted=: ;;
1735 ,);;
1736 *)
1737 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001739echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001740 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001741echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001742 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001743echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001744 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 fi;;
1746 esac
1747 # Pass precious variables to config.status.
1748 if test "$ac_new_set" = set; then
1749 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001750 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001751 *) ac_arg=$ac_var=$ac_new_val ;;
1752 esac
1753 case " $ac_configure_args " in
1754 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1755 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1756 esac
1757 fi
1758done
1759if $ac_cache_corrupted; then
1760 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1761echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1762 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1763echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1764 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001765fi
1766
Martin v. Löwiseba40652007-08-30 20:10:57 +00001767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
Guido van Rossum7f43da71994-08-01 12:15:30 +00001791ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1795ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796
Guido van Rossum627b2d71993-12-24 10:39:16 +00001797
Michael W. Hudson54241132001-12-07 15:38:26 +00001798
Martin v. Löwiseba40652007-08-30 20:10:57 +00001799ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001800
1801
Martin v. Löwis11437992002-04-12 09:54:03 +00001802
1803
1804
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001805
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001806
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001807# We don't use PACKAGE_ variables, and they cause conflicts
1808# with other autoconf-based packages that include Python.h
1809grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1810rm confdefs.h
1811mv confdefs.h.new confdefs.h
1812
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001813
Neal Norwitz9be57322006-08-18 05:39:20 +00001814VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001815
Martin v. Löwis1142de32002-03-29 16:28:31 +00001816
1817SOVERSION=1.0
1818
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001819# The later defininition of _XOPEN_SOURCE disables certain features
1820# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1821
1822cat >>confdefs.h <<\_ACEOF
1823#define _GNU_SOURCE 1
1824_ACEOF
1825
1826
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001827# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1828# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1829# them.
1830
1831cat >>confdefs.h <<\_ACEOF
1832#define _NETBSD_SOURCE 1
1833_ACEOF
1834
1835
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001836# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1837# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1838# them.
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define __BSD_VISIBLE 1
1842_ACEOF
1843
1844
Martin v. Löwisd6320502004-08-12 13:45:08 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1847
1848cat >>confdefs.h <<\_ACEOF
1849#define _BSD_TYPES 1
1850_ACEOF
1851
1852
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001853define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001854
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001855# Arguments passed to configure.
1856
1857CONFIG_ARGS="$ac_configure_args"
1858
Martin v. Löwiseba40652007-08-30 20:10:57 +00001859# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001860if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001861 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001862 case $enableval in
1863 yes)
1864 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1865 ;;
1866 esac
1867 case $enableval in
1868 no)
1869 UNIVERSALSDK=
1870 enable_universalsdk=
1871 ;;
1872 *)
1873 UNIVERSALSDK=$enableval
1874 ;;
1875 esac
1876
1877else
1878
1879 UNIVERSALSDK=
1880 enable_universalsdk=
1881
Martin v. Löwiseba40652007-08-30 20:10:57 +00001882fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001883
1884
Martin v. Löwiseba40652007-08-30 20:10:57 +00001885
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001886
1887# Check whether --with-framework-name was given.
1888if test "${with_framework_name+set}" = set; then
1889 withval=$with_framework_name;
1890 PYTHONFRAMEWORK=${withval}
1891 PYTHONFRAMEWORKDIR=${withval}.framework
1892 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1893
1894else
1895
1896 PYTHONFRAMEWORK=Python
1897 PYTHONFRAMEWORKDIR=Python.framework
1898 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1899
1900fi
1901
Martin v. Löwiseba40652007-08-30 20:10:57 +00001902# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001903if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001904 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001905 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001906 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001907 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001908 esac
1909 case $enableval in
1910 no)
1911 PYTHONFRAMEWORK=
1912 PYTHONFRAMEWORKDIR=no-framework
1913 PYTHONFRAMEWORKPREFIX=
1914 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001915 FRAMEWORKINSTALLFIRST=
1916 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001917 FRAMEWORKALTINSTALLFIRST=
1918 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001919 if test "x${prefix}" = "xNONE"; then
1920 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1921 else
1922 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1923 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001924 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001925 ;;
1926 *)
1927 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001928 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001929 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1930 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001931 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1932 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001933 if test "x${prefix}" = "xNONE" ; then
1934 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1935 else
1936 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1937 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001938 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001939
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001940 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001941 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001942 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001943
Martin v. Löwiseba40652007-08-30 20:10:57 +00001944 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001945
Martin v. Löwiseba40652007-08-30 20:10:57 +00001946 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001947
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001948 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1949
1950 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1951
Jack Jansene578a632001-08-15 01:27:14 +00001952 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001953
Guido van Rossum563e7081996-09-10 18:20:48 +00001954else
Martin v. Löwis11437992002-04-12 09:54:03 +00001955
Jack Jansene578a632001-08-15 01:27:14 +00001956 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001957 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001958 PYTHONFRAMEWORKPREFIX=
1959 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001960 FRAMEWORKINSTALLFIRST=
1961 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001962 FRAMEWORKALTINSTALLFIRST=
1963 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001964 if test "x${prefix}" = "xNONE" ; then
1965 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1966 else
1967 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1968 fi
Jack Jansene578a632001-08-15 01:27:14 +00001969 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001970
Martin v. Löwiseba40652007-08-30 20:10:57 +00001971fi
1972
Michael W. Hudson54241132001-12-07 15:38:26 +00001973
1974
1975
1976
Jack Jansene578a632001-08-15 01:27:14 +00001977
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001978
1979
Ronald Oussoren5b787322006-06-06 19:50:24 +00001980
1981
1982
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001983
Jack Jansene578a632001-08-15 01:27:14 +00001984##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001985## AC_HELP_STRING(--with-dyld,
1986## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001987##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001988# Set name for machine-dependent library files
1989
Martin v. Löwiseba40652007-08-30 20:10:57 +00001990{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1991echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001992if test -z "$MACHDEP"
1993then
Guido van Rossum563e7081996-09-10 18:20:48 +00001994 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001995 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1996 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001997 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001998 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001999 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002000 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002001 ac_md_system=`echo $ac_sys_system |
2002 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2003 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002004 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002005 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002006
Guido van Rossum07397971997-04-29 21:49:50 +00002007 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002008 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002009 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002010 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002011 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002012 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002013 esac
2014fi
Guido van Rossum91922671997-10-09 20:24:13 +00002015
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002016# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2017# disable features if it is defined, without any means to access these
2018# features as extensions. For these systems, we skip the definition of
2019# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2020# some feature, make sure there is no alternative way to access this
2021# feature. Also, when using wildcards, make sure you have verified the
2022# need for not defining _XOPEN_SOURCE on all systems matching the
2023# wildcard, and that the wildcard does not include future systems
2024# (which may remove their limitations).
2025case $ac_sys_system/$ac_sys_release in
2026 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2027 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002028 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00002029 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002030 define_xopen_source=no
2031 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2032 # also defined. This can be overridden by defining _BSD_SOURCE
2033 # As this has a different meaning on Linux, only define it on OpenBSD
2034
2035cat >>confdefs.h <<\_ACEOF
2036#define _BSD_SOURCE 1
2037_ACEOF
2038
2039 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002040 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2041 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2042 # Marc Recht
2043 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2044 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002045 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2046 # of union __?sigval. Reported by Stuart Bishop.
2047 SunOS/5.6)
2048 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002049 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2050 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002051 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002052 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002053 define_xopen_source=no;;
2054 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002055 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002056 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002057 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002058 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2059 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2060 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2061 # This should hopefully be fixed in FreeBSD 4.9
2062 FreeBSD/4.8* | Darwin/6* )
2063 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002064 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2065 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2066 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002067 AIX/4)
2068 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002069 AIX/5)
2070 if test `uname -r` -eq 1; then
2071 define_xopen_source=no
2072 fi
2073 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002074 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2075 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002076 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002077 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002078 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002079 define_xopen_source=no
2080 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002081
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002082esac
2083
2084if test $define_xopen_source = yes
2085then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002086 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2087 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002088 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2089 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002090 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002091 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002092
2093cat >>confdefs.h <<\_ACEOF
2094#define _XOPEN_SOURCE 500
2095_ACEOF
2096
2097 ;;
2098 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002099
2100cat >>confdefs.h <<\_ACEOF
2101#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002102_ACEOF
2103
Skip Montanarof0d5f792004-08-15 14:08:23 +00002104 ;;
2105 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002106
2107 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2108 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2109 # several APIs are not declared. Since this is also needed in some
2110 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002111 # except for Solaris 10, where it must not be defined,
2112 # as it implies XPG4.2
2113 case $ac_sys_system/$ac_sys_release in
2114 SunOS/5.10)
2115 ;;
2116 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002117
2118cat >>confdefs.h <<\_ACEOF
2119#define _XOPEN_SOURCE_EXTENDED 1
2120_ACEOF
2121
Martin v. Löwis7dece662005-11-26 11:38:24 +00002122 ;;
2123 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002124
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002125
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002126cat >>confdefs.h <<\_ACEOF
2127#define _POSIX_C_SOURCE 200112L
2128_ACEOF
2129
2130
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002131fi
2132
Guido van Rossum91922671997-10-09 20:24:13 +00002133#
2134# SGI compilers allow the specification of the both the ABI and the
2135# ISA on the command line. Depending on the values of these switches,
2136# different and often incompatable code will be generated.
2137#
2138# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2139# thus supply support for various ABI/ISA combinations. The MACHDEP
2140# variable is also adjusted.
2141#
2142
2143if test ! -z "$SGI_ABI"
2144then
2145 CC="cc $SGI_ABI"
2146 LDFLAGS="$SGI_ABI $LDFLAGS"
2147 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002149{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2150echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002151
Jack Jansen83f898c2002-12-30 22:23:40 +00002152# And add extra plat-mac for darwin
2153
Jack Jansen7b59b422003-03-17 15:44:10 +00002154
Martin v. Löwiseba40652007-08-30 20:10:57 +00002155{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2156echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002157if test -z "$EXTRAPLATDIR"
2158then
2159 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002160 darwin)
2161 EXTRAPLATDIR="\$(PLATMACDIRS)"
2162 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2163 ;;
2164 *)
2165 EXTRAPLATDIR=""
2166 EXTRAMACHDEPPATH=""
2167 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002168 esac
2169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002170{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2171echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002172
Jack Jansen6b08a402004-06-03 12:41:45 +00002173# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2174# it may influence the way we can build extensions, so distutils
2175# needs to check it
2176
Ronald Oussoren988117f2006-04-29 11:31:35 +00002177
Jack Jansen6b08a402004-06-03 12:41:45 +00002178CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002179EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002180
Mark Dickinson65134662008-04-25 16:11:04 +00002181{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2182echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2183ac_sys_machine=`uname -m`
2184{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2185echo "${ECHO_T}$ac_sys_machine" >&6; }
2186
Mark Dickinson8f66a4a2008-05-23 04:22:50 +00002187# temporary check to find out which exact processor
2188# is in the Debian/alpha buildbot.
2189case $ac_sys_system in
2190 Linux*)
2191 case $ac_sys_machine in alpha*)
2192 cat /proc/cpuinfo
2193 ;;
2194 esac
2195 ;;
2196esac
2197
Guido van Rossum627b2d71993-12-24 10:39:16 +00002198# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002199
2200# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2201# for debug/optimization stuff. BASECFLAGS is for flags that are required
2202# just to get things to compile and link. Users are free to override OPT
2203# when running configure or make. The build should not break if they do.
2204# BASECFLAGS should generally not be messed with, however.
2205
2206# XXX shouldn't some/most/all of this code be merged with the stuff later
2207# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002208{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2209echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002210
Martin v. Löwiseba40652007-08-30 20:10:57 +00002211# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002212if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002213 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002214 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002215 no) CC=cc
2216 without_gcc=yes;;
2217 yes) CC=gcc
2218 without_gcc=no;;
2219 *) CC=$withval
2220 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002221 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002222else
Martin v. Löwis11437992002-04-12 09:54:03 +00002223
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002224 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002225 AIX*) CC=cc_r
2226 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002227 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002228 case $BE_HOST_CPU in
2229 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002230 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002231 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002232 BASECFLAGS="$BASECFLAGS -export pragma"
2233 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002234 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002235 ;;
2236 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002237 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002238 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002239 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002240 ;;
2241 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002242 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2243echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2244 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002245 ;;
2246 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002247 AR="\$(srcdir)/Modules/ar_beos"
2248 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002249 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002250 Monterey*)
2251 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002252 without_gcc=;;
2253 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002254 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002255fi
2256
2257{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2258echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002259
Guido van Rossum8b131c51995-03-09 14:10:13 +00002260# If the user switches compilers, we can't believe the cache
2261if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2262then
Martin v. Löwis11437992002-04-12 09:54:03 +00002263 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2264(it is also a good idea to do 'make clean' before compiling)" >&5
2265echo "$as_me: error: cached CC is different -- throw away $cache_file
2266(it is also a good idea to do 'make clean' before compiling)" >&2;}
2267 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002268fi
2269
Martin v. Löwis11437992002-04-12 09:54:03 +00002270ac_ext=c
2271ac_cpp='$CPP $CPPFLAGS'
2272ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2273ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2274ac_compiler_gnu=$ac_cv_c_compiler_gnu
2275if test -n "$ac_tool_prefix"; then
2276 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2277set dummy ${ac_tool_prefix}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_CC+set}" = set; then
2281 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002282else
2283 if test -n "$CC"; then
2284 ac_cv_prog_CC="$CC" # Let the user override the test.
2285else
Martin v. Löwis11437992002-04-12 09:54:03 +00002286as_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_CC="${ac_tool_prefix}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
Jack Jansendd19cf82001-12-06 22:36:17 +00002301fi
2302fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002303CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002304if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002305 { echo "$as_me:$LINENO: result: $CC" >&5
2306echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +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
Martin v. Löwis11437992002-04-12 09:54:03 +00002313fi
2314if test -z "$ac_cv_prog_CC"; then
2315 ac_ct_CC=$CC
2316 # Extract the first word of "gcc", so it can be a program name with args.
2317set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002318{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002320if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2321 echo $ECHO_N "(cached) $ECHO_C" >&6
2322else
2323 if test -n "$ac_ct_CC"; then
2324 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2325else
2326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2327for as_dir in $PATH
2328do
2329 IFS=$as_save_IFS
2330 test -z "$as_dir" && as_dir=.
2331 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002332 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 +00002333 ac_cv_prog_ac_ct_CC="gcc"
2334 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2335 break 2
2336 fi
2337done
2338done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002339IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341fi
2342fi
2343ac_ct_CC=$ac_cv_prog_ac_ct_CC
2344if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002345 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2346echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002347else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002348 { echo "$as_me:$LINENO: result: no" >&5
2349echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002350fi
2351
Martin v. Löwiseba40652007-08-30 20:10:57 +00002352 if test "x$ac_ct_CC" = x; then
2353 CC=""
2354 else
2355 case $cross_compiling:$ac_tool_warned in
2356yes:)
2357{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2358whose name does not start with the host triplet. If you think this
2359configuration is useful to you, please write to autoconf@gnu.org." >&5
2360echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2361whose name does not start with the host triplet. If you think this
2362configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2363ac_tool_warned=yes ;;
2364esac
2365 CC=$ac_ct_CC
2366 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002367else
2368 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002369fi
2370
Jack Jansendd19cf82001-12-06 22:36:17 +00002371if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002372 if test -n "$ac_tool_prefix"; then
2373 # 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 +00002374set dummy ${ac_tool_prefix}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
Jack Jansendd19cf82001-12-06 22:36:17 +00002379else
2380 if test -n "$CC"; then
2381 ac_cv_prog_CC="$CC" # Let the user override the test.
2382else
Martin v. Löwis11437992002-04-12 09:54:03 +00002383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2384for as_dir in $PATH
2385do
2386 IFS=$as_save_IFS
2387 test -z "$as_dir" && as_dir=.
2388 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002389 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002390 ac_cv_prog_CC="${ac_tool_prefix}cc"
2391 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2392 break 2
2393 fi
2394done
2395done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002396IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002397
2398fi
2399fi
2400CC=$ac_cv_prog_CC
2401if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002402 { echo "$as_me:$LINENO: result: $CC" >&5
2403echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002404else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002405 { echo "$as_me:$LINENO: result: no" >&5
2406echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002407fi
2408
Martin v. Löwiseba40652007-08-30 20:10:57 +00002409
Martin v. Löwis11437992002-04-12 09:54:03 +00002410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002411fi
2412if test -z "$CC"; then
2413 # Extract the first word of "cc", so it can be a program name with args.
2414set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002415{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2416echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002417if test "${ac_cv_prog_CC+set}" = set; then
2418 echo $ECHO_N "(cached) $ECHO_C" >&6
2419else
2420 if test -n "$CC"; then
2421 ac_cv_prog_CC="$CC" # Let the user override the test.
2422else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002423 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2425for as_dir in $PATH
2426do
2427 IFS=$as_save_IFS
2428 test -z "$as_dir" && as_dir=.
2429 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430 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 +00002431 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2432 ac_prog_rejected=yes
2433 continue
2434 fi
2435 ac_cv_prog_CC="cc"
2436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2437 break 2
2438 fi
2439done
2440done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002441IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002443if test $ac_prog_rejected = yes; then
2444 # We found a bogon in the path, so make sure we never use it.
2445 set dummy $ac_cv_prog_CC
2446 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002448 # We chose a different compiler from the bogus one.
2449 # However, it has the same basename, so the bogon will be chosen
2450 # first if we set CC to just the basename; use the full file name.
2451 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002453 fi
2454fi
2455fi
2456fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002457CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002458if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459 { echo "$as_me:$LINENO: result: $CC" >&5
2460echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002461else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002462 { echo "$as_me:$LINENO: result: no" >&5
2463echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002464fi
2465
Martin v. Löwiseba40652007-08-30 20:10:57 +00002466
Martin v. Löwis11437992002-04-12 09:54:03 +00002467fi
2468if test -z "$CC"; then
2469 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002470 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 do
2472 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2473set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2475echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002476if test "${ac_cv_prog_CC+set}" = set; then
2477 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002478else
2479 if test -n "$CC"; then
2480 ac_cv_prog_CC="$CC" # Let the user override the test.
2481else
Martin v. Löwis11437992002-04-12 09:54:03 +00002482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2483for as_dir in $PATH
2484do
2485 IFS=$as_save_IFS
2486 test -z "$as_dir" && as_dir=.
2487 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002488 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 +00002489 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2490 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2491 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002492 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002493done
2494done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002495IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002496
2497fi
2498fi
2499CC=$ac_cv_prog_CC
2500if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002501 { echo "$as_me:$LINENO: result: $CC" >&5
2502echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002503else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002504 { echo "$as_me:$LINENO: result: no" >&5
2505echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002506fi
2507
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 test -n "$CC" && break
2510 done
2511fi
2512if test -z "$CC"; then
2513 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002514 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002515do
2516 # Extract the first word of "$ac_prog", so it can be a program name with args.
2517set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002518{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2519echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002520if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2521 echo $ECHO_N "(cached) $ECHO_C" >&6
2522else
2523 if test -n "$ac_ct_CC"; then
2524 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2525else
2526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527for as_dir in $PATH
2528do
2529 IFS=$as_save_IFS
2530 test -z "$as_dir" && as_dir=.
2531 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002532 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 +00002533 ac_cv_prog_ac_ct_CC="$ac_prog"
2534 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2535 break 2
2536 fi
2537done
2538done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541fi
2542fi
2543ac_ct_CC=$ac_cv_prog_ac_ct_CC
2544if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2546echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002547else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002548 { echo "$as_me:$LINENO: result: no" >&5
2549echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002550fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002551
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 test -n "$ac_ct_CC" && break
2554done
Michael W. Hudson54241132001-12-07 15:38:26 +00002555
Martin v. Löwiseba40652007-08-30 20:10:57 +00002556 if test "x$ac_ct_CC" = x; then
2557 CC=""
2558 else
2559 case $cross_compiling:$ac_tool_warned in
2560yes:)
2561{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2562whose name does not start with the host triplet. If you think this
2563configuration is useful to you, please write to autoconf@gnu.org." >&5
2564echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2565whose name does not start with the host triplet. If you think this
2566configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2567ac_tool_warned=yes ;;
2568esac
2569 CC=$ac_ct_CC
2570 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002571fi
2572
2573fi
2574
2575
Skip Montanaro6dead952003-09-25 14:50:04 +00002576test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2577See \`config.log' for more details." >&5
2578echo "$as_me: error: no acceptable C compiler found in \$PATH
2579See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 { (exit 1); exit 1; }; }
2581
2582# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002584ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002585{ (ac_try="$ac_compiler --version >&5"
2586case "(($ac_try" in
2587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2588 *) ac_try_echo=$ac_try;;
2589esac
2590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2591 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 ac_status=$?
2593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2594 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002595{ (ac_try="$ac_compiler -v >&5"
2596case "(($ac_try" in
2597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2598 *) ac_try_echo=$ac_try;;
2599esac
2600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2601 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 ac_status=$?
2603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2604 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002605{ (ac_try="$ac_compiler -V >&5"
2606case "(($ac_try" in
2607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2608 *) ac_try_echo=$ac_try;;
2609esac
2610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2611 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 ac_status=$?
2613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2614 (exit $ac_status); }
2615
2616cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002617/* confdefs.h. */
2618_ACEOF
2619cat confdefs.h >>conftest.$ac_ext
2620cat >>conftest.$ac_ext <<_ACEOF
2621/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623int
2624main ()
2625{
2626
2627 ;
2628 return 0;
2629}
2630_ACEOF
2631ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002632ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002633# Try to create an executable without -o first, disregard a.out.
2634# It will help us diagnose broken compilers, and finding out an intuition
2635# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2637echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002638ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639#
2640# List of possible output files, starting from the most likely.
2641# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2642# only as a last resort. b.out is created by i960 compilers.
2643ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2644#
2645# The IRIX 6 linker writes into existing files which may not be
2646# executable, retaining their permissions. Remove them first so a
2647# subsequent execution test works.
2648ac_rmfiles=
2649for ac_file in $ac_files
2650do
2651 case $ac_file in
2652 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2653 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2654 esac
2655done
2656rm -f $ac_rmfiles
2657
2658if { (ac_try="$ac_link_default"
2659case "(($ac_try" in
2660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2661 *) ac_try_echo=$ac_try;;
2662esac
2663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2664 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 ac_status=$?
2666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2667 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002668 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2669# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2670# in a Makefile. We should not override ac_cv_exeext if it was cached,
2671# so that the user can short-circuit this test for compilers unknown to
2672# Autoconf.
2673for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002674do
2675 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002677 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002678 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002679 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002680 # We found the default executable, but exeext='' is most
2681 # certainly right.
2682 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002683 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002684 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2685 then :; else
2686 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2687 fi
2688 # We set ac_cv_exeext here because the later test for it is not
2689 # safe: cross compilers may not add the suffix if given an `-o'
2690 # argument, so we may need to know it at that point already.
2691 # Even if this section looks crufty: it has the advantage of
2692 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002693 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002694 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002695 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 esac
2697done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002698test "$ac_cv_exeext" = no && ac_cv_exeext=
2699
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002700else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002701 ac_file=''
2702fi
2703
2704{ echo "$as_me:$LINENO: result: $ac_file" >&5
2705echo "${ECHO_T}$ac_file" >&6; }
2706if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002708sed 's/^/| /' conftest.$ac_ext >&5
2709
2710{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2711See \`config.log' for more details." >&5
2712echo "$as_me: error: C compiler cannot create executables
2713See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002715fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002716
Martin v. Löwis11437992002-04-12 09:54:03 +00002717ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002718
Martin v. Löwiseba40652007-08-30 20:10:57 +00002719# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002720# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002721{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2722echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002723# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2724# If not cross compiling, check that we can run a simple program.
2725if test "$cross_compiling" != yes; then
2726 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002727 { (case "(($ac_try" in
2728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2729 *) ac_try_echo=$ac_try;;
2730esac
2731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2732 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 ac_status=$?
2734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2735 (exit $ac_status); }; }; then
2736 cross_compiling=no
2737 else
2738 if test "$cross_compiling" = maybe; then
2739 cross_compiling=yes
2740 else
2741 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002742If you meant to cross compile, use \`--host'.
2743See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002744echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002745If you meant to cross compile, use \`--host'.
2746See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 { (exit 1); exit 1; }; }
2748 fi
2749 fi
2750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002751{ echo "$as_me:$LINENO: result: yes" >&5
2752echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002753
Skip Montanaro6dead952003-09-25 14:50:04 +00002754rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002755ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002756# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002757# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002758{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2759echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2760{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2761echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2764echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2765if { (ac_try="$ac_link"
2766case "(($ac_try" in
2767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2768 *) ac_try_echo=$ac_try;;
2769esac
2770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2771 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 ac_status=$?
2773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2774 (exit $ac_status); }; then
2775 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2776# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2777# work properly (i.e., refer to `conftest.exe'), while it won't with
2778# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002779for ac_file in conftest.exe conftest conftest.*; do
2780 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002781 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002782 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002783 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002784 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 * ) break;;
2786 esac
2787done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002788else
Skip Montanaro6dead952003-09-25 14:50:04 +00002789 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2790See \`config.log' for more details." >&5
2791echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2792See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002794fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002795
Martin v. Löwis11437992002-04-12 09:54:03 +00002796rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2798echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002799
2800rm -f conftest.$ac_ext
2801EXEEXT=$ac_cv_exeext
2802ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002803{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2804echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002805if test "${ac_cv_objext+set}" = set; then
2806 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002807else
Martin v. Löwis11437992002-04-12 09:54:03 +00002808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002809/* confdefs.h. */
2810_ACEOF
2811cat confdefs.h >>conftest.$ac_ext
2812cat >>conftest.$ac_ext <<_ACEOF
2813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002814
Martin v. Löwis11437992002-04-12 09:54:03 +00002815int
2816main ()
2817{
2818
2819 ;
2820 return 0;
2821}
2822_ACEOF
2823rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002824if { (ac_try="$ac_compile"
2825case "(($ac_try" in
2826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2827 *) ac_try_echo=$ac_try;;
2828esac
2829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2830 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 ac_status=$?
2832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2833 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002834 for ac_file in conftest.o conftest.obj conftest.*; do
2835 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002837 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2839 break;;
2840 esac
2841done
2842else
2843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002844sed 's/^/| /' conftest.$ac_ext >&5
2845
2846{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2847See \`config.log' for more details." >&5
2848echo "$as_me: error: cannot compute suffix of object files: cannot compile
2849See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 { (exit 1); exit 1; }; }
2851fi
2852
2853rm -f conftest.$ac_cv_objext conftest.$ac_ext
2854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002855{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2856echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002857OBJEXT=$ac_cv_objext
2858ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002859{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2860echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002861if test "${ac_cv_c_compiler_gnu+set}" = set; then
2862 echo $ECHO_N "(cached) $ECHO_C" >&6
2863else
2864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002865/* confdefs.h. */
2866_ACEOF
2867cat confdefs.h >>conftest.$ac_ext
2868cat >>conftest.$ac_ext <<_ACEOF
2869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002870
Martin v. Löwis11437992002-04-12 09:54:03 +00002871int
2872main ()
2873{
2874#ifndef __GNUC__
2875 choke me
2876#endif
2877
2878 ;
2879 return 0;
2880}
2881_ACEOF
2882rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002883if { (ac_try="$ac_compile"
2884case "(($ac_try" in
2885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2886 *) ac_try_echo=$ac_try;;
2887esac
2888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002891 grep -v '^ *+' conftest.er1 >conftest.err
2892 rm -f conftest.er1
2893 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002895 (exit $ac_status); } && {
2896 test -z "$ac_c_werror_flag" ||
2897 test ! -s conftest.err
2898 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 ac_compiler_gnu=yes
2900else
2901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002902sed 's/^/| /' conftest.$ac_ext >&5
2903
Martin v. Löwiseba40652007-08-30 20:10:57 +00002904 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002906
2907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002908ac_cv_c_compiler_gnu=$ac_compiler_gnu
2909
2910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002911{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2912echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002913GCC=`test $ac_compiler_gnu = yes && echo yes`
2914ac_test_CFLAGS=${CFLAGS+set}
2915ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002916{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2917echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002918if test "${ac_cv_prog_cc_g+set}" = set; then
2919 echo $ECHO_N "(cached) $ECHO_C" >&6
2920else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002921 ac_save_c_werror_flag=$ac_c_werror_flag
2922 ac_c_werror_flag=yes
2923 ac_cv_prog_cc_g=no
2924 CFLAGS="-g"
2925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002926/* confdefs.h. */
2927_ACEOF
2928cat confdefs.h >>conftest.$ac_ext
2929cat >>conftest.$ac_ext <<_ACEOF
2930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002931
Martin v. Löwis11437992002-04-12 09:54:03 +00002932int
2933main ()
2934{
2935
2936 ;
2937 return 0;
2938}
2939_ACEOF
2940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002941if { (ac_try="$ac_compile"
2942case "(($ac_try" in
2943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2944 *) ac_try_echo=$ac_try;;
2945esac
2946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002949 grep -v '^ *+' conftest.er1 >conftest.err
2950 rm -f conftest.er1
2951 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002953 (exit $ac_status); } && {
2954 test -z "$ac_c_werror_flag" ||
2955 test ! -s conftest.err
2956 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002957 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002958else
Martin v. Löwis11437992002-04-12 09:54:03 +00002959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002960sed 's/^/| /' conftest.$ac_ext >&5
2961
Martin v. Löwiseba40652007-08-30 20:10:57 +00002962 CFLAGS=""
2963 cat >conftest.$ac_ext <<_ACEOF
2964/* confdefs.h. */
2965_ACEOF
2966cat confdefs.h >>conftest.$ac_ext
2967cat >>conftest.$ac_ext <<_ACEOF
2968/* end confdefs.h. */
2969
2970int
2971main ()
2972{
2973
2974 ;
2975 return 0;
2976}
2977_ACEOF
2978rm -f conftest.$ac_objext
2979if { (ac_try="$ac_compile"
2980case "(($ac_try" in
2981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2982 *) ac_try_echo=$ac_try;;
2983esac
2984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2985 (eval "$ac_compile") 2>conftest.er1
2986 ac_status=$?
2987 grep -v '^ *+' conftest.er1 >conftest.err
2988 rm -f conftest.er1
2989 cat conftest.err >&5
2990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2991 (exit $ac_status); } && {
2992 test -z "$ac_c_werror_flag" ||
2993 test ! -s conftest.err
2994 } && test -s conftest.$ac_objext; then
2995 :
2996else
2997 echo "$as_me: failed program was:" >&5
2998sed 's/^/| /' conftest.$ac_ext >&5
2999
3000 ac_c_werror_flag=$ac_save_c_werror_flag
3001 CFLAGS="-g"
3002 cat >conftest.$ac_ext <<_ACEOF
3003/* confdefs.h. */
3004_ACEOF
3005cat confdefs.h >>conftest.$ac_ext
3006cat >>conftest.$ac_ext <<_ACEOF
3007/* end confdefs.h. */
3008
3009int
3010main ()
3011{
3012
3013 ;
3014 return 0;
3015}
3016_ACEOF
3017rm -f conftest.$ac_objext
3018if { (ac_try="$ac_compile"
3019case "(($ac_try" in
3020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3021 *) ac_try_echo=$ac_try;;
3022esac
3023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3024 (eval "$ac_compile") 2>conftest.er1
3025 ac_status=$?
3026 grep -v '^ *+' conftest.er1 >conftest.err
3027 rm -f conftest.er1
3028 cat conftest.err >&5
3029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3030 (exit $ac_status); } && {
3031 test -z "$ac_c_werror_flag" ||
3032 test ! -s conftest.err
3033 } && test -s conftest.$ac_objext; then
3034 ac_cv_prog_cc_g=yes
3035else
3036 echo "$as_me: failed program was:" >&5
3037sed 's/^/| /' conftest.$ac_ext >&5
3038
3039
Guido van Rossum627b2d71993-12-24 10:39:16 +00003040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003041
3042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003044
3045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3046fi
3047
3048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3049 ac_c_werror_flag=$ac_save_c_werror_flag
3050fi
3051{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3052echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003053if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003054 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003055elif test $ac_cv_prog_cc_g = yes; then
3056 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003057 CFLAGS="-g -O2"
3058 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003059 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003060 fi
3061else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003062 if test "$GCC" = yes; then
3063 CFLAGS="-O2"
3064 else
3065 CFLAGS=
3066 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003068{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3069echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3070if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003071 echo $ECHO_N "(cached) $ECHO_C" >&6
3072else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003074ac_save_CC=$CC
3075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003076/* confdefs.h. */
3077_ACEOF
3078cat confdefs.h >>conftest.$ac_ext
3079cat >>conftest.$ac_ext <<_ACEOF
3080/* end confdefs.h. */
3081#include <stdarg.h>
3082#include <stdio.h>
3083#include <sys/types.h>
3084#include <sys/stat.h>
3085/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3086struct buf { int x; };
3087FILE * (*rcsopen) (struct buf *, struct stat *, int);
3088static char *e (p, i)
3089 char **p;
3090 int i;
3091{
3092 return p[i];
3093}
3094static char *f (char * (*g) (char **, int), char **p, ...)
3095{
3096 char *s;
3097 va_list v;
3098 va_start (v,p);
3099 s = g (p, va_arg (v,int));
3100 va_end (v);
3101 return s;
3102}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003103
3104/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3105 function prototypes and stuff, but not '\xHH' hex character constants.
3106 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003107 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003108 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3109 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003110 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003111int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3112
Martin v. Löwiseba40652007-08-30 20:10:57 +00003113/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3114 inside strings and character constants. */
3115#define FOO(x) 'x'
3116int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3117
Skip Montanaro6dead952003-09-25 14:50:04 +00003118int test (int i, double x);
3119struct s1 {int (*f) (int a);};
3120struct s2 {int (*f) (double a);};
3121int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3122int argc;
3123char **argv;
3124int
3125main ()
3126{
3127return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3128 ;
3129 return 0;
3130}
3131_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003132for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3133 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003134do
3135 CC="$ac_save_CC $ac_arg"
3136 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003137if { (ac_try="$ac_compile"
3138case "(($ac_try" in
3139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3140 *) ac_try_echo=$ac_try;;
3141esac
3142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3143 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003145 grep -v '^ *+' conftest.er1 >conftest.err
3146 rm -f conftest.er1
3147 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003149 (exit $ac_status); } && {
3150 test -z "$ac_c_werror_flag" ||
3151 test ! -s conftest.err
3152 } && test -s conftest.$ac_objext; then
3153 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003154else
3155 echo "$as_me: failed program was:" >&5
3156sed 's/^/| /' conftest.$ac_ext >&5
3157
Martin v. Löwiseba40652007-08-30 20:10:57 +00003158
Skip Montanaro6dead952003-09-25 14:50:04 +00003159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003160
3161rm -f core conftest.err conftest.$ac_objext
3162 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003163done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003164rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003165CC=$ac_save_CC
3166
3167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003168# AC_CACHE_VAL
3169case "x$ac_cv_prog_cc_c89" in
3170 x)
3171 { echo "$as_me:$LINENO: result: none needed" >&5
3172echo "${ECHO_T}none needed" >&6; } ;;
3173 xno)
3174 { echo "$as_me:$LINENO: result: unsupported" >&5
3175echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003176 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003177 CC="$CC $ac_cv_prog_cc_c89"
3178 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3179echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003180esac
3181
Skip Montanaro6dead952003-09-25 14:50:04 +00003182
Martin v. Löwis11437992002-04-12 09:54:03 +00003183ac_ext=c
3184ac_cpp='$CPP $CPPFLAGS'
3185ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3186ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3187ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003189
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003190
3191
Martin v. Löwiseba40652007-08-30 20:10:57 +00003192{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3193echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003194
Martin v. Löwiseba40652007-08-30 20:10:57 +00003195# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003196if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003197 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003198
3199 case $withval in
3200 no) with_cxx_main=no
3201 MAINCC='$(CC)';;
3202 yes) with_cxx_main=yes
3203 MAINCC='$(CXX)';;
3204 *) with_cxx_main=yes
3205 MAINCC=$withval
3206 if test -z "$CXX"
3207 then
3208 CXX=$withval
3209 fi;;
3210 esac
3211else
3212
3213 with_cxx_main=no
3214 MAINCC='$(CC)'
3215
Martin v. Löwiseba40652007-08-30 20:10:57 +00003216fi
3217
3218{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3219echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003220
3221preset_cxx="$CXX"
3222if test -z "$CXX"
3223then
3224 case "$CC" in
3225 gcc) # Extract the first word of "g++", so it can be a program name with args.
3226set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3228echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003229if test "${ac_cv_path_CXX+set}" = set; then
3230 echo $ECHO_N "(cached) $ECHO_C" >&6
3231else
3232 case $CXX in
3233 [\\/]* | ?:[\\/]*)
3234 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3235 ;;
3236 *)
3237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3238for as_dir in notfound
3239do
3240 IFS=$as_save_IFS
3241 test -z "$as_dir" && as_dir=.
3242 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003243 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003244 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3245 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3246 break 2
3247 fi
3248done
3249done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003251
3252 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3253 ;;
3254esac
3255fi
3256CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003257if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003258 { echo "$as_me:$LINENO: result: $CXX" >&5
3259echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003260else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003261 { echo "$as_me:$LINENO: result: no" >&5
3262echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003264
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003265 ;;
3266 cc) # Extract the first word of "c++", so it can be a program name with args.
3267set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003268{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3269echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003270if test "${ac_cv_path_CXX+set}" = set; then
3271 echo $ECHO_N "(cached) $ECHO_C" >&6
3272else
3273 case $CXX in
3274 [\\/]* | ?:[\\/]*)
3275 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3276 ;;
3277 *)
3278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3279for as_dir in notfound
3280do
3281 IFS=$as_save_IFS
3282 test -z "$as_dir" && as_dir=.
3283 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003284 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 +00003285 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3286 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3287 break 2
3288 fi
3289done
3290done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003291IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003292
3293 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3294 ;;
3295esac
3296fi
3297CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003298if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003299 { echo "$as_me:$LINENO: result: $CXX" >&5
3300echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003301else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003302 { echo "$as_me:$LINENO: result: no" >&5
3303echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003305
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003306 ;;
3307 esac
3308 if test "$CXX" = "notfound"
3309 then
3310 CXX=""
3311 fi
3312fi
3313if test -z "$CXX"
3314then
3315 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3316do
3317 # Extract the first word of "$ac_prog", so it can be a program name with args.
3318set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3320echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003321if test "${ac_cv_prog_CXX+set}" = set; then
3322 echo $ECHO_N "(cached) $ECHO_C" >&6
3323else
3324 if test -n "$CXX"; then
3325 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3326else
3327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3328for as_dir in $PATH
3329do
3330 IFS=$as_save_IFS
3331 test -z "$as_dir" && as_dir=.
3332 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003333 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 +00003334 ac_cv_prog_CXX="$ac_prog"
3335 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3336 break 2
3337 fi
3338done
3339done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003340IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003341
3342fi
3343fi
3344CXX=$ac_cv_prog_CXX
3345if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346 { echo "$as_me:$LINENO: result: $CXX" >&5
3347echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003348else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003349 { echo "$as_me:$LINENO: result: no" >&5
3350echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003351fi
3352
Martin v. Löwiseba40652007-08-30 20:10:57 +00003353
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003354 test -n "$CXX" && break
3355done
3356test -n "$CXX" || CXX="notfound"
3357
3358 if test "$CXX" = "notfound"
3359 then
3360 CXX=""
3361 fi
3362fi
3363if test "$preset_cxx" != "$CXX"
3364then
3365 { echo "$as_me:$LINENO: WARNING:
3366
3367 By default, distutils will build C++ extension modules with \"$CXX\".
3368 If this is not intended, then set CXX on the configure command line.
3369 " >&5
3370echo "$as_me: WARNING:
3371
3372 By default, distutils will build C++ extension modules with \"$CXX\".
3373 If this is not intended, then set CXX on the configure command line.
3374 " >&2;}
3375fi
3376
3377
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003378# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003379
3380ac_ext=c
3381ac_cpp='$CPP $CPPFLAGS'
3382ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3383ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3384ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003385{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3386echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003387# On Suns, sometimes $CPP names a directory.
3388if test -n "$CPP" && test -d "$CPP"; then
3389 CPP=
3390fi
3391if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003392 if test "${ac_cv_prog_CPP+set}" = set; then
3393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003394else
Martin v. Löwis11437992002-04-12 09:54:03 +00003395 # Double quotes because CPP needs to be expanded
3396 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3397 do
3398 ac_preproc_ok=false
3399for ac_c_preproc_warn_flag in '' yes
3400do
3401 # Use a header file that comes with gcc, so configuring glibc
3402 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003403 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3404 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003405 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003406 # not just through cpp. "Syntax error" is here to catch this case.
3407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003408/* confdefs.h. */
3409_ACEOF
3410cat confdefs.h >>conftest.$ac_ext
3411cat >>conftest.$ac_ext <<_ACEOF
3412/* end confdefs.h. */
3413#ifdef __STDC__
3414# include <limits.h>
3415#else
3416# include <assert.h>
3417#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003418 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003419_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003420if { (ac_try="$ac_cpp conftest.$ac_ext"
3421case "(($ac_try" in
3422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3423 *) ac_try_echo=$ac_try;;
3424esac
3425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3426 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003428 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003429 rm -f conftest.er1
3430 cat conftest.err >&5
3431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003432 (exit $ac_status); } >/dev/null && {
3433 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3434 test ! -s conftest.err
3435 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003436 :
3437else
Martin v. Löwis11437992002-04-12 09:54:03 +00003438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003439sed 's/^/| /' conftest.$ac_ext >&5
3440
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 # Broken: fails on valid input.
3442continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003444
Martin v. Löwis11437992002-04-12 09:54:03 +00003445rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003446
Martin v. Löwiseba40652007-08-30 20:10:57 +00003447 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 # can be detected and how.
3449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003450/* confdefs.h. */
3451_ACEOF
3452cat confdefs.h >>conftest.$ac_ext
3453cat >>conftest.$ac_ext <<_ACEOF
3454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003455#include <ac_nonexistent.h>
3456_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003457if { (ac_try="$ac_cpp conftest.$ac_ext"
3458case "(($ac_try" in
3459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3460 *) ac_try_echo=$ac_try;;
3461esac
3462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3463 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003465 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 rm -f conftest.er1
3467 cat conftest.err >&5
3468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003469 (exit $ac_status); } >/dev/null && {
3470 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3471 test ! -s conftest.err
3472 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 # Broken: success on invalid input.
3474continue
3475else
3476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003477sed 's/^/| /' conftest.$ac_ext >&5
3478
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 # Passes both tests.
3480ac_preproc_ok=:
3481break
3482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003483
Martin v. Löwis11437992002-04-12 09:54:03 +00003484rm -f conftest.err conftest.$ac_ext
3485
3486done
3487# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3488rm -f conftest.err conftest.$ac_ext
3489if $ac_preproc_ok; then
3490 break
3491fi
3492
3493 done
3494 ac_cv_prog_CPP=$CPP
3495
3496fi
3497 CPP=$ac_cv_prog_CPP
3498else
3499 ac_cv_prog_CPP=$CPP
3500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003501{ echo "$as_me:$LINENO: result: $CPP" >&5
3502echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003503ac_preproc_ok=false
3504for ac_c_preproc_warn_flag in '' yes
3505do
3506 # Use a header file that comes with gcc, so configuring glibc
3507 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003508 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3509 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 # On the NeXT, cc -E runs the code through the compiler's parser,
3511 # not just through cpp. "Syntax error" is here to catch this case.
3512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003513/* confdefs.h. */
3514_ACEOF
3515cat confdefs.h >>conftest.$ac_ext
3516cat >>conftest.$ac_ext <<_ACEOF
3517/* end confdefs.h. */
3518#ifdef __STDC__
3519# include <limits.h>
3520#else
3521# include <assert.h>
3522#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003523 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003524_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003525if { (ac_try="$ac_cpp conftest.$ac_ext"
3526case "(($ac_try" in
3527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3528 *) ac_try_echo=$ac_try;;
3529esac
3530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3531 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003533 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 rm -f conftest.er1
3535 cat conftest.err >&5
3536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003537 (exit $ac_status); } >/dev/null && {
3538 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3539 test ! -s conftest.err
3540 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 :
3542else
3543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003544sed 's/^/| /' conftest.$ac_ext >&5
3545
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 # Broken: fails on valid input.
3547continue
3548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003549
Martin v. Löwis11437992002-04-12 09:54:03 +00003550rm -f conftest.err conftest.$ac_ext
3551
Martin v. Löwiseba40652007-08-30 20:10:57 +00003552 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 # can be detected and how.
3554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003555/* confdefs.h. */
3556_ACEOF
3557cat confdefs.h >>conftest.$ac_ext
3558cat >>conftest.$ac_ext <<_ACEOF
3559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003560#include <ac_nonexistent.h>
3561_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003562if { (ac_try="$ac_cpp conftest.$ac_ext"
3563case "(($ac_try" in
3564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3565 *) ac_try_echo=$ac_try;;
3566esac
3567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003570 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 rm -f conftest.er1
3572 cat conftest.err >&5
3573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003574 (exit $ac_status); } >/dev/null && {
3575 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3576 test ! -s conftest.err
3577 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 # Broken: success on invalid input.
3579continue
3580else
3581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003582sed 's/^/| /' conftest.$ac_ext >&5
3583
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # Passes both tests.
3585ac_preproc_ok=:
3586break
3587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003588
Martin v. Löwis11437992002-04-12 09:54:03 +00003589rm -f conftest.err conftest.$ac_ext
3590
3591done
3592# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3593rm -f conftest.err conftest.$ac_ext
3594if $ac_preproc_ok; then
3595 :
3596else
Skip Montanaro6dead952003-09-25 14:50:04 +00003597 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3598See \`config.log' for more details." >&5
3599echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3600See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 { (exit 1); exit 1; }; }
3602fi
3603
3604ac_ext=c
3605ac_cpp='$CPP $CPPFLAGS'
3606ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3607ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3608ac_compiler_gnu=$ac_cv_c_compiler_gnu
3609
3610
Martin v. Löwiseba40652007-08-30 20:10:57 +00003611{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3612echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3613if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003614 echo $ECHO_N "(cached) $ECHO_C" >&6
3615else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003616 # Extract the first word of "grep ggrep" to use in msg output
3617if test -z "$GREP"; then
3618set dummy grep ggrep; ac_prog_name=$2
3619if test "${ac_cv_path_GREP+set}" = set; then
3620 echo $ECHO_N "(cached) $ECHO_C" >&6
3621else
3622 ac_path_GREP_found=false
3623# Loop through the user's path and test for each of PROGNAME-LIST
3624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3625for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3626do
3627 IFS=$as_save_IFS
3628 test -z "$as_dir" && as_dir=.
3629 for ac_prog in grep ggrep; do
3630 for ac_exec_ext in '' $ac_executable_extensions; do
3631 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3632 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3633 # Check for GNU ac_path_GREP and select it if it is found.
3634 # Check for GNU $ac_path_GREP
3635case `"$ac_path_GREP" --version 2>&1` in
3636*GNU*)
3637 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3638*)
3639 ac_count=0
3640 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3641 while :
3642 do
3643 cat "conftest.in" "conftest.in" >"conftest.tmp"
3644 mv "conftest.tmp" "conftest.in"
3645 cp "conftest.in" "conftest.nl"
3646 echo 'GREP' >> "conftest.nl"
3647 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3648 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3649 ac_count=`expr $ac_count + 1`
3650 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3651 # Best one so far, save it but keep looking for a better one
3652 ac_cv_path_GREP="$ac_path_GREP"
3653 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003654 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003655 # 10*(2^10) chars as input seems more than enough
3656 test $ac_count -gt 10 && break
3657 done
3658 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3659esac
3660
3661
3662 $ac_path_GREP_found && break 3
3663 done
3664done
3665
3666done
3667IFS=$as_save_IFS
3668
3669
Skip Montanaro6dead952003-09-25 14:50:04 +00003670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003671
3672GREP="$ac_cv_path_GREP"
3673if test -z "$GREP"; then
3674 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3675echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3676 { (exit 1); exit 1; }; }
3677fi
3678
3679else
3680 ac_cv_path_GREP=$GREP
3681fi
3682
3683
3684fi
3685{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3686echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3687 GREP="$ac_cv_path_GREP"
3688
3689
3690{ echo "$as_me:$LINENO: checking for egrep" >&5
3691echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3692if test "${ac_cv_path_EGREP+set}" = set; then
3693 echo $ECHO_N "(cached) $ECHO_C" >&6
3694else
3695 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3696 then ac_cv_path_EGREP="$GREP -E"
3697 else
3698 # Extract the first word of "egrep" to use in msg output
3699if test -z "$EGREP"; then
3700set dummy egrep; ac_prog_name=$2
3701if test "${ac_cv_path_EGREP+set}" = set; then
3702 echo $ECHO_N "(cached) $ECHO_C" >&6
3703else
3704 ac_path_EGREP_found=false
3705# Loop through the user's path and test for each of PROGNAME-LIST
3706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3707for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3708do
3709 IFS=$as_save_IFS
3710 test -z "$as_dir" && as_dir=.
3711 for ac_prog in egrep; do
3712 for ac_exec_ext in '' $ac_executable_extensions; do
3713 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3714 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3715 # Check for GNU ac_path_EGREP and select it if it is found.
3716 # Check for GNU $ac_path_EGREP
3717case `"$ac_path_EGREP" --version 2>&1` in
3718*GNU*)
3719 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3720*)
3721 ac_count=0
3722 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3723 while :
3724 do
3725 cat "conftest.in" "conftest.in" >"conftest.tmp"
3726 mv "conftest.tmp" "conftest.in"
3727 cp "conftest.in" "conftest.nl"
3728 echo 'EGREP' >> "conftest.nl"
3729 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3730 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3731 ac_count=`expr $ac_count + 1`
3732 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3733 # Best one so far, save it but keep looking for a better one
3734 ac_cv_path_EGREP="$ac_path_EGREP"
3735 ac_path_EGREP_max=$ac_count
3736 fi
3737 # 10*(2^10) chars as input seems more than enough
3738 test $ac_count -gt 10 && break
3739 done
3740 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3741esac
3742
3743
3744 $ac_path_EGREP_found && break 3
3745 done
3746done
3747
3748done
3749IFS=$as_save_IFS
3750
3751
3752fi
3753
3754EGREP="$ac_cv_path_EGREP"
3755if test -z "$EGREP"; then
3756 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3757echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3758 { (exit 1); exit 1; }; }
3759fi
3760
3761else
3762 ac_cv_path_EGREP=$EGREP
3763fi
3764
3765
3766 fi
3767fi
3768{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3769echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3770 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003771
3772
Martin v. Löwis11437992002-04-12 09:54:03 +00003773
Martin v. Löwiseba40652007-08-30 20:10:57 +00003774{ echo "$as_me:$LINENO: checking for AIX" >&5
3775echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003776cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003777/* confdefs.h. */
3778_ACEOF
3779cat confdefs.h >>conftest.$ac_ext
3780cat >>conftest.$ac_ext <<_ACEOF
3781/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003782#ifdef _AIX
3783 yes
3784#endif
3785
Martin v. Löwis11437992002-04-12 09:54:03 +00003786_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003788 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003789 { echo "$as_me:$LINENO: result: yes" >&5
3790echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003791cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003792#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003793_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003794
3795else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003796 { echo "$as_me:$LINENO: result: no" >&5
3797echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003798fi
3799rm -f conftest*
3800
Michael W. Hudson54241132001-12-07 15:38:26 +00003801
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003802
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003803# Check for unsupported systems
3804case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003805atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003806 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3807 echo See README for details.
3808 exit 1;;
3809esac
3810
Michael W. Hudson54241132001-12-07 15:38:26 +00003811
Martin v. Löwiseba40652007-08-30 20:10:57 +00003812{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3813echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003814
Martin v. Löwiseba40652007-08-30 20:10:57 +00003815# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003816if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003817 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003818 case $withval in
3819 no) EXEEXT=;;
3820 yes) EXEEXT=.exe;;
3821 *) EXEEXT=$withval;;
3822 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003823fi
3824
3825{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3826echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003827
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003828# Test whether we're running on a non-case-sensitive system, in which
3829# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003830
Martin v. Löwiseba40652007-08-30 20:10:57 +00003831{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3832echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003833if test ! -d CaseSensitiveTestDir; then
3834mkdir CaseSensitiveTestDir
3835fi
3836
3837if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003838then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003839 { echo "$as_me:$LINENO: result: yes" >&5
3840echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003841 BUILDEXEEXT=.exe
3842else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003843 { echo "$as_me:$LINENO: result: no" >&5
3844echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003845 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003846fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003847rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003848
Guido van Rossumdd997f71998-10-07 19:58:26 +00003849case $MACHDEP in
3850bsdos*)
3851 case $CC in
3852 gcc) CC="$CC -D_HAVE_BSDI";;
3853 esac;;
3854esac
3855
Guido van Rossum24b1e751997-08-21 02:29:16 +00003856case $ac_sys_system in
3857hp*|HP*)
3858 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003859 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003860 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003861Monterey*)
3862 case $CC in
3863 cc) CC="$CC -Wl,-Bexport";;
3864 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003865SunOS*)
3866 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003867
3868cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003869#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003870_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003871
3872 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003873esac
3874
Michael W. Hudson54241132001-12-07 15:38:26 +00003875
3876
Martin v. Löwiseba40652007-08-30 20:10:57 +00003877{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3878echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003879if test -z "$LIBRARY"
3880then
3881 LIBRARY='libpython$(VERSION).a'
3882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003883{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3884echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003885
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003886# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003887# name of the library into which to insert object files). BLDLIBRARY is also
3888# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3889# is blank as the main program is not linked directly against LDLIBRARY.
3890# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3891# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3892# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3893# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003894#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003895# RUNSHARED is used to run shared python without installed libraries
3896#
3897# INSTSONAME is the name of the shared library that will be use to install
3898# on the system - some systems like version suffix, others don't
3899
3900
Michael W. Hudson54241132001-12-07 15:38:26 +00003901
3902
3903
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003904
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003905LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003906BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003907INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003908DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003909LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003910RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003911
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003912# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003913# If CXX is set, and if it is needed to link a main function that was
3914# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3915# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003916# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003917# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003918
Martin v. Löwiseba40652007-08-30 20:10:57 +00003919{ echo "$as_me:$LINENO: checking LINKCC" >&5
3920echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003921if test -z "$LINKCC"
3922then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003923 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003924 case $ac_sys_system in
3925 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003926 exp_extra="\"\""
3927 if test $ac_sys_release -ge 5 -o \
3928 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3929 exp_extra="."
3930 fi
3931 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003932 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003933 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003934 esac
3935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003936{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3937echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003938
Martin v. Löwiseba40652007-08-30 20:10:57 +00003939{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3940echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3941# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003942if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003943 enableval=$enable_shared;
3944fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003945
Martin v. Löwis1142de32002-03-29 16:28:31 +00003946
3947if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003948then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003949 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003950 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003951 enable_shared="yes";;
3952 *)
3953 enable_shared="no";;
3954 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003956{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3957echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003958
Martin v. Löwiseba40652007-08-30 20:10:57 +00003959{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3960echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3961# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003962if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003963 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003964 CC="$CC -pg"
3965 if test "$cross_compiling" = yes; then
3966 ac_enable_profiling="no"
3967else
3968 cat >conftest.$ac_ext <<_ACEOF
3969/* confdefs.h. */
3970_ACEOF
3971cat confdefs.h >>conftest.$ac_ext
3972cat >>conftest.$ac_ext <<_ACEOF
3973/* end confdefs.h. */
3974int main() { return 0; }
3975_ACEOF
3976rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003977if { (ac_try="$ac_link"
3978case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981esac
3982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3983 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003984 ac_status=$?
3985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003987 { (case "(($ac_try" in
3988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3989 *) ac_try_echo=$ac_try;;
3990esac
3991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3992 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003993 ac_status=$?
3994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3995 (exit $ac_status); }; }; then
3996 ac_enable_profiling="yes"
3997else
3998 echo "$as_me: program exited with status $ac_status" >&5
3999echo "$as_me: failed program was:" >&5
4000sed 's/^/| /' conftest.$ac_ext >&5
4001
4002( exit $ac_status )
4003ac_enable_profiling="no"
4004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004005rm -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 +00004006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004007
4008
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004009 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004010fi
4011
4012{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4013echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004014
4015case "$ac_enable_profiling" in
4016 "yes")
4017 BASECFLAGS="-pg $BASECFLAGS"
4018 LDFLAGS="-pg $LDFLAGS"
4019 ;;
4020esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004021
Martin v. Löwiseba40652007-08-30 20:10:57 +00004022{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4023echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004024
Guido van Rossumb8552162001-09-05 14:58:11 +00004025# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4026# library that we build, but we do not want to link against it (we
4027# will find it with a -framework option). For this reason there is an
4028# extra variable BLDLIBRARY against which Python and the extension
4029# modules are linked, BLDLIBRARY. This is normally the same as
4030# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004031if test "$enable_framework"
4032then
4033 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004034 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004035 BLDLIBRARY=''
4036else
4037 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004038fi
Jack Jansene578a632001-08-15 01:27:14 +00004039
Martin v. Löwis1142de32002-03-29 16:28:31 +00004040# Other platforms follow
4041if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004042
4043cat >>confdefs.h <<\_ACEOF
4044#define Py_ENABLE_SHARED 1
4045_ACEOF
4046
Martin v. Löwis1142de32002-03-29 16:28:31 +00004047 case $ac_sys_system in
4048 BeOS*)
4049 LDLIBRARY='libpython$(VERSION).so'
4050 ;;
4051 CYGWIN*)
4052 LDLIBRARY='libpython$(VERSION).dll.a'
4053 DLLLIBRARY='libpython$(VERSION).dll'
4054 ;;
4055 SunOS*)
4056 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004057 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004058 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004059 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004060 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004061 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004062 LDLIBRARY='libpython$(VERSION).so'
4063 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004064 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004065 case $ac_sys_system in
4066 FreeBSD*)
4067 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4068 ;;
4069 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004070 INSTSONAME="$LDLIBRARY".$SOVERSION
4071 ;;
4072 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004073 case `uname -m` in
4074 ia64)
4075 LDLIBRARY='libpython$(VERSION).so'
4076 ;;
4077 *)
4078 LDLIBRARY='libpython$(VERSION).sl'
4079 ;;
4080 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004081 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004082 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004083 ;;
4084 OSF*)
4085 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004086 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004087 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004088 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004089 atheos*)
4090 LDLIBRARY='libpython$(VERSION).so'
4091 BLDLIBRARY='-L. -lpython$(VERSION)'
4092 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4093 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004094 esac
Jason Tishler30765592003-09-04 11:04:06 +00004095else # shared is disabled
4096 case $ac_sys_system in
4097 CYGWIN*)
4098 BLDLIBRARY='$(LIBRARY)'
4099 LDLIBRARY='libpython$(VERSION).dll.a'
4100 ;;
4101 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004102fi
4103
Martin v. Löwiseba40652007-08-30 20:10:57 +00004104{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4105echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004106
Martin v. Löwis11437992002-04-12 09:54:03 +00004107if test -n "$ac_tool_prefix"; then
4108 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4109set dummy ${ac_tool_prefix}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_RANLIB+set}" = set; then
4113 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004114else
4115 if test -n "$RANLIB"; then
4116 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4117else
Martin v. Löwis11437992002-04-12 09:54:03 +00004118as_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_RANLIB="${ac_tool_prefix}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
Guido van Rossum627b2d71993-12-24 10:39:16 +00004133fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004135RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004136if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4138echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +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
Martin v. Löwis11437992002-04-12 09:54:03 +00004145fi
4146if test -z "$ac_cv_prog_RANLIB"; then
4147 ac_ct_RANLIB=$RANLIB
4148 # Extract the first word of "ranlib", so it can be a program name with args.
4149set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004150{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4151echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004152if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4153 echo $ECHO_N "(cached) $ECHO_C" >&6
4154else
4155 if test -n "$ac_ct_RANLIB"; then
4156 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4157else
4158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4159for as_dir in $PATH
4160do
4161 IFS=$as_save_IFS
4162 test -z "$as_dir" && as_dir=.
4163 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004164 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 +00004165 ac_cv_prog_ac_ct_RANLIB="ranlib"
4166 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4167 break 2
4168 fi
4169done
4170done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004171IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
Martin v. Löwis11437992002-04-12 09:54:03 +00004173fi
4174fi
4175ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4176if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004177 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4178echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004179else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004180 { echo "$as_me:$LINENO: result: no" >&5
4181echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004182fi
4183
Martin v. Löwiseba40652007-08-30 20:10:57 +00004184 if test "x$ac_ct_RANLIB" = x; then
4185 RANLIB=":"
4186 else
4187 case $cross_compiling:$ac_tool_warned in
4188yes:)
4189{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4190whose name does not start with the host triplet. If you think this
4191configuration is useful to you, please write to autoconf@gnu.org." >&5
4192echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4193whose name does not start with the host triplet. If you think this
4194configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4195ac_tool_warned=yes ;;
4196esac
4197 RANLIB=$ac_ct_RANLIB
4198 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004199else
4200 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004202
4203
Guido van Rossum7f43da71994-08-01 12:15:30 +00004204for ac_prog in ar aal
4205do
Martin v. Löwis11437992002-04-12 09:54:03 +00004206 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004208{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4209echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004210if test "${ac_cv_prog_AR+set}" = set; then
4211 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004212else
4213 if test -n "$AR"; then
4214 ac_cv_prog_AR="$AR" # Let the user override the test.
4215else
Martin v. Löwis11437992002-04-12 09:54:03 +00004216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4217for as_dir in $PATH
4218do
4219 IFS=$as_save_IFS
4220 test -z "$as_dir" && as_dir=.
4221 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004222 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 +00004223 ac_cv_prog_AR="$ac_prog"
4224 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4225 break 2
4226 fi
4227done
4228done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004229IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004230
Guido van Rossum7f43da71994-08-01 12:15:30 +00004231fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004233AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004234if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004235 { echo "$as_me:$LINENO: result: $AR" >&5
4236echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238 { echo "$as_me:$LINENO: result: no" >&5
4239echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004241
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242
Martin v. Löwis11437992002-04-12 09:54:03 +00004243 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004244done
4245test -n "$AR" || AR="ar"
4246
Michael W. Hudson54241132001-12-07 15:38:26 +00004247
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004248
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004249# Extract the first word of "svnversion", so it can be a program name with args.
4250set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004251{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4252echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004253if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4254 echo $ECHO_N "(cached) $ECHO_C" >&6
4255else
4256 if test -n "$SVNVERSION"; then
4257 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4258else
4259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4260for as_dir in $PATH
4261do
4262 IFS=$as_save_IFS
4263 test -z "$as_dir" && as_dir=.
4264 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004265 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 +00004266 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004267 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4268 break 2
4269 fi
4270done
4271done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004273
Martin v. Löwisff600232006-04-03 19:12:32 +00004274 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004275fi
4276fi
4277SVNVERSION=$ac_cv_prog_SVNVERSION
4278if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4280echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004281else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004282 { echo "$as_me:$LINENO: result: no" >&5
4283echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004284fi
4285
Martin v. Löwiseba40652007-08-30 20:10:57 +00004286
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004287if test $SVNVERSION = found
4288then
4289 SVNVERSION="svnversion \$(srcdir)"
4290else
4291 SVNVERSION="echo exported"
4292fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004293
Neil Schemenauera42c8272001-03-31 00:01:55 +00004294case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004295bsdos*|hp*|HP*)
4296 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004297 if test -z "$INSTALL"
4298 then
4299 INSTALL="${srcdir}/install-sh -c"
4300 fi
4301esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004302ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004303for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4304 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004305 ac_aux_dir=$ac_dir
4306 ac_install_sh="$ac_aux_dir/install-sh -c"
4307 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004308 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004309 ac_aux_dir=$ac_dir
4310 ac_install_sh="$ac_aux_dir/install.sh -c"
4311 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004312 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004313 ac_aux_dir=$ac_dir
4314 ac_install_sh="$ac_aux_dir/shtool install -c"
4315 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004316 fi
4317done
4318if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004319 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4320echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004321 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004323
4324# These three variables are undocumented and unsupported,
4325# and are intended to be withdrawn in a future Autoconf release.
4326# They can cause serious problems if a builder's source tree is in a directory
4327# whose full name contains unusual characters.
4328ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4329ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4330ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4331
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004332
4333# Find a good install program. We prefer a C program (faster),
4334# so one script is as good as another. But avoid the broken or
4335# incompatible versions:
4336# SysV /etc/install, /usr/sbin/install
4337# SunOS /usr/etc/install
4338# IRIX /sbin/install
4339# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004340# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004341# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4342# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4343# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004344# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004345# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004346{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4347echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004348if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004349if test "${ac_cv_path_install+set}" = set; then
4350 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004351else
Martin v. Löwis11437992002-04-12 09:54:03 +00004352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4353for as_dir in $PATH
4354do
4355 IFS=$as_save_IFS
4356 test -z "$as_dir" && as_dir=.
4357 # Account for people who put trailing slashes in PATH elements.
4358case $as_dir/ in
4359 ./ | .// | /cC/* | \
4360 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004361 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004362 /usr/ucb/* ) ;;
4363 *)
4364 # OSF1 and SCO ODT 3.0 have their own names for install.
4365 # Don't use installbsd from OSF since it installs stuff as root
4366 # by default.
4367 for ac_prog in ginstall scoinst install; do
4368 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004369 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 +00004370 if test $ac_prog = install &&
4371 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4372 # AIX install. It has an incompatible calling convention.
4373 :
4374 elif test $ac_prog = install &&
4375 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4376 # program-specific install script used by HP pwplus--don't use.
4377 :
4378 else
4379 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4380 break 3
4381 fi
4382 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004383 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004384 done
4385 ;;
4386esac
4387done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004388IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004389
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004390
4391fi
4392 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004393 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004394 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004395 # As a last resort, use the slow shell script. Don't cache a
4396 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004397 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004398 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004399 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004400 fi
4401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4403echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004404
4405# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4406# It thinks the first close brace ends the variable substitution.
4407test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4408
Martin v. Löwis11437992002-04-12 09:54:03 +00004409test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004410
4411test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4412
Michael W. Hudson54241132001-12-07 15:38:26 +00004413
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004414# Not every filesystem supports hard links
4415
4416if test -z "$LN" ; then
4417 case $ac_sys_system in
4418 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004419 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004420 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004421 *) LN=ln;;
4422 esac
4423fi
4424
Fred Drake109d9862001-07-11 06:27:56 +00004425# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004426{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4427echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004428
Martin v. Löwiseba40652007-08-30 20:10:57 +00004429# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004430if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004431 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004432if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004433then
4434
4435cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004436#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004437_ACEOF
4438
Martin v. Löwiseba40652007-08-30 20:10:57 +00004439 { echo "$as_me:$LINENO: result: yes" >&5
4440echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004441 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004442else { echo "$as_me:$LINENO: result: no" >&5
4443echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004444fi
4445else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004446 { echo "$as_me:$LINENO: result: no" >&5
4447echo "${ECHO_T}no" >&6; }
4448fi
4449
Fred Drake109d9862001-07-11 06:27:56 +00004450
Skip Montanarodecc6a42003-01-01 20:07:49 +00004451# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4452# merged with this chunk of code?
4453
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004454# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004455# ------------------------
4456# (The following bit of code is complicated enough - please keep things
4457# indented properly. Just pretend you're editing Python code. ;-)
4458
4459# There are two parallel sets of case statements below, one that checks to
4460# see if OPT was set and one that does BASECFLAGS setting based upon
4461# compiler and platform. BASECFLAGS tweaks need to be made even if the
4462# user set OPT.
4463
4464# tweak OPT based on compiler and platform, only if the user didn't set
4465# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004466
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004467if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004468then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004469 case $GCC in
4470 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004471 if test "$CC" != 'g++' ; then
4472 STRICT_PROTO="-Wstrict-prototypes"
4473 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004474 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4475 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4476 WRAP="-fwrapv"
4477 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004478 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004479 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004480 if test "$Py_DEBUG" = 'true' ; then
4481 # Optimization messes up debuggers, so turn it off for
4482 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004483 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004484 else
Thomas Hellere5529592007-12-13 21:20:29 +00004485 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004486 fi
4487 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004488 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004489 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004490 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004491 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004492 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004493 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4494 ;;
4495 esac
Fred Drake109d9862001-07-11 06:27:56 +00004496 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004497
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004498 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004499 OPT="-O"
4500 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004501 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004502
4503 # The current (beta) Monterey compiler dies with optimizations
4504 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004505 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004506 Monterey*)
4507 OPT=""
4508 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004509 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004510
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004511fi
4512
Skip Montanarodecc6a42003-01-01 20:07:49 +00004513
4514# tweak BASECFLAGS based on compiler and platform
4515case $GCC in
4516yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004517 # Python violates C99 rules, by casting between incompatible
4518 # pointer types. GCC may generate bad code as a result of that,
4519 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004520 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4521echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004522 ac_save_cc="$CC"
4523 CC="$CC -fno-strict-aliasing"
4524 if test "$cross_compiling" = yes; then
4525 ac_cv_no_strict_aliasing_ok=no
4526else
4527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004528/* confdefs.h. */
4529_ACEOF
4530cat confdefs.h >>conftest.$ac_ext
4531cat >>conftest.$ac_ext <<_ACEOF
4532/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004533int main() { return 0; }
4534_ACEOF
4535rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004536if { (ac_try="$ac_link"
4537case "(($ac_try" in
4538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4539 *) ac_try_echo=$ac_try;;
4540esac
4541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4542 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004543 ac_status=$?
4544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4545 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004546 { (case "(($ac_try" in
4547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4548 *) ac_try_echo=$ac_try;;
4549esac
4550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4551 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004552 ac_status=$?
4553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4554 (exit $ac_status); }; }; then
4555 ac_cv_no_strict_aliasing_ok=yes
4556else
4557 echo "$as_me: program exited with status $ac_status" >&5
4558echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004559sed 's/^/| /' conftest.$ac_ext >&5
4560
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004561( exit $ac_status )
4562ac_cv_no_strict_aliasing_ok=no
4563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004564rm -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 +00004565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004566
4567
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004568 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004569 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4570echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004571 if test $ac_cv_no_strict_aliasing_ok = yes
4572 then
4573 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4574 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004575
4576 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4577 # support. Without this, treatment of subnormals doesn't follow
4578 # the standard.
4579 case $ac_sys_machine in
4580 alpha*)
4581 BASECFLAGS="$BASECFLAGS -mieee"
4582 ;;
4583 esac
4584
Skip Montanarodecc6a42003-01-01 20:07:49 +00004585 case $ac_sys_system in
4586 SCO_SV*)
4587 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4588 ;;
4589 # is there any other compiler on Darwin besides gcc?
4590 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004591 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4592 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren988117f2006-04-29 11:31:35 +00004593 if test "${enable_universalsdk}"; then
4594 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4595 fi
4596
Skip Montanarodecc6a42003-01-01 20:07:49 +00004597 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004598 OSF*)
4599 BASECFLAGS="$BASECFLAGS -mieee"
4600 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004601 esac
4602 ;;
4603
4604*)
4605 case $ac_sys_system in
4606 OpenUNIX*|UnixWare*)
4607 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4608 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004609 OSF*)
4610 BASECFLAGS="$BASECFLAGS -ieee -std"
4611 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004612 SCO_SV*)
4613 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4614 ;;
4615 esac
4616 ;;
4617esac
4618
Fred Drakee1ceaa02001-12-04 20:55:47 +00004619if test "$Py_DEBUG" = 'true'; then
4620 :
4621else
4622 OPT="-DNDEBUG $OPT"
4623fi
4624
Guido van Rossum563e7081996-09-10 18:20:48 +00004625if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004626then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004627 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004628fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004629
Neal Norwitz020c46a2006-01-07 21:39:28 +00004630# disable check for icc since it seems to pass, but generates a warning
4631if test "$CC" = icc
4632then
4633 ac_cv_opt_olimit_ok=no
4634fi
4635
Martin v. Löwiseba40652007-08-30 20:10:57 +00004636{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4637echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004638if test "${ac_cv_opt_olimit_ok+set}" = set; then
4639 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004640else
4641 ac_save_cc="$CC"
4642CC="$CC -OPT:Olimit=0"
4643if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004644 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004645else
Martin v. Löwis11437992002-04-12 09:54:03 +00004646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004647/* confdefs.h. */
4648_ACEOF
4649cat confdefs.h >>conftest.$ac_ext
4650cat >>conftest.$ac_ext <<_ACEOF
4651/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004652int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004653_ACEOF
4654rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004655if { (ac_try="$ac_link"
4656case "(($ac_try" in
4657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4658 *) ac_try_echo=$ac_try;;
4659esac
4660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4661 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004662 ac_status=$?
4663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4664 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004665 { (case "(($ac_try" in
4666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4667 *) ac_try_echo=$ac_try;;
4668esac
4669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4670 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004671 ac_status=$?
4672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4673 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004674 ac_cv_opt_olimit_ok=yes
4675else
Martin v. Löwis11437992002-04-12 09:54:03 +00004676 echo "$as_me: program exited with status $ac_status" >&5
4677echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004678sed 's/^/| /' conftest.$ac_ext >&5
4679
Martin v. Löwis11437992002-04-12 09:54:03 +00004680( exit $ac_status )
4681ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004683rm -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 +00004684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004685
4686
Guido van Rossum91922671997-10-09 20:24:13 +00004687CC="$ac_save_cc"
4688fi
4689
Martin v. Löwiseba40652007-08-30 20:10:57 +00004690{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4691echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004692if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004693 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004694 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4695 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4696 # environment?
4697 Darwin*)
4698 ;;
4699 *)
4700 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4701 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004702 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004703else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004704 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4705echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004706 if test "${ac_cv_olimit_ok+set}" = set; then
4707 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004708else
4709 ac_save_cc="$CC"
4710 CC="$CC -Olimit 1500"
4711 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004712 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004713else
Martin v. Löwis11437992002-04-12 09:54:03 +00004714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004715/* confdefs.h. */
4716_ACEOF
4717cat confdefs.h >>conftest.$ac_ext
4718cat >>conftest.$ac_ext <<_ACEOF
4719/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004720int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004721_ACEOF
4722rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004723if { (ac_try="$ac_link"
4724case "(($ac_try" in
4725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4726 *) ac_try_echo=$ac_try;;
4727esac
4728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4729 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004730 ac_status=$?
4731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4732 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004733 { (case "(($ac_try" in
4734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4735 *) ac_try_echo=$ac_try;;
4736esac
4737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4738 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004739 ac_status=$?
4740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4741 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004742 ac_cv_olimit_ok=yes
4743else
Martin v. Löwis11437992002-04-12 09:54:03 +00004744 echo "$as_me: program exited with status $ac_status" >&5
4745echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004746sed 's/^/| /' conftest.$ac_ext >&5
4747
Martin v. Löwis11437992002-04-12 09:54:03 +00004748( exit $ac_status )
4749ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004751rm -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 +00004752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004753
4754
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004755 CC="$ac_save_cc"
4756fi
4757
Martin v. Löwiseba40652007-08-30 20:10:57 +00004758 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4759echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004760 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004761 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004762 fi
4763fi
4764
Martin v. Löwisaac13162006-10-19 10:58:46 +00004765# Check whether GCC supports PyArg_ParseTuple format
4766if test "$GCC" = "yes"
4767then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004768 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4769echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004770 save_CFLAGS=$CFLAGS
4771 CFLAGS="$CFLAGS -Werror"
4772 cat >conftest.$ac_ext <<_ACEOF
4773/* confdefs.h. */
4774_ACEOF
4775cat confdefs.h >>conftest.$ac_ext
4776cat >>conftest.$ac_ext <<_ACEOF
4777/* end confdefs.h. */
4778
4779 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4780
4781int
4782main ()
4783{
4784
4785 ;
4786 return 0;
4787}
4788_ACEOF
4789rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004790if { (ac_try="$ac_compile"
4791case "(($ac_try" in
4792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4793 *) ac_try_echo=$ac_try;;
4794esac
4795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4796 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004797 ac_status=$?
4798 grep -v '^ *+' conftest.er1 >conftest.err
4799 rm -f conftest.er1
4800 cat conftest.err >&5
4801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004802 (exit $ac_status); } && {
4803 test -z "$ac_c_werror_flag" ||
4804 test ! -s conftest.err
4805 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004806
4807cat >>confdefs.h <<\_ACEOF
4808#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4809_ACEOF
4810
Martin v. Löwiseba40652007-08-30 20:10:57 +00004811 { echo "$as_me:$LINENO: result: yes" >&5
4812echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004813else
4814 echo "$as_me: failed program was:" >&5
4815sed 's/^/| /' conftest.$ac_ext >&5
4816
Martin v. Löwiseba40652007-08-30 20:10:57 +00004817 { echo "$as_me:$LINENO: result: no" >&5
4818echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004819
4820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004821
4822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004823 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004824fi
4825
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004826# On some compilers, pthreads are available without further options
4827# (e.g. MacOS X). On some of these systems, the compiler will not
4828# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4829# So we have to see first whether pthreads are available without
4830# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004831{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4832echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004833if test "${ac_cv_pthread_is_default+set}" = set; then
4834 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004835else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004836 if test "$cross_compiling" = yes; then
4837 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004838else
Martin v. Löwis11437992002-04-12 09:54:03 +00004839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004840/* confdefs.h. */
4841_ACEOF
4842cat confdefs.h >>conftest.$ac_ext
4843cat >>conftest.$ac_ext <<_ACEOF
4844/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004845
Martin v. Löwis130fb172001-07-19 11:00:41 +00004846#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004847
4848void* routine(void* p){return NULL;}
4849
4850int main(){
4851 pthread_t p;
4852 if(pthread_create(&p,NULL,routine,NULL)!=0)
4853 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004854 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004855 return 0;
4856}
4857
Martin v. Löwis11437992002-04-12 09:54:03 +00004858_ACEOF
4859rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004860if { (ac_try="$ac_link"
4861case "(($ac_try" in
4862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4863 *) ac_try_echo=$ac_try;;
4864esac
4865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4866 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004867 ac_status=$?
4868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4869 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004870 { (case "(($ac_try" in
4871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4872 *) ac_try_echo=$ac_try;;
4873esac
4874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4875 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004876 ac_status=$?
4877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4878 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004879
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004880 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004881 ac_cv_kthread=no
4882 ac_cv_pthread=no
4883
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004884else
Martin v. Löwis11437992002-04-12 09:54:03 +00004885 echo "$as_me: program exited with status $ac_status" >&5
4886echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004887sed 's/^/| /' conftest.$ac_ext >&5
4888
Martin v. Löwis11437992002-04-12 09:54:03 +00004889( exit $ac_status )
4890ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004892rm -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 +00004893fi
4894
Martin v. Löwiseba40652007-08-30 20:10:57 +00004895
4896
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004897fi
4898
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4900echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004901
Michael W. Hudson54241132001-12-07 15:38:26 +00004902
Martin v. Löwis11437992002-04-12 09:54:03 +00004903if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004904then
4905 ac_cv_kpthread=no
4906else
4907# -Kpthread, if available, provides the right #defines
4908# and linker options to make pthread_create available
4909# Some compilers won't report that they do not support -Kpthread,
4910# so we need to run a program to see whether it really made the
4911# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4913echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004914if test "${ac_cv_kpthread+set}" = set; then
4915 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004916else
4917 ac_save_cc="$CC"
4918CC="$CC -Kpthread"
4919if test "$cross_compiling" = yes; then
4920 ac_cv_kpthread=no
4921else
Martin v. Löwis11437992002-04-12 09:54:03 +00004922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004923/* confdefs.h. */
4924_ACEOF
4925cat confdefs.h >>conftest.$ac_ext
4926cat >>conftest.$ac_ext <<_ACEOF
4927/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004928
4929#include <pthread.h>
4930
4931void* routine(void* p){return NULL;}
4932
4933int main(){
4934 pthread_t p;
4935 if(pthread_create(&p,NULL,routine,NULL)!=0)
4936 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004937 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004938 return 0;
4939}
4940
Martin v. Löwis11437992002-04-12 09:54:03 +00004941_ACEOF
4942rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004943if { (ac_try="$ac_link"
4944case "(($ac_try" in
4945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4946 *) ac_try_echo=$ac_try;;
4947esac
4948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4949 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 ac_status=$?
4951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4952 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004953 { (case "(($ac_try" in
4954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4955 *) ac_try_echo=$ac_try;;
4956esac
4957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4958 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004959 ac_status=$?
4960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4961 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004962 ac_cv_kpthread=yes
4963else
Martin v. Löwis11437992002-04-12 09:54:03 +00004964 echo "$as_me: program exited with status $ac_status" >&5
4965echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004966sed 's/^/| /' conftest.$ac_ext >&5
4967
Martin v. Löwis11437992002-04-12 09:54:03 +00004968( exit $ac_status )
4969ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004971rm -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 +00004972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004973
4974
Martin v. Löwis130fb172001-07-19 11:00:41 +00004975CC="$ac_save_cc"
4976fi
4977
Martin v. Löwiseba40652007-08-30 20:10:57 +00004978{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4979echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004980fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004981
Skip Montanarod8d39a02003-07-10 20:44:10 +00004982if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004983then
4984# -Kthread, if available, provides the right #defines
4985# and linker options to make pthread_create available
4986# Some compilers won't report that they do not support -Kthread,
4987# so we need to run a program to see whether it really made the
4988# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004989{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4990echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004991if test "${ac_cv_kthread+set}" = set; then
4992 echo $ECHO_N "(cached) $ECHO_C" >&6
4993else
4994 ac_save_cc="$CC"
4995CC="$CC -Kthread"
4996if test "$cross_compiling" = yes; then
4997 ac_cv_kthread=no
4998else
4999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005000/* confdefs.h. */
5001_ACEOF
5002cat confdefs.h >>conftest.$ac_ext
5003cat >>conftest.$ac_ext <<_ACEOF
5004/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005005
5006#include <pthread.h>
5007
5008void* routine(void* p){return NULL;}
5009
5010int main(){
5011 pthread_t p;
5012 if(pthread_create(&p,NULL,routine,NULL)!=0)
5013 return 1;
5014 (void)pthread_detach(p);
5015 return 0;
5016}
5017
5018_ACEOF
5019rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005020if { (ac_try="$ac_link"
5021case "(($ac_try" in
5022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5023 *) ac_try_echo=$ac_try;;
5024esac
5025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5026 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005027 ac_status=$?
5028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5029 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005030 { (case "(($ac_try" in
5031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5032 *) ac_try_echo=$ac_try;;
5033esac
5034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5035 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005036 ac_status=$?
5037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5038 (exit $ac_status); }; }; then
5039 ac_cv_kthread=yes
5040else
5041 echo "$as_me: program exited with status $ac_status" >&5
5042echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005043sed 's/^/| /' conftest.$ac_ext >&5
5044
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005045( exit $ac_status )
5046ac_cv_kthread=no
5047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005048rm -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 +00005049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005050
5051
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005052CC="$ac_save_cc"
5053fi
5054
Martin v. Löwiseba40652007-08-30 20:10:57 +00005055{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5056echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005057fi
5058
Skip Montanarod8d39a02003-07-10 20:44:10 +00005059if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005060then
5061# -pthread, if available, provides the right #defines
5062# and linker options to make pthread_create available
5063# Some compilers won't report that they do not support -pthread,
5064# so we need to run a program to see whether it really made the
5065# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005066{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5067echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005068if test "${ac_cv_thread+set}" = set; then
5069 echo $ECHO_N "(cached) $ECHO_C" >&6
5070else
5071 ac_save_cc="$CC"
5072CC="$CC -pthread"
5073if test "$cross_compiling" = yes; then
5074 ac_cv_pthread=no
5075else
5076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005077/* confdefs.h. */
5078_ACEOF
5079cat confdefs.h >>conftest.$ac_ext
5080cat >>conftest.$ac_ext <<_ACEOF
5081/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005082
5083#include <pthread.h>
5084
5085void* routine(void* p){return NULL;}
5086
5087int main(){
5088 pthread_t p;
5089 if(pthread_create(&p,NULL,routine,NULL)!=0)
5090 return 1;
5091 (void)pthread_detach(p);
5092 return 0;
5093}
5094
5095_ACEOF
5096rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005097if { (ac_try="$ac_link"
5098case "(($ac_try" in
5099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5100 *) ac_try_echo=$ac_try;;
5101esac
5102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5103 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005104 ac_status=$?
5105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5106 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005107 { (case "(($ac_try" in
5108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5109 *) ac_try_echo=$ac_try;;
5110esac
5111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5112 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005113 ac_status=$?
5114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5115 (exit $ac_status); }; }; then
5116 ac_cv_pthread=yes
5117else
5118 echo "$as_me: program exited with status $ac_status" >&5
5119echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005120sed 's/^/| /' conftest.$ac_ext >&5
5121
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005122( exit $ac_status )
5123ac_cv_pthread=no
5124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005125rm -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 +00005126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005127
5128
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005129CC="$ac_save_cc"
5130fi
5131
Martin v. Löwiseba40652007-08-30 20:10:57 +00005132{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5133echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005134fi
5135
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005136# If we have set a CC compiler flag for thread support then
5137# check if it works for CXX, too.
5138ac_cv_cxx_thread=no
5139if test ! -z "$CXX"
5140then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005141{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5142echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005143ac_save_cxx="$CXX"
5144
5145if test "$ac_cv_kpthread" = "yes"
5146then
5147 CXX="$CXX -Kpthread"
5148 ac_cv_cxx_thread=yes
5149elif test "$ac_cv_kthread" = "yes"
5150then
5151 CXX="$CXX -Kthread"
5152 ac_cv_cxx_thread=yes
5153elif test "$ac_cv_pthread" = "yes"
5154then
5155 CXX="$CXX -pthread"
5156 ac_cv_cxx_thread=yes
5157fi
5158
5159if test $ac_cv_cxx_thread = yes
5160then
5161 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5162 $CXX -c conftest.$ac_ext 2>&5
5163 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5164 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5165 then
5166 ac_cv_cxx_thread=yes
5167 else
5168 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005169 fi
5170 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005172{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5173echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005174fi
5175CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005176
Michael W. Hudson54241132001-12-07 15:38:26 +00005177
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005178# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005179{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5180echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005181if test "${ac_cv_header_stdc+set}" = set; then
5182 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005183else
Martin v. Löwis11437992002-04-12 09:54:03 +00005184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005185/* confdefs.h. */
5186_ACEOF
5187cat confdefs.h >>conftest.$ac_ext
5188cat >>conftest.$ac_ext <<_ACEOF
5189/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005190#include <stdlib.h>
5191#include <stdarg.h>
5192#include <string.h>
5193#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005194
Skip Montanaro6dead952003-09-25 14:50:04 +00005195int
5196main ()
5197{
5198
5199 ;
5200 return 0;
5201}
Martin v. Löwis11437992002-04-12 09:54:03 +00005202_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005203rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005204if { (ac_try="$ac_compile"
5205case "(($ac_try" in
5206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5207 *) ac_try_echo=$ac_try;;
5208esac
5209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005212 grep -v '^ *+' conftest.er1 >conftest.err
5213 rm -f conftest.er1
5214 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005216 (exit $ac_status); } && {
5217 test -z "$ac_c_werror_flag" ||
5218 test ! -s conftest.err
5219 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005220 ac_cv_header_stdc=yes
5221else
Martin v. Löwis11437992002-04-12 09:54:03 +00005222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005223sed 's/^/| /' conftest.$ac_ext >&5
5224
Martin v. Löwiseba40652007-08-30 20:10:57 +00005225 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005227
5228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005229
5230if test $ac_cv_header_stdc = yes; then
5231 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005232 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005233/* confdefs.h. */
5234_ACEOF
5235cat confdefs.h >>conftest.$ac_ext
5236cat >>conftest.$ac_ext <<_ACEOF
5237/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005238#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005239
5240_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005242 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005243 :
5244else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005245 ac_cv_header_stdc=no
5246fi
5247rm -f conftest*
5248
5249fi
5250
5251if test $ac_cv_header_stdc = yes; then
5252 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005254/* confdefs.h. */
5255_ACEOF
5256cat confdefs.h >>conftest.$ac_ext
5257cat >>conftest.$ac_ext <<_ACEOF
5258/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005259#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005260
5261_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005262if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005263 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005264 :
5265else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005266 ac_cv_header_stdc=no
5267fi
5268rm -f conftest*
5269
5270fi
5271
5272if test $ac_cv_header_stdc = yes; then
5273 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005274 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005275 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005276else
Martin v. Löwis11437992002-04-12 09:54:03 +00005277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005278/* confdefs.h. */
5279_ACEOF
5280cat confdefs.h >>conftest.$ac_ext
5281cat >>conftest.$ac_ext <<_ACEOF
5282/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005283#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005284#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005285#if ((' ' & 0x0FF) == 0x020)
5286# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5287# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5288#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005289# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005290 (('a' <= (c) && (c) <= 'i') \
5291 || ('j' <= (c) && (c) <= 'r') \
5292 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005293# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5294#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005295
Martin v. Löwis11437992002-04-12 09:54:03 +00005296#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5297int
5298main ()
5299{
5300 int i;
5301 for (i = 0; i < 256; i++)
5302 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005303 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005304 return 2;
5305 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005306}
5307_ACEOF
5308rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005309if { (ac_try="$ac_link"
5310case "(($ac_try" in
5311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5312 *) ac_try_echo=$ac_try;;
5313esac
5314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5315 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005316 ac_status=$?
5317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5318 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005319 { (case "(($ac_try" in
5320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5321 *) ac_try_echo=$ac_try;;
5322esac
5323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5324 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005325 ac_status=$?
5326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5327 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005328 :
5329else
Martin v. Löwis11437992002-04-12 09:54:03 +00005330 echo "$as_me: program exited with status $ac_status" >&5
5331echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005332sed 's/^/| /' conftest.$ac_ext >&5
5333
Martin v. Löwis11437992002-04-12 09:54:03 +00005334( exit $ac_status )
5335ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005337rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5338fi
5339
5340
Michael W. Hudson54241132001-12-07 15:38:26 +00005341fi
5342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005343{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5344echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005345if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005346
5347cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005348#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005349_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005350
5351fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005352
Skip Montanarob9820a32004-01-17 00:16:12 +00005353# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005364 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005365do
5366as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005367{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5368echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5369if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005370 echo $ECHO_N "(cached) $ECHO_C" >&6
5371else
5372 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005373/* confdefs.h. */
5374_ACEOF
5375cat confdefs.h >>conftest.$ac_ext
5376cat >>conftest.$ac_ext <<_ACEOF
5377/* end confdefs.h. */
5378$ac_includes_default
5379
5380#include <$ac_header>
5381_ACEOF
5382rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005383if { (ac_try="$ac_compile"
5384case "(($ac_try" in
5385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5386 *) ac_try_echo=$ac_try;;
5387esac
5388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5389 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005391 grep -v '^ *+' conftest.er1 >conftest.err
5392 rm -f conftest.er1
5393 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005395 (exit $ac_status); } && {
5396 test -z "$ac_c_werror_flag" ||
5397 test ! -s conftest.err
5398 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005399 eval "$as_ac_Header=yes"
5400else
5401 echo "$as_me: failed program was:" >&5
5402sed 's/^/| /' conftest.$ac_ext >&5
5403
Martin v. Löwiseba40652007-08-30 20:10:57 +00005404 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005406
5407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005409ac_res=`eval echo '${'$as_ac_Header'}'`
5410 { echo "$as_me:$LINENO: result: $ac_res" >&5
5411echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005412if test `eval echo '${'$as_ac_Header'}'` = yes; then
5413 cat >>confdefs.h <<_ACEOF
5414#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5415_ACEOF
5416
5417fi
5418
5419done
5420
5421
Martin v. Löwis11437992002-04-12 09:54:03 +00005422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
Anthony Baxter8a560de2004-10-13 15:30:56 +00005458
Martin v. Löwisc3001752005-01-23 09:27:24 +00005459
Martin v. Löwis11017b12006-01-14 18:12:57 +00005460
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005461
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005462
5463
5464
5465
5466
5467
5468
5469
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005470
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005471
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005472
5473
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005474
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005475for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5476fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005477ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005478shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005479unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005480sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5481sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005482sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5483sys/time.h \
5484sys/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 +00005485sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005486bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005487do
Martin v. Löwis11437992002-04-12 09:54:03 +00005488as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005489if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5490 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5491echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5492if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005493 echo $ECHO_N "(cached) $ECHO_C" >&6
5494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005495ac_res=`eval echo '${'$as_ac_Header'}'`
5496 { echo "$as_me:$LINENO: result: $ac_res" >&5
5497echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005498else
Martin v. Löwis11437992002-04-12 09:54:03 +00005499 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005500{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5501echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005502cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005503/* confdefs.h. */
5504_ACEOF
5505cat confdefs.h >>conftest.$ac_ext
5506cat >>conftest.$ac_ext <<_ACEOF
5507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005508$ac_includes_default
5509#include <$ac_header>
5510_ACEOF
5511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005512if { (ac_try="$ac_compile"
5513case "(($ac_try" in
5514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5515 *) ac_try_echo=$ac_try;;
5516esac
5517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005520 grep -v '^ *+' conftest.er1 >conftest.err
5521 rm -f conftest.er1
5522 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005524 (exit $ac_status); } && {
5525 test -z "$ac_c_werror_flag" ||
5526 test ! -s conftest.err
5527 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005528 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005529else
Martin v. Löwis11437992002-04-12 09:54:03 +00005530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005531sed 's/^/| /' conftest.$ac_ext >&5
5532
Martin v. Löwiseba40652007-08-30 20:10:57 +00005533 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005535
5536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5537{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5538echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005539
5540# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005541{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5542echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005544/* confdefs.h. */
5545_ACEOF
5546cat confdefs.h >>conftest.$ac_ext
5547cat >>conftest.$ac_ext <<_ACEOF
5548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005549#include <$ac_header>
5550_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005551if { (ac_try="$ac_cpp conftest.$ac_ext"
5552case "(($ac_try" in
5553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5554 *) ac_try_echo=$ac_try;;
5555esac
5556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5557 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005558 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005559 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005560 rm -f conftest.er1
5561 cat conftest.err >&5
5562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005563 (exit $ac_status); } >/dev/null && {
5564 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5565 test ! -s conftest.err
5566 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005567 ac_header_preproc=yes
5568else
5569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005570sed 's/^/| /' conftest.$ac_ext >&5
5571
Martin v. Löwis11437992002-04-12 09:54:03 +00005572 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005574
Martin v. Löwis11437992002-04-12 09:54:03 +00005575rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005576{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5577echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005578
5579# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005580case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5581 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005582 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5583echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005584 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5585echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5586 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005587 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005588 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005589 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5590echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005591 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5592echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5593 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5594echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5595 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5596echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005597 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5598echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005599 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5600echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005601 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005602## ------------------------------------------------ ##
5603## Report this to http://www.python.org/python-bugs ##
5604## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005605_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005606 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005607 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005608esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005609{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5610echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5611if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005612 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005613else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005614 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005616ac_res=`eval echo '${'$as_ac_Header'}'`
5617 { echo "$as_me:$LINENO: result: $ac_res" >&5
5618echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005619
5620fi
5621if test `eval echo '${'$as_ac_Header'}'` = yes; then
5622 cat >>confdefs.h <<_ACEOF
5623#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5624_ACEOF
5625
5626fi
5627
Guido van Rossum627b2d71993-12-24 10:39:16 +00005628done
5629
Martin v. Löwis11437992002-04-12 09:54:03 +00005630
5631
5632
5633
5634
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005635ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005636for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5637 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005638{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5639echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5640if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005641 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005642else
Martin v. Löwis11437992002-04-12 09:54:03 +00005643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005644/* confdefs.h. */
5645_ACEOF
5646cat confdefs.h >>conftest.$ac_ext
5647cat >>conftest.$ac_ext <<_ACEOF
5648/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005649#include <sys/types.h>
5650#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005651
Martin v. Löwis11437992002-04-12 09:54:03 +00005652int
5653main ()
5654{
5655if ((DIR *) 0)
5656return 0;
5657 ;
5658 return 0;
5659}
5660_ACEOF
5661rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005662if { (ac_try="$ac_compile"
5663case "(($ac_try" in
5664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5665 *) ac_try_echo=$ac_try;;
5666esac
5667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005670 grep -v '^ *+' conftest.er1 >conftest.err
5671 rm -f conftest.er1
5672 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005674 (exit $ac_status); } && {
5675 test -z "$ac_c_werror_flag" ||
5676 test ! -s conftest.err
5677 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005678 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005679else
Martin v. Löwis11437992002-04-12 09:54:03 +00005680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005681sed 's/^/| /' conftest.$ac_ext >&5
5682
Martin v. Löwiseba40652007-08-30 20:10:57 +00005683 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005685
5686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005688ac_res=`eval echo '${'$as_ac_Header'}'`
5689 { echo "$as_me:$LINENO: result: $ac_res" >&5
5690echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005691if test `eval echo '${'$as_ac_Header'}'` = yes; then
5692 cat >>confdefs.h <<_ACEOF
5693#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5694_ACEOF
5695
5696ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005697fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005698
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005699done
5700# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5701if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005702 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5703echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005704if test "${ac_cv_search_opendir+set}" = set; then
5705 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005706else
Martin v. Löwis11437992002-04-12 09:54:03 +00005707 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005708cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005709/* confdefs.h. */
5710_ACEOF
5711cat confdefs.h >>conftest.$ac_ext
5712cat >>conftest.$ac_ext <<_ACEOF
5713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005714
Martin v. Löwiseba40652007-08-30 20:10:57 +00005715/* Override any GCC internal prototype to avoid an error.
5716 Use char because int might match the return type of a GCC
5717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005718#ifdef __cplusplus
5719extern "C"
5720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005721char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005722int
5723main ()
5724{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005725return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005726 ;
5727 return 0;
5728}
5729_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005730for ac_lib in '' dir; do
5731 if test -z "$ac_lib"; then
5732 ac_res="none required"
5733 else
5734 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005735 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005736 fi
5737 rm -f conftest.$ac_objext conftest$ac_exeext
5738if { (ac_try="$ac_link"
5739case "(($ac_try" in
5740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5741 *) ac_try_echo=$ac_try;;
5742esac
5743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5744 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005745 ac_status=$?
5746 grep -v '^ *+' conftest.er1 >conftest.err
5747 rm -f conftest.er1
5748 cat conftest.err >&5
5749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005750 (exit $ac_status); } && {
5751 test -z "$ac_c_werror_flag" ||
5752 test ! -s conftest.err
5753 } && test -s conftest$ac_exeext &&
5754 $as_test_x conftest$ac_exeext; then
5755 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005756else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005757 echo "$as_me: failed program was:" >&5
5758sed 's/^/| /' conftest.$ac_ext >&5
5759
Martin v. Löwiseba40652007-08-30 20:10:57 +00005760
Brett Cannon19fab762007-06-02 03:02:29 +00005761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005762
5763rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5764 conftest$ac_exeext
5765 if test "${ac_cv_search_opendir+set}" = set; then
5766 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005768done
5769if test "${ac_cv_search_opendir+set}" = set; then
5770 :
5771else
5772 ac_cv_search_opendir=no
5773fi
5774rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005775LIBS=$ac_func_search_save_LIBS
5776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005777{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5778echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5779ac_res=$ac_cv_search_opendir
5780if test "$ac_res" != no; then
5781 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005782
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005783fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005784
Michael W. Hudson54241132001-12-07 15:38:26 +00005785else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005786 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5787echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005788if test "${ac_cv_search_opendir+set}" = set; then
5789 echo $ECHO_N "(cached) $ECHO_C" >&6
5790else
5791 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005792cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005793/* confdefs.h. */
5794_ACEOF
5795cat confdefs.h >>conftest.$ac_ext
5796cat >>conftest.$ac_ext <<_ACEOF
5797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005798
Martin v. Löwiseba40652007-08-30 20:10:57 +00005799/* Override any GCC internal prototype to avoid an error.
5800 Use char because int might match the return type of a GCC
5801 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005802#ifdef __cplusplus
5803extern "C"
5804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005805char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005806int
5807main ()
5808{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005809return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005810 ;
5811 return 0;
5812}
5813_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005814for ac_lib in '' x; do
5815 if test -z "$ac_lib"; then
5816 ac_res="none required"
5817 else
5818 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005819 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005820 fi
5821 rm -f conftest.$ac_objext conftest$ac_exeext
5822if { (ac_try="$ac_link"
5823case "(($ac_try" in
5824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5825 *) ac_try_echo=$ac_try;;
5826esac
5827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5828 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005829 ac_status=$?
5830 grep -v '^ *+' conftest.er1 >conftest.err
5831 rm -f conftest.er1
5832 cat conftest.err >&5
5833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005834 (exit $ac_status); } && {
5835 test -z "$ac_c_werror_flag" ||
5836 test ! -s conftest.err
5837 } && test -s conftest$ac_exeext &&
5838 $as_test_x conftest$ac_exeext; then
5839 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005840else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005841 echo "$as_me: failed program was:" >&5
5842sed 's/^/| /' conftest.$ac_ext >&5
5843
Martin v. Löwiseba40652007-08-30 20:10:57 +00005844
Brett Cannon19fab762007-06-02 03:02:29 +00005845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005846
5847rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5848 conftest$ac_exeext
5849 if test "${ac_cv_search_opendir+set}" = set; then
5850 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005852done
5853if test "${ac_cv_search_opendir+set}" = set; then
5854 :
5855else
5856 ac_cv_search_opendir=no
5857fi
5858rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005859LIBS=$ac_func_search_save_LIBS
5860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005861{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5862echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5863ac_res=$ac_cv_search_opendir
5864if test "$ac_res" != no; then
5865 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005866
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005867fi
5868
5869fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005870
Martin v. Löwiseba40652007-08-30 20:10:57 +00005871{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5872echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005873if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5874 echo $ECHO_N "(cached) $ECHO_C" >&6
5875else
5876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005877/* confdefs.h. */
5878_ACEOF
5879cat confdefs.h >>conftest.$ac_ext
5880cat >>conftest.$ac_ext <<_ACEOF
5881/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005882#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005883int
5884main ()
5885{
5886return makedev(0, 0);
5887 ;
5888 return 0;
5889}
5890_ACEOF
5891rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005892if { (ac_try="$ac_link"
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_link") 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_exeext &&
5908 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005909 ac_cv_header_sys_types_h_makedev=yes
5910else
5911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005912sed 's/^/| /' conftest.$ac_ext >&5
5913
Martin v. Löwiseba40652007-08-30 20:10:57 +00005914 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005916
5917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005919
5920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005921{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5922echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005923
5924if test $ac_cv_header_sys_types_h_makedev = no; then
5925if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005926 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5927echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005928if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5929 echo $ECHO_N "(cached) $ECHO_C" >&6
5930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005931{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5932echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005933else
5934 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005935{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5936echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005937cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005938/* confdefs.h. */
5939_ACEOF
5940cat confdefs.h >>conftest.$ac_ext
5941cat >>conftest.$ac_ext <<_ACEOF
5942/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005943$ac_includes_default
5944#include <sys/mkdev.h>
5945_ACEOF
5946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005947if { (ac_try="$ac_compile"
5948case "(($ac_try" in
5949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5950 *) ac_try_echo=$ac_try;;
5951esac
5952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005955 grep -v '^ *+' conftest.er1 >conftest.err
5956 rm -f conftest.er1
5957 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005959 (exit $ac_status); } && {
5960 test -z "$ac_c_werror_flag" ||
5961 test ! -s conftest.err
5962 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005963 ac_header_compiler=yes
5964else
5965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005966sed 's/^/| /' conftest.$ac_ext >&5
5967
Martin v. Löwiseba40652007-08-30 20:10:57 +00005968 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005970
5971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5972{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5973echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005974
5975# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005976{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5977echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005979/* confdefs.h. */
5980_ACEOF
5981cat confdefs.h >>conftest.$ac_ext
5982cat >>conftest.$ac_ext <<_ACEOF
5983/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005984#include <sys/mkdev.h>
5985_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005986if { (ac_try="$ac_cpp conftest.$ac_ext"
5987case "(($ac_try" in
5988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5989 *) ac_try_echo=$ac_try;;
5990esac
5991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5992 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005993 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005994 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005995 rm -f conftest.er1
5996 cat conftest.err >&5
5997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005998 (exit $ac_status); } >/dev/null && {
5999 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6000 test ! -s conftest.err
6001 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006002 ac_header_preproc=yes
6003else
6004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006005sed 's/^/| /' conftest.$ac_ext >&5
6006
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006007 ac_header_preproc=no
6008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006010rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006011{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6012echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013
6014# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006015case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6016 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006017 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6018echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006019 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6020echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6021 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006022 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006023 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006024 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6025echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006026 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6027echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6028 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6029echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6030 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6031echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006032 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6033echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006034 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6035echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006036 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006037## ------------------------------------------------ ##
6038## Report this to http://www.python.org/python-bugs ##
6039## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006040_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006041 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006042 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006043esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006044{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6045echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006046if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6047 echo $ECHO_N "(cached) $ECHO_C" >&6
6048else
6049 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006051{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6052echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053
6054fi
6055if test $ac_cv_header_sys_mkdev_h = yes; then
6056
6057cat >>confdefs.h <<\_ACEOF
6058#define MAJOR_IN_MKDEV 1
6059_ACEOF
6060
6061fi
6062
6063
6064
6065 if test $ac_cv_header_sys_mkdev_h = no; then
6066 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006067 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6068echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006069if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6070 echo $ECHO_N "(cached) $ECHO_C" >&6
6071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006072{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6073echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074else
6075 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006076{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6077echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006078cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006079/* confdefs.h. */
6080_ACEOF
6081cat confdefs.h >>conftest.$ac_ext
6082cat >>conftest.$ac_ext <<_ACEOF
6083/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084$ac_includes_default
6085#include <sys/sysmacros.h>
6086_ACEOF
6087rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006088if { (ac_try="$ac_compile"
6089case "(($ac_try" in
6090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6091 *) ac_try_echo=$ac_try;;
6092esac
6093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6094 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006096 grep -v '^ *+' conftest.er1 >conftest.err
6097 rm -f conftest.er1
6098 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006100 (exit $ac_status); } && {
6101 test -z "$ac_c_werror_flag" ||
6102 test ! -s conftest.err
6103 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104 ac_header_compiler=yes
6105else
6106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006107sed 's/^/| /' conftest.$ac_ext >&5
6108
Martin v. Löwiseba40652007-08-30 20:10:57 +00006109 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006111
6112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6113{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6114echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006115
6116# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006117{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6118echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006120/* confdefs.h. */
6121_ACEOF
6122cat confdefs.h >>conftest.$ac_ext
6123cat >>conftest.$ac_ext <<_ACEOF
6124/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006125#include <sys/sysmacros.h>
6126_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006127if { (ac_try="$ac_cpp conftest.$ac_ext"
6128case "(($ac_try" in
6129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6130 *) ac_try_echo=$ac_try;;
6131esac
6132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6133 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006135 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006136 rm -f conftest.er1
6137 cat conftest.err >&5
6138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006139 (exit $ac_status); } >/dev/null && {
6140 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6141 test ! -s conftest.err
6142 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143 ac_header_preproc=yes
6144else
6145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006146sed 's/^/| /' conftest.$ac_ext >&5
6147
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148 ac_header_preproc=no
6149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006150
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006152{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6153echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006154
6155# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006156case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6157 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6159echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006160 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6161echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6162 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006163 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006164 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006165 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6166echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006167 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6168echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6169 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6170echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6171 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6172echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006173 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6174echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006175 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6176echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006177 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006178## ------------------------------------------------ ##
6179## Report this to http://www.python.org/python-bugs ##
6180## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006181_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006182 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006183 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006185{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6186echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006187if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6188 echo $ECHO_N "(cached) $ECHO_C" >&6
6189else
6190 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006192{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6193echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194
6195fi
6196if test $ac_cv_header_sys_sysmacros_h = yes; then
6197
6198cat >>confdefs.h <<\_ACEOF
6199#define MAJOR_IN_SYSMACROS 1
6200_ACEOF
6201
6202fi
6203
6204
6205 fi
6206fi
6207
Michael W. Hudson54241132001-12-07 15:38:26 +00006208
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006209# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006210
6211for ac_header in term.h
6212do
6213as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006214{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6215echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6216if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006217 echo $ECHO_N "(cached) $ECHO_C" >&6
6218else
6219 cat >conftest.$ac_ext <<_ACEOF
6220/* confdefs.h. */
6221_ACEOF
6222cat confdefs.h >>conftest.$ac_ext
6223cat >>conftest.$ac_ext <<_ACEOF
6224/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006225
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006226#ifdef HAVE_CURSES_H
6227#include <curses.h>
6228#endif
6229
6230
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006231#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006232_ACEOF
6233rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006234if { (ac_try="$ac_compile"
6235case "(($ac_try" in
6236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6237 *) ac_try_echo=$ac_try;;
6238esac
6239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6240 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006241 ac_status=$?
6242 grep -v '^ *+' conftest.er1 >conftest.err
6243 rm -f conftest.er1
6244 cat conftest.err >&5
6245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006246 (exit $ac_status); } && {
6247 test -z "$ac_c_werror_flag" ||
6248 test ! -s conftest.err
6249 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006250 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006251else
6252 echo "$as_me: failed program was:" >&5
6253sed 's/^/| /' conftest.$ac_ext >&5
6254
Martin v. Löwiseba40652007-08-30 20:10:57 +00006255 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006257
6258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006260ac_res=`eval echo '${'$as_ac_Header'}'`
6261 { echo "$as_me:$LINENO: result: $ac_res" >&5
6262echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006263if test `eval echo '${'$as_ac_Header'}'` = yes; then
6264 cat >>confdefs.h <<_ACEOF
6265#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6266_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006267
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006268fi
6269
6270done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006271
6272
Martin v. Löwis11017b12006-01-14 18:12:57 +00006273# On Linux, netlink.h requires asm/types.h
6274
6275for ac_header in linux/netlink.h
6276do
6277as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006278{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6279echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6280if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006281 echo $ECHO_N "(cached) $ECHO_C" >&6
6282else
6283 cat >conftest.$ac_ext <<_ACEOF
6284/* confdefs.h. */
6285_ACEOF
6286cat confdefs.h >>conftest.$ac_ext
6287cat >>conftest.$ac_ext <<_ACEOF
6288/* end confdefs.h. */
6289
6290#ifdef HAVE_ASM_TYPES_H
6291#include <asm/types.h>
6292#endif
6293#ifdef HAVE_SYS_SOCKET_H
6294#include <sys/socket.h>
6295#endif
6296
6297
6298#include <$ac_header>
6299_ACEOF
6300rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006301if { (ac_try="$ac_compile"
6302case "(($ac_try" in
6303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6304 *) ac_try_echo=$ac_try;;
6305esac
6306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6307 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006308 ac_status=$?
6309 grep -v '^ *+' conftest.er1 >conftest.err
6310 rm -f conftest.er1
6311 cat conftest.err >&5
6312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006313 (exit $ac_status); } && {
6314 test -z "$ac_c_werror_flag" ||
6315 test ! -s conftest.err
6316 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006317 eval "$as_ac_Header=yes"
6318else
6319 echo "$as_me: failed program was:" >&5
6320sed 's/^/| /' conftest.$ac_ext >&5
6321
Martin v. Löwiseba40652007-08-30 20:10:57 +00006322 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006324
6325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006327ac_res=`eval echo '${'$as_ac_Header'}'`
6328 { echo "$as_me:$LINENO: result: $ac_res" >&5
6329echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006330if test `eval echo '${'$as_ac_Header'}'` = yes; then
6331 cat >>confdefs.h <<_ACEOF
6332#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6333_ACEOF
6334
6335fi
6336
6337done
6338
6339
Guido van Rossum627b2d71993-12-24 10:39:16 +00006340# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006341was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006342{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6343echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006344cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006345/* confdefs.h. */
6346_ACEOF
6347cat confdefs.h >>conftest.$ac_ext
6348cat >>conftest.$ac_ext <<_ACEOF
6349/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006350#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006351
6352_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006354 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006355 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006356else
Martin v. Löwis11437992002-04-12 09:54:03 +00006357
6358
6359cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006360#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006361_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006362
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006363
Guido van Rossum627b2d71993-12-24 10:39:16 +00006364fi
6365rm -f conftest*
6366
Martin v. Löwiseba40652007-08-30 20:10:57 +00006367{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6368echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006369
Neal Norwitz11690112002-07-30 01:08:28 +00006370# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006371{ echo "$as_me:$LINENO: checking for makedev" >&5
6372echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006374/* confdefs.h. */
6375_ACEOF
6376cat confdefs.h >>conftest.$ac_ext
6377cat >>conftest.$ac_ext <<_ACEOF
6378/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006379#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006380int
6381main ()
6382{
6383 makedev(0, 0)
6384 ;
6385 return 0;
6386}
6387_ACEOF
6388rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006389if { (ac_try="$ac_link"
6390case "(($ac_try" in
6391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6392 *) ac_try_echo=$ac_try;;
6393esac
6394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6395 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006397 grep -v '^ *+' conftest.er1 >conftest.err
6398 rm -f conftest.er1
6399 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006401 (exit $ac_status); } && {
6402 test -z "$ac_c_werror_flag" ||
6403 test ! -s conftest.err
6404 } && test -s conftest$ac_exeext &&
6405 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006406 ac_cv_has_makedev=yes
6407else
6408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006409sed 's/^/| /' conftest.$ac_ext >&5
6410
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006413
6414rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006415 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006416if test "$ac_cv_has_makedev" = "no"; then
6417 # we didn't link, try if _OSF_SOURCE will allow us to link
6418 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006419/* confdefs.h. */
6420_ACEOF
6421cat confdefs.h >>conftest.$ac_ext
6422cat >>conftest.$ac_ext <<_ACEOF
6423/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006424
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006425#define _OSF_SOURCE 1
6426#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006427
Neal Norwitz11690112002-07-30 01:08:28 +00006428int
6429main ()
6430{
6431 makedev(0, 0)
6432 ;
6433 return 0;
6434}
6435_ACEOF
6436rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006437if { (ac_try="$ac_link"
6438case "(($ac_try" in
6439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6440 *) ac_try_echo=$ac_try;;
6441esac
6442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6443 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006445 grep -v '^ *+' conftest.er1 >conftest.err
6446 rm -f conftest.er1
6447 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006449 (exit $ac_status); } && {
6450 test -z "$ac_c_werror_flag" ||
6451 test ! -s conftest.err
6452 } && test -s conftest$ac_exeext &&
6453 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006454 ac_cv_has_makedev=yes
6455else
6456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006457sed 's/^/| /' conftest.$ac_ext >&5
6458
Martin v. Löwiseba40652007-08-30 20:10:57 +00006459 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006461
6462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006463 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006464 if test "$ac_cv_has_makedev" = "yes"; then
6465
6466cat >>confdefs.h <<\_ACEOF
6467#define _OSF_SOURCE 1
6468_ACEOF
6469
6470 fi
6471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006472{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6473echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006474if test "$ac_cv_has_makedev" = "yes"; then
6475
6476cat >>confdefs.h <<\_ACEOF
6477#define HAVE_MAKEDEV 1
6478_ACEOF
6479
6480fi
6481
Martin v. Löwis399a6892002-10-04 10:22:02 +00006482# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6483# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6484# defined, but the compiler does not support pragma redefine_extname,
6485# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6486# structures (such as rlimit64) without declaring them. As a
6487# work-around, disable LFS on such configurations
6488
6489use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006490{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6491echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006492cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006493/* confdefs.h. */
6494_ACEOF
6495cat confdefs.h >>conftest.$ac_ext
6496cat >>conftest.$ac_ext <<_ACEOF
6497/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006498
6499#define _LARGEFILE_SOURCE 1
6500#define _FILE_OFFSET_BITS 64
6501#include <sys/resource.h>
6502
Martin v. Löwis399a6892002-10-04 10:22:02 +00006503int
6504main ()
6505{
6506struct rlimit foo;
6507 ;
6508 return 0;
6509}
6510_ACEOF
6511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006512if { (ac_try="$ac_compile"
6513case "(($ac_try" in
6514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6515 *) ac_try_echo=$ac_try;;
6516esac
6517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006520 grep -v '^ *+' conftest.er1 >conftest.err
6521 rm -f conftest.er1
6522 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006524 (exit $ac_status); } && {
6525 test -z "$ac_c_werror_flag" ||
6526 test ! -s conftest.err
6527 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006528 sol_lfs_bug=no
6529else
6530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006531sed 's/^/| /' conftest.$ac_ext >&5
6532
Martin v. Löwiseba40652007-08-30 20:10:57 +00006533 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006535
6536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6537{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6538echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006539if test "$sol_lfs_bug" = "yes"; then
6540 use_lfs=no
6541fi
6542
6543if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006544# Two defines needed to enable largefile support on various platforms
6545# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006546
Martin v. Löwis11437992002-04-12 09:54:03 +00006547cat >>confdefs.h <<\_ACEOF
6548#define _LARGEFILE_SOURCE 1
6549_ACEOF
6550
6551
6552cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006553#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006554_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006555
Martin v. Löwis399a6892002-10-04 10:22:02 +00006556fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006557
Guido van Rossum84e7b241996-08-19 21:59:00 +00006558# Add some code to confdefs.h so that the test for off_t works on SCO
6559cat >> confdefs.h <<\EOF
6560#if defined(SCO_DS)
6561#undef _OFF_T
6562#endif
6563EOF
6564
Guido van Rossumef2255b2000-03-10 22:30:29 +00006565# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566{ echo "$as_me:$LINENO: checking for mode_t" >&5
6567echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006568if test "${ac_cv_type_mode_t+set}" = set; then
6569 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006570else
Martin v. Löwis11437992002-04-12 09:54:03 +00006571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006572/* confdefs.h. */
6573_ACEOF
6574cat confdefs.h >>conftest.$ac_ext
6575cat >>conftest.$ac_ext <<_ACEOF
6576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006577$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006578typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006579int
6580main ()
6581{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006582if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006583 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006584if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006585 return 0;
6586 ;
6587 return 0;
6588}
6589_ACEOF
6590rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006591if { (ac_try="$ac_compile"
6592case "(($ac_try" in
6593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6594 *) ac_try_echo=$ac_try;;
6595esac
6596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006599 grep -v '^ *+' conftest.er1 >conftest.err
6600 rm -f conftest.er1
6601 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006603 (exit $ac_status); } && {
6604 test -z "$ac_c_werror_flag" ||
6605 test ! -s conftest.err
6606 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006607 ac_cv_type_mode_t=yes
6608else
Martin v. Löwis11437992002-04-12 09:54:03 +00006609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006610sed 's/^/| /' conftest.$ac_ext >&5
6611
Martin v. Löwiseba40652007-08-30 20:10:57 +00006612 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006614
6615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006617{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6618echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006619if test $ac_cv_type_mode_t = yes; then
6620 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006621else
Martin v. Löwis11437992002-04-12 09:54:03 +00006622
6623cat >>confdefs.h <<_ACEOF
6624#define mode_t int
6625_ACEOF
6626
6627fi
6628
Martin v. Löwiseba40652007-08-30 20:10:57 +00006629{ echo "$as_me:$LINENO: checking for off_t" >&5
6630echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006631if test "${ac_cv_type_off_t+set}" = set; then
6632 echo $ECHO_N "(cached) $ECHO_C" >&6
6633else
6634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006635/* confdefs.h. */
6636_ACEOF
6637cat confdefs.h >>conftest.$ac_ext
6638cat >>conftest.$ac_ext <<_ACEOF
6639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006640$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006641typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006642int
6643main ()
6644{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006645if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006646 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006647if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006648 return 0;
6649 ;
6650 return 0;
6651}
6652_ACEOF
6653rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006654if { (ac_try="$ac_compile"
6655case "(($ac_try" in
6656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6657 *) ac_try_echo=$ac_try;;
6658esac
6659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6660 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006662 grep -v '^ *+' conftest.er1 >conftest.err
6663 rm -f conftest.er1
6664 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006666 (exit $ac_status); } && {
6667 test -z "$ac_c_werror_flag" ||
6668 test ! -s conftest.err
6669 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006670 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006671else
Martin v. Löwis11437992002-04-12 09:54:03 +00006672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006673sed 's/^/| /' conftest.$ac_ext >&5
6674
Martin v. Löwiseba40652007-08-30 20:10:57 +00006675 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006677
6678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006680{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6681echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006682if test $ac_cv_type_off_t = yes; then
6683 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006684else
Martin v. Löwis11437992002-04-12 09:54:03 +00006685
6686cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006688_ACEOF
6689
6690fi
6691
Martin v. Löwiseba40652007-08-30 20:10:57 +00006692{ echo "$as_me:$LINENO: checking for pid_t" >&5
6693echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006694if test "${ac_cv_type_pid_t+set}" = set; then
6695 echo $ECHO_N "(cached) $ECHO_C" >&6
6696else
6697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006698/* confdefs.h. */
6699_ACEOF
6700cat confdefs.h >>conftest.$ac_ext
6701cat >>conftest.$ac_ext <<_ACEOF
6702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006703$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006704typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006705int
6706main ()
6707{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006708if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006709 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006710if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006711 return 0;
6712 ;
6713 return 0;
6714}
6715_ACEOF
6716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006717if { (ac_try="$ac_compile"
6718case "(($ac_try" in
6719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6720 *) ac_try_echo=$ac_try;;
6721esac
6722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006725 grep -v '^ *+' conftest.er1 >conftest.err
6726 rm -f conftest.er1
6727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006729 (exit $ac_status); } && {
6730 test -z "$ac_c_werror_flag" ||
6731 test ! -s conftest.err
6732 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006733 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006734else
Martin v. Löwis11437992002-04-12 09:54:03 +00006735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006736sed 's/^/| /' conftest.$ac_ext >&5
6737
Martin v. Löwiseba40652007-08-30 20:10:57 +00006738 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006740
6741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006743{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6744echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006745if test $ac_cv_type_pid_t = yes; then
6746 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006747else
Martin v. Löwis11437992002-04-12 09:54:03 +00006748
6749cat >>confdefs.h <<_ACEOF
6750#define pid_t int
6751_ACEOF
6752
6753fi
6754
Martin v. Löwiseba40652007-08-30 20:10:57 +00006755{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6756echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006757if test "${ac_cv_type_signal+set}" = set; then
6758 echo $ECHO_N "(cached) $ECHO_C" >&6
6759else
6760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006761/* confdefs.h. */
6762_ACEOF
6763cat confdefs.h >>conftest.$ac_ext
6764cat >>conftest.$ac_ext <<_ACEOF
6765/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006766#include <sys/types.h>
6767#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006768
Martin v. Löwis11437992002-04-12 09:54:03 +00006769int
6770main ()
6771{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006772return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006773 ;
6774 return 0;
6775}
6776_ACEOF
6777rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006778if { (ac_try="$ac_compile"
6779case "(($ac_try" in
6780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6781 *) ac_try_echo=$ac_try;;
6782esac
6783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6784 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006785 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006786 grep -v '^ *+' conftest.er1 >conftest.err
6787 rm -f conftest.er1
6788 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006790 (exit $ac_status); } && {
6791 test -z "$ac_c_werror_flag" ||
6792 test ! -s conftest.err
6793 } && test -s conftest.$ac_objext; then
6794 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006795else
Martin v. Löwis11437992002-04-12 09:54:03 +00006796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006797sed 's/^/| /' conftest.$ac_ext >&5
6798
Martin v. Löwiseba40652007-08-30 20:10:57 +00006799 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006801
6802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006804{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6805echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006806
Martin v. Löwis11437992002-04-12 09:54:03 +00006807cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006808#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006809_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006810
Michael W. Hudson54241132001-12-07 15:38:26 +00006811
Martin v. Löwiseba40652007-08-30 20:10:57 +00006812{ echo "$as_me:$LINENO: checking for size_t" >&5
6813echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006814if test "${ac_cv_type_size_t+set}" = set; then
6815 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006816else
Martin v. Löwis11437992002-04-12 09:54:03 +00006817 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006818/* confdefs.h. */
6819_ACEOF
6820cat confdefs.h >>conftest.$ac_ext
6821cat >>conftest.$ac_ext <<_ACEOF
6822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006823$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006824typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006825int
6826main ()
6827{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006828if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006829 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006830if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006831 return 0;
6832 ;
6833 return 0;
6834}
6835_ACEOF
6836rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006837if { (ac_try="$ac_compile"
6838case "(($ac_try" in
6839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6840 *) ac_try_echo=$ac_try;;
6841esac
6842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006845 grep -v '^ *+' conftest.er1 >conftest.err
6846 rm -f conftest.er1
6847 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006849 (exit $ac_status); } && {
6850 test -z "$ac_c_werror_flag" ||
6851 test ! -s conftest.err
6852 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006853 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006854else
Martin v. Löwis11437992002-04-12 09:54:03 +00006855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006856sed 's/^/| /' conftest.$ac_ext >&5
6857
Martin v. Löwiseba40652007-08-30 20:10:57 +00006858 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006860
6861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006863{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6864echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006865if test $ac_cv_type_size_t = yes; then
6866 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006867else
Martin v. Löwis11437992002-04-12 09:54:03 +00006868
6869cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006870#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006871_ACEOF
6872
6873fi
6874
Martin v. Löwiseba40652007-08-30 20:10:57 +00006875{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6876echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006877if test "${ac_cv_type_uid_t+set}" = set; then
6878 echo $ECHO_N "(cached) $ECHO_C" >&6
6879else
6880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006881/* confdefs.h. */
6882_ACEOF
6883cat confdefs.h >>conftest.$ac_ext
6884cat >>conftest.$ac_ext <<_ACEOF
6885/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006886#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006887
6888_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006890 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006891 ac_cv_type_uid_t=yes
6892else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006893 ac_cv_type_uid_t=no
6894fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006895rm -f conftest*
6896
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006898{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6899echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006900if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006901
Martin v. Löwis11437992002-04-12 09:54:03 +00006902cat >>confdefs.h <<\_ACEOF
6903#define uid_t int
6904_ACEOF
6905
6906
6907cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006908#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006909_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910
6911fi
6912
Martin v. Löwiseba40652007-08-30 20:10:57 +00006913{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6914echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006915if test "${ac_cv_type_ssize_t+set}" = set; then
6916 echo $ECHO_N "(cached) $ECHO_C" >&6
6917else
6918 cat >conftest.$ac_ext <<_ACEOF
6919/* confdefs.h. */
6920_ACEOF
6921cat confdefs.h >>conftest.$ac_ext
6922cat >>conftest.$ac_ext <<_ACEOF
6923/* end confdefs.h. */
6924$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006925typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006926int
6927main ()
6928{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006929if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006930 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006931if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006932 return 0;
6933 ;
6934 return 0;
6935}
6936_ACEOF
6937rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938if { (ac_try="$ac_compile"
6939case "(($ac_try" in
6940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6941 *) ac_try_echo=$ac_try;;
6942esac
6943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006945 ac_status=$?
6946 grep -v '^ *+' conftest.er1 >conftest.err
6947 rm -f conftest.er1
6948 cat conftest.err >&5
6949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006950 (exit $ac_status); } && {
6951 test -z "$ac_c_werror_flag" ||
6952 test ! -s conftest.err
6953 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006954 ac_cv_type_ssize_t=yes
6955else
6956 echo "$as_me: failed program was:" >&5
6957sed 's/^/| /' conftest.$ac_ext >&5
6958
Martin v. Löwiseba40652007-08-30 20:10:57 +00006959 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006961
6962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006964{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6965echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006966if test $ac_cv_type_ssize_t = yes; then
6967
6968cat >>confdefs.h <<\_ACEOF
6969#define HAVE_SSIZE_T 1
6970_ACEOF
6971
6972fi
6973
Jack Jansendd19cf82001-12-06 22:36:17 +00006974
Michael W. Hudson54241132001-12-07 15:38:26 +00006975# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006976# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006977{ echo "$as_me:$LINENO: checking for int" >&5
6978echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006979if test "${ac_cv_type_int+set}" = set; then
6980 echo $ECHO_N "(cached) $ECHO_C" >&6
6981else
6982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006983/* confdefs.h. */
6984_ACEOF
6985cat confdefs.h >>conftest.$ac_ext
6986cat >>conftest.$ac_ext <<_ACEOF
6987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006988$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006989typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006990int
6991main ()
6992{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006993if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006994 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006995if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006996 return 0;
6997 ;
6998 return 0;
6999}
7000_ACEOF
7001rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007002if { (ac_try="$ac_compile"
7003case "(($ac_try" in
7004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7005 *) ac_try_echo=$ac_try;;
7006esac
7007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007010 grep -v '^ *+' conftest.er1 >conftest.err
7011 rm -f conftest.er1
7012 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007014 (exit $ac_status); } && {
7015 test -z "$ac_c_werror_flag" ||
7016 test ! -s conftest.err
7017 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007018 ac_cv_type_int=yes
7019else
7020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007021sed 's/^/| /' conftest.$ac_ext >&5
7022
Martin v. Löwiseba40652007-08-30 20:10:57 +00007023 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007024fi
Brett Cannon19fab762007-06-02 03:02:29 +00007025
Martin v. Löwiseba40652007-08-30 20:10:57 +00007026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7027fi
7028{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7029echo "${ECHO_T}$ac_cv_type_int" >&6; }
7030
7031# The cast to long int works around a bug in the HP C Compiler
7032# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7033# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7034# This bug is HP SR number 8606223364.
7035{ echo "$as_me:$LINENO: checking size of int" >&5
7036echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007037if test "${ac_cv_sizeof_int+set}" = set; then
7038 echo $ECHO_N "(cached) $ECHO_C" >&6
7039else
Martin v. Löwis11437992002-04-12 09:54:03 +00007040 if test "$cross_compiling" = yes; then
7041 # Depending upon the size, compute the lo and hi bounds.
7042cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007043/* confdefs.h. */
7044_ACEOF
7045cat confdefs.h >>conftest.$ac_ext
7046cat >>conftest.$ac_ext <<_ACEOF
7047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007048$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007049 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007050int
7051main ()
7052{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007053static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007054test_array [0] = 0
7055
7056 ;
7057 return 0;
7058}
7059_ACEOF
7060rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007061if { (ac_try="$ac_compile"
7062case "(($ac_try" in
7063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7064 *) ac_try_echo=$ac_try;;
7065esac
7066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007069 grep -v '^ *+' conftest.er1 >conftest.err
7070 rm -f conftest.er1
7071 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007073 (exit $ac_status); } && {
7074 test -z "$ac_c_werror_flag" ||
7075 test ! -s conftest.err
7076 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007077 ac_lo=0 ac_mid=0
7078 while :; do
7079 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007080/* confdefs.h. */
7081_ACEOF
7082cat confdefs.h >>conftest.$ac_ext
7083cat >>conftest.$ac_ext <<_ACEOF
7084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007085$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007086 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007087int
7088main ()
7089{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007090static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007091test_array [0] = 0
7092
7093 ;
7094 return 0;
7095}
7096_ACEOF
7097rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007098if { (ac_try="$ac_compile"
7099case "(($ac_try" in
7100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7101 *) ac_try_echo=$ac_try;;
7102esac
7103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007106 grep -v '^ *+' conftest.er1 >conftest.err
7107 rm -f conftest.er1
7108 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007110 (exit $ac_status); } && {
7111 test -z "$ac_c_werror_flag" ||
7112 test ! -s conftest.err
7113 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007114 ac_hi=$ac_mid; break
7115else
7116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007117sed 's/^/| /' conftest.$ac_ext >&5
7118
Martin v. Löwiseba40652007-08-30 20:10:57 +00007119 ac_lo=`expr $ac_mid + 1`
7120 if test $ac_lo -le $ac_mid; then
7121 ac_lo= ac_hi=
7122 break
7123 fi
7124 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007126
7127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007128 done
7129else
7130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007131sed 's/^/| /' conftest.$ac_ext >&5
7132
Martin v. Löwiseba40652007-08-30 20:10:57 +00007133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007134/* confdefs.h. */
7135_ACEOF
7136cat confdefs.h >>conftest.$ac_ext
7137cat >>conftest.$ac_ext <<_ACEOF
7138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007139$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007140 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007141int
7142main ()
7143{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007144static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007145test_array [0] = 0
7146
7147 ;
7148 return 0;
7149}
7150_ACEOF
7151rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007152if { (ac_try="$ac_compile"
7153case "(($ac_try" in
7154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7155 *) ac_try_echo=$ac_try;;
7156esac
7157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007160 grep -v '^ *+' conftest.er1 >conftest.err
7161 rm -f conftest.er1
7162 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007164 (exit $ac_status); } && {
7165 test -z "$ac_c_werror_flag" ||
7166 test ! -s conftest.err
7167 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007168 ac_hi=-1 ac_mid=-1
7169 while :; do
7170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007171/* confdefs.h. */
7172_ACEOF
7173cat confdefs.h >>conftest.$ac_ext
7174cat >>conftest.$ac_ext <<_ACEOF
7175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007176$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007177 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007178int
7179main ()
7180{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007181static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007182test_array [0] = 0
7183
7184 ;
7185 return 0;
7186}
7187_ACEOF
7188rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007189if { (ac_try="$ac_compile"
7190case "(($ac_try" in
7191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7192 *) ac_try_echo=$ac_try;;
7193esac
7194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007197 grep -v '^ *+' conftest.er1 >conftest.err
7198 rm -f conftest.er1
7199 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007201 (exit $ac_status); } && {
7202 test -z "$ac_c_werror_flag" ||
7203 test ! -s conftest.err
7204 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007205 ac_lo=$ac_mid; break
7206else
7207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007208sed 's/^/| /' conftest.$ac_ext >&5
7209
Martin v. Löwiseba40652007-08-30 20:10:57 +00007210 ac_hi=`expr '(' $ac_mid ')' - 1`
7211 if test $ac_mid -le $ac_hi; then
7212 ac_lo= ac_hi=
7213 break
7214 fi
7215 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007217
7218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007219 done
7220else
7221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007222sed 's/^/| /' conftest.$ac_ext >&5
7223
Martin v. Löwiseba40652007-08-30 20:10:57 +00007224 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007226
7227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007229
7230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007231# Binary search between lo and hi bounds.
7232while test "x$ac_lo" != "x$ac_hi"; do
7233 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7234 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007235/* confdefs.h. */
7236_ACEOF
7237cat confdefs.h >>conftest.$ac_ext
7238cat >>conftest.$ac_ext <<_ACEOF
7239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007240$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007241 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007242int
7243main ()
7244{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007245static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007246test_array [0] = 0
7247
7248 ;
7249 return 0;
7250}
7251_ACEOF
7252rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007253if { (ac_try="$ac_compile"
7254case "(($ac_try" in
7255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7256 *) ac_try_echo=$ac_try;;
7257esac
7258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007261 grep -v '^ *+' conftest.er1 >conftest.err
7262 rm -f conftest.er1
7263 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007265 (exit $ac_status); } && {
7266 test -z "$ac_c_werror_flag" ||
7267 test ! -s conftest.err
7268 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007269 ac_hi=$ac_mid
7270else
7271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007272sed 's/^/| /' conftest.$ac_ext >&5
7273
Martin v. Löwiseba40652007-08-30 20:10:57 +00007274 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007276
7277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007278done
7279case $ac_lo in
7280?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007281'') if test "$ac_cv_type_int" = yes; then
7282 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007283See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007284echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007285See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007286 { (exit 77); exit 77; }; }
7287 else
7288 ac_cv_sizeof_int=0
7289 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007290esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007291else
Martin v. Löwis11437992002-04-12 09:54:03 +00007292 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007293/* confdefs.h. */
7294_ACEOF
7295cat confdefs.h >>conftest.$ac_ext
7296cat >>conftest.$ac_ext <<_ACEOF
7297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007298$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007299 typedef int ac__type_sizeof_;
7300static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7301static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007302#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007303#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007304int
7305main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007306{
Martin v. Löwis11437992002-04-12 09:54:03 +00007307
7308 FILE *f = fopen ("conftest.val", "w");
7309 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007310 return 1;
7311 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007312 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007313 long int i = longval ();
7314 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7315 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007316 fprintf (f, "%ld\n", i);
7317 }
7318 else
7319 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007320 unsigned long int i = ulongval ();
7321 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7322 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007323 fprintf (f, "%lu\n", i);
7324 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007325 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007326
7327 ;
7328 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007329}
Martin v. Löwis11437992002-04-12 09:54:03 +00007330_ACEOF
7331rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007332if { (ac_try="$ac_link"
7333case "(($ac_try" in
7334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7335 *) ac_try_echo=$ac_try;;
7336esac
7337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7338 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007339 ac_status=$?
7340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007342 { (case "(($ac_try" in
7343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7344 *) ac_try_echo=$ac_try;;
7345esac
7346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7347 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007348 ac_status=$?
7349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7350 (exit $ac_status); }; }; then
7351 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007352else
Martin v. Löwis11437992002-04-12 09:54:03 +00007353 echo "$as_me: program exited with status $ac_status" >&5
7354echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007355sed 's/^/| /' conftest.$ac_ext >&5
7356
Martin v. Löwis11437992002-04-12 09:54:03 +00007357( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007358if test "$ac_cv_type_int" = yes; then
7359 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007360See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007361echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007362See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007363 { (exit 77); exit 77; }; }
7364 else
7365 ac_cv_sizeof_int=0
7366 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007368rm -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 +00007369fi
7370rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007372{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7373echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7374
7375
7376
Martin v. Löwis11437992002-04-12 09:54:03 +00007377cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007378#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007379_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007380
7381
Martin v. Löwiseba40652007-08-30 20:10:57 +00007382{ echo "$as_me:$LINENO: checking for long" >&5
7383echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007384if test "${ac_cv_type_long+set}" = set; then
7385 echo $ECHO_N "(cached) $ECHO_C" >&6
7386else
7387 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007388/* confdefs.h. */
7389_ACEOF
7390cat confdefs.h >>conftest.$ac_ext
7391cat >>conftest.$ac_ext <<_ACEOF
7392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007393$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007394typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007395int
7396main ()
7397{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007398if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007399 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007400if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007401 return 0;
7402 ;
7403 return 0;
7404}
7405_ACEOF
7406rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007407if { (ac_try="$ac_compile"
7408case "(($ac_try" in
7409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7410 *) ac_try_echo=$ac_try;;
7411esac
7412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007415 grep -v '^ *+' conftest.er1 >conftest.err
7416 rm -f conftest.er1
7417 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007419 (exit $ac_status); } && {
7420 test -z "$ac_c_werror_flag" ||
7421 test ! -s conftest.err
7422 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007423 ac_cv_type_long=yes
7424else
7425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007426sed 's/^/| /' conftest.$ac_ext >&5
7427
Martin v. Löwiseba40652007-08-30 20:10:57 +00007428 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007429fi
Brett Cannon19fab762007-06-02 03:02:29 +00007430
Martin v. Löwiseba40652007-08-30 20:10:57 +00007431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7432fi
7433{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7434echo "${ECHO_T}$ac_cv_type_long" >&6; }
7435
7436# The cast to long int works around a bug in the HP C Compiler
7437# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7438# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7439# This bug is HP SR number 8606223364.
7440{ echo "$as_me:$LINENO: checking size of long" >&5
7441echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007442if test "${ac_cv_sizeof_long+set}" = set; then
7443 echo $ECHO_N "(cached) $ECHO_C" >&6
7444else
Martin v. Löwis11437992002-04-12 09:54:03 +00007445 if test "$cross_compiling" = yes; then
7446 # Depending upon the size, compute the lo and hi bounds.
7447cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007448/* confdefs.h. */
7449_ACEOF
7450cat confdefs.h >>conftest.$ac_ext
7451cat >>conftest.$ac_ext <<_ACEOF
7452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007453$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007454 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007455int
7456main ()
7457{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007458static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007459test_array [0] = 0
7460
7461 ;
7462 return 0;
7463}
7464_ACEOF
7465rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007466if { (ac_try="$ac_compile"
7467case "(($ac_try" in
7468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7469 *) ac_try_echo=$ac_try;;
7470esac
7471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007474 grep -v '^ *+' conftest.er1 >conftest.err
7475 rm -f conftest.er1
7476 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007478 (exit $ac_status); } && {
7479 test -z "$ac_c_werror_flag" ||
7480 test ! -s conftest.err
7481 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007482 ac_lo=0 ac_mid=0
7483 while :; do
7484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007485/* confdefs.h. */
7486_ACEOF
7487cat confdefs.h >>conftest.$ac_ext
7488cat >>conftest.$ac_ext <<_ACEOF
7489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007490$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007491 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007492int
7493main ()
7494{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007495static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007496test_array [0] = 0
7497
7498 ;
7499 return 0;
7500}
7501_ACEOF
7502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007503if { (ac_try="$ac_compile"
7504case "(($ac_try" in
7505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7506 *) ac_try_echo=$ac_try;;
7507esac
7508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007511 grep -v '^ *+' conftest.er1 >conftest.err
7512 rm -f conftest.er1
7513 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007515 (exit $ac_status); } && {
7516 test -z "$ac_c_werror_flag" ||
7517 test ! -s conftest.err
7518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007519 ac_hi=$ac_mid; break
7520else
7521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007522sed 's/^/| /' conftest.$ac_ext >&5
7523
Martin v. Löwiseba40652007-08-30 20:10:57 +00007524 ac_lo=`expr $ac_mid + 1`
7525 if test $ac_lo -le $ac_mid; then
7526 ac_lo= ac_hi=
7527 break
7528 fi
7529 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007531
7532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007533 done
7534else
7535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007536sed 's/^/| /' conftest.$ac_ext >&5
7537
Martin v. Löwiseba40652007-08-30 20:10:57 +00007538 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007539/* confdefs.h. */
7540_ACEOF
7541cat confdefs.h >>conftest.$ac_ext
7542cat >>conftest.$ac_ext <<_ACEOF
7543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007544$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007545 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007546int
7547main ()
7548{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007549static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007550test_array [0] = 0
7551
7552 ;
7553 return 0;
7554}
7555_ACEOF
7556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007557if { (ac_try="$ac_compile"
7558case "(($ac_try" in
7559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7560 *) ac_try_echo=$ac_try;;
7561esac
7562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007565 grep -v '^ *+' conftest.er1 >conftest.err
7566 rm -f conftest.er1
7567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007569 (exit $ac_status); } && {
7570 test -z "$ac_c_werror_flag" ||
7571 test ! -s conftest.err
7572 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007573 ac_hi=-1 ac_mid=-1
7574 while :; do
7575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007576/* confdefs.h. */
7577_ACEOF
7578cat confdefs.h >>conftest.$ac_ext
7579cat >>conftest.$ac_ext <<_ACEOF
7580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007581$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007582 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007583int
7584main ()
7585{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007586static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007587test_array [0] = 0
7588
7589 ;
7590 return 0;
7591}
7592_ACEOF
7593rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007594if { (ac_try="$ac_compile"
7595case "(($ac_try" in
7596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7597 *) ac_try_echo=$ac_try;;
7598esac
7599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007602 grep -v '^ *+' conftest.er1 >conftest.err
7603 rm -f conftest.er1
7604 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007606 (exit $ac_status); } && {
7607 test -z "$ac_c_werror_flag" ||
7608 test ! -s conftest.err
7609 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007610 ac_lo=$ac_mid; break
7611else
7612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007613sed 's/^/| /' conftest.$ac_ext >&5
7614
Martin v. Löwiseba40652007-08-30 20:10:57 +00007615 ac_hi=`expr '(' $ac_mid ')' - 1`
7616 if test $ac_mid -le $ac_hi; then
7617 ac_lo= ac_hi=
7618 break
7619 fi
7620 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007622
7623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007624 done
7625else
7626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007627sed 's/^/| /' conftest.$ac_ext >&5
7628
Martin v. Löwiseba40652007-08-30 20:10:57 +00007629 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007631
7632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007634
7635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007636# Binary search between lo and hi bounds.
7637while test "x$ac_lo" != "x$ac_hi"; do
7638 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007640/* confdefs.h. */
7641_ACEOF
7642cat confdefs.h >>conftest.$ac_ext
7643cat >>conftest.$ac_ext <<_ACEOF
7644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007645$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007646 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007647int
7648main ()
7649{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007650static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007651test_array [0] = 0
7652
7653 ;
7654 return 0;
7655}
7656_ACEOF
7657rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007658if { (ac_try="$ac_compile"
7659case "(($ac_try" in
7660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7661 *) ac_try_echo=$ac_try;;
7662esac
7663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7664 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007666 grep -v '^ *+' conftest.er1 >conftest.err
7667 rm -f conftest.er1
7668 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007670 (exit $ac_status); } && {
7671 test -z "$ac_c_werror_flag" ||
7672 test ! -s conftest.err
7673 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 ac_hi=$ac_mid
7675else
7676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007677sed 's/^/| /' conftest.$ac_ext >&5
7678
Martin v. Löwiseba40652007-08-30 20:10:57 +00007679 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007681
7682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007683done
7684case $ac_lo in
7685?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686'') if test "$ac_cv_type_long" = yes; then
7687 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007688See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007689echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007690See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007691 { (exit 77); exit 77; }; }
7692 else
7693 ac_cv_sizeof_long=0
7694 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007695esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007696else
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007698/* confdefs.h. */
7699_ACEOF
7700cat confdefs.h >>conftest.$ac_ext
7701cat >>conftest.$ac_ext <<_ACEOF
7702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007703$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007704 typedef long ac__type_sizeof_;
7705static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7706static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007707#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007708#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007709int
7710main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007711{
Martin v. Löwis11437992002-04-12 09:54:03 +00007712
7713 FILE *f = fopen ("conftest.val", "w");
7714 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715 return 1;
7716 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007717 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007718 long int i = longval ();
7719 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7720 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007721 fprintf (f, "%ld\n", i);
7722 }
7723 else
7724 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007725 unsigned long int i = ulongval ();
7726 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7727 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007728 fprintf (f, "%lu\n", i);
7729 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007730 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007731
7732 ;
7733 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007734}
Martin v. Löwis11437992002-04-12 09:54:03 +00007735_ACEOF
7736rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007737if { (ac_try="$ac_link"
7738case "(($ac_try" in
7739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7740 *) ac_try_echo=$ac_try;;
7741esac
7742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7743 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 ac_status=$?
7745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7746 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007747 { (case "(($ac_try" in
7748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7749 *) ac_try_echo=$ac_try;;
7750esac
7751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7752 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 ac_status=$?
7754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7755 (exit $ac_status); }; }; then
7756 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007757else
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 echo "$as_me: program exited with status $ac_status" >&5
7759echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007760sed 's/^/| /' conftest.$ac_ext >&5
7761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007763if test "$ac_cv_type_long" = yes; then
7764 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007765See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007767See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007768 { (exit 77); exit 77; }; }
7769 else
7770 ac_cv_sizeof_long=0
7771 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773rm -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 +00007774fi
7775rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007777{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7778echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7779
7780
7781
Martin v. Löwis11437992002-04-12 09:54:03 +00007782cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007783#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007784_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007785
7786
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787{ echo "$as_me:$LINENO: checking for void *" >&5
7788echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007789if test "${ac_cv_type_void_p+set}" = set; then
7790 echo $ECHO_N "(cached) $ECHO_C" >&6
7791else
7792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007793/* confdefs.h. */
7794_ACEOF
7795cat confdefs.h >>conftest.$ac_ext
7796cat >>conftest.$ac_ext <<_ACEOF
7797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007798$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007799typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007800int
7801main ()
7802{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007803if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007804 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007805if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007806 return 0;
7807 ;
7808 return 0;
7809}
7810_ACEOF
7811rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007812if { (ac_try="$ac_compile"
7813case "(($ac_try" in
7814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7815 *) ac_try_echo=$ac_try;;
7816esac
7817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007820 grep -v '^ *+' conftest.er1 >conftest.err
7821 rm -f conftest.er1
7822 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007824 (exit $ac_status); } && {
7825 test -z "$ac_c_werror_flag" ||
7826 test ! -s conftest.err
7827 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 ac_cv_type_void_p=yes
7829else
7830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007831sed 's/^/| /' conftest.$ac_ext >&5
7832
Martin v. Löwiseba40652007-08-30 20:10:57 +00007833 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007834fi
Brett Cannon19fab762007-06-02 03:02:29 +00007835
Martin v. Löwiseba40652007-08-30 20:10:57 +00007836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7837fi
7838{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7839echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7840
7841# The cast to long int works around a bug in the HP C Compiler
7842# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7843# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7844# This bug is HP SR number 8606223364.
7845{ echo "$as_me:$LINENO: checking size of void *" >&5
7846echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007847if test "${ac_cv_sizeof_void_p+set}" = set; then
7848 echo $ECHO_N "(cached) $ECHO_C" >&6
7849else
Martin v. Löwis11437992002-04-12 09:54:03 +00007850 if test "$cross_compiling" = yes; then
7851 # Depending upon the size, compute the lo and hi bounds.
7852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007853/* confdefs.h. */
7854_ACEOF
7855cat confdefs.h >>conftest.$ac_ext
7856cat >>conftest.$ac_ext <<_ACEOF
7857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007858$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007859 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007860int
7861main ()
7862{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007863static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007864test_array [0] = 0
7865
7866 ;
7867 return 0;
7868}
7869_ACEOF
7870rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007871if { (ac_try="$ac_compile"
7872case "(($ac_try" in
7873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7874 *) ac_try_echo=$ac_try;;
7875esac
7876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7877 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007879 grep -v '^ *+' conftest.er1 >conftest.err
7880 rm -f conftest.er1
7881 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007883 (exit $ac_status); } && {
7884 test -z "$ac_c_werror_flag" ||
7885 test ! -s conftest.err
7886 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 ac_lo=0 ac_mid=0
7888 while :; do
7889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007890/* confdefs.h. */
7891_ACEOF
7892cat confdefs.h >>conftest.$ac_ext
7893cat >>conftest.$ac_ext <<_ACEOF
7894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007895$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007896 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007897int
7898main ()
7899{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007900static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007901test_array [0] = 0
7902
7903 ;
7904 return 0;
7905}
7906_ACEOF
7907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908if { (ac_try="$ac_compile"
7909case "(($ac_try" in
7910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7911 *) ac_try_echo=$ac_try;;
7912esac
7913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007916 grep -v '^ *+' conftest.er1 >conftest.err
7917 rm -f conftest.er1
7918 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007920 (exit $ac_status); } && {
7921 test -z "$ac_c_werror_flag" ||
7922 test ! -s conftest.err
7923 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007924 ac_hi=$ac_mid; break
7925else
7926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007927sed 's/^/| /' conftest.$ac_ext >&5
7928
Martin v. Löwiseba40652007-08-30 20:10:57 +00007929 ac_lo=`expr $ac_mid + 1`
7930 if test $ac_lo -le $ac_mid; then
7931 ac_lo= ac_hi=
7932 break
7933 fi
7934 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007936
7937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 done
7939else
7940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007941sed 's/^/| /' conftest.$ac_ext >&5
7942
Martin v. Löwiseba40652007-08-30 20:10:57 +00007943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007944/* confdefs.h. */
7945_ACEOF
7946cat confdefs.h >>conftest.$ac_ext
7947cat >>conftest.$ac_ext <<_ACEOF
7948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007949$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007950 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007951int
7952main ()
7953{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007954static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007955test_array [0] = 0
7956
7957 ;
7958 return 0;
7959}
7960_ACEOF
7961rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007962if { (ac_try="$ac_compile"
7963case "(($ac_try" in
7964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7965 *) ac_try_echo=$ac_try;;
7966esac
7967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007970 grep -v '^ *+' conftest.er1 >conftest.err
7971 rm -f conftest.er1
7972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007974 (exit $ac_status); } && {
7975 test -z "$ac_c_werror_flag" ||
7976 test ! -s conftest.err
7977 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 ac_hi=-1 ac_mid=-1
7979 while :; do
7980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007981/* confdefs.h. */
7982_ACEOF
7983cat confdefs.h >>conftest.$ac_ext
7984cat >>conftest.$ac_ext <<_ACEOF
7985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007986$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007987 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007988int
7989main ()
7990{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007991static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007992test_array [0] = 0
7993
7994 ;
7995 return 0;
7996}
7997_ACEOF
7998rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007999if { (ac_try="$ac_compile"
8000case "(($ac_try" in
8001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8002 *) ac_try_echo=$ac_try;;
8003esac
8004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008007 grep -v '^ *+' conftest.er1 >conftest.err
8008 rm -f conftest.er1
8009 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008011 (exit $ac_status); } && {
8012 test -z "$ac_c_werror_flag" ||
8013 test ! -s conftest.err
8014 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 ac_lo=$ac_mid; break
8016else
8017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008018sed 's/^/| /' conftest.$ac_ext >&5
8019
Martin v. Löwiseba40652007-08-30 20:10:57 +00008020 ac_hi=`expr '(' $ac_mid ')' - 1`
8021 if test $ac_mid -le $ac_hi; then
8022 ac_lo= ac_hi=
8023 break
8024 fi
8025 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008027
8028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 done
8030else
8031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008032sed 's/^/| /' conftest.$ac_ext >&5
8033
Martin v. Löwiseba40652007-08-30 20:10:57 +00008034 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008036
8037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008039
8040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008041# Binary search between lo and hi bounds.
8042while test "x$ac_lo" != "x$ac_hi"; do
8043 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008045/* confdefs.h. */
8046_ACEOF
8047cat confdefs.h >>conftest.$ac_ext
8048cat >>conftest.$ac_ext <<_ACEOF
8049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008050$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008051 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008052int
8053main ()
8054{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008055static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008056test_array [0] = 0
8057
8058 ;
8059 return 0;
8060}
8061_ACEOF
8062rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008063if { (ac_try="$ac_compile"
8064case "(($ac_try" in
8065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8066 *) ac_try_echo=$ac_try;;
8067esac
8068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8069 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008071 grep -v '^ *+' conftest.er1 >conftest.err
8072 rm -f conftest.er1
8073 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008075 (exit $ac_status); } && {
8076 test -z "$ac_c_werror_flag" ||
8077 test ! -s conftest.err
8078 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 ac_hi=$ac_mid
8080else
8081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008082sed 's/^/| /' conftest.$ac_ext >&5
8083
Martin v. Löwiseba40652007-08-30 20:10:57 +00008084 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008086
8087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008088done
8089case $ac_lo in
8090?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008091'') if test "$ac_cv_type_void_p" = yes; then
8092 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008093See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008094echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008095See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008096 { (exit 77); exit 77; }; }
8097 else
8098 ac_cv_sizeof_void_p=0
8099 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008100esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008101else
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008103/* confdefs.h. */
8104_ACEOF
8105cat confdefs.h >>conftest.$ac_ext
8106cat >>conftest.$ac_ext <<_ACEOF
8107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008108$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008109 typedef void * ac__type_sizeof_;
8110static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8111static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008112#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008113#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008114int
8115main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008116{
Martin v. Löwis11437992002-04-12 09:54:03 +00008117
8118 FILE *f = fopen ("conftest.val", "w");
8119 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008120 return 1;
8121 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008122 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008123 long int i = longval ();
8124 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8125 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008126 fprintf (f, "%ld\n", i);
8127 }
8128 else
8129 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008130 unsigned long int i = ulongval ();
8131 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8132 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008133 fprintf (f, "%lu\n", i);
8134 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008135 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008136
8137 ;
8138 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008139}
Martin v. Löwis11437992002-04-12 09:54:03 +00008140_ACEOF
8141rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008142if { (ac_try="$ac_link"
8143case "(($ac_try" in
8144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8145 *) ac_try_echo=$ac_try;;
8146esac
8147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8148 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 ac_status=$?
8150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8151 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008152 { (case "(($ac_try" in
8153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8154 *) ac_try_echo=$ac_try;;
8155esac
8156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8157 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 ac_status=$?
8159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8160 (exit $ac_status); }; }; then
8161 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008162else
Martin v. Löwis11437992002-04-12 09:54:03 +00008163 echo "$as_me: program exited with status $ac_status" >&5
8164echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008165sed 's/^/| /' conftest.$ac_ext >&5
8166
Martin v. Löwis11437992002-04-12 09:54:03 +00008167( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008168if test "$ac_cv_type_void_p" = yes; then
8169 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008170See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008172See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008173 { (exit 77); exit 77; }; }
8174 else
8175 ac_cv_sizeof_void_p=0
8176 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178rm -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 +00008179fi
8180rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008182{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8183echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8184
8185
8186
Martin v. Löwis11437992002-04-12 09:54:03 +00008187cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008188#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008189_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008190
8191
Martin v. Löwiseba40652007-08-30 20:10:57 +00008192{ echo "$as_me:$LINENO: checking for short" >&5
8193echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008194if test "${ac_cv_type_short+set}" = set; then
8195 echo $ECHO_N "(cached) $ECHO_C" >&6
8196else
8197 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008198/* confdefs.h. */
8199_ACEOF
8200cat confdefs.h >>conftest.$ac_ext
8201cat >>conftest.$ac_ext <<_ACEOF
8202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008203$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008204typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008205int
8206main ()
8207{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008208if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008210if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008211 return 0;
8212 ;
8213 return 0;
8214}
8215_ACEOF
8216rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008217if { (ac_try="$ac_compile"
8218case "(($ac_try" in
8219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8220 *) ac_try_echo=$ac_try;;
8221esac
8222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008225 grep -v '^ *+' conftest.er1 >conftest.err
8226 rm -f conftest.er1
8227 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008229 (exit $ac_status); } && {
8230 test -z "$ac_c_werror_flag" ||
8231 test ! -s conftest.err
8232 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 ac_cv_type_short=yes
8234else
8235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008236sed 's/^/| /' conftest.$ac_ext >&5
8237
Martin v. Löwiseba40652007-08-30 20:10:57 +00008238 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008239fi
Brett Cannon19fab762007-06-02 03:02:29 +00008240
Martin v. Löwiseba40652007-08-30 20:10:57 +00008241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8242fi
8243{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8244echo "${ECHO_T}$ac_cv_type_short" >&6; }
8245
8246# The cast to long int works around a bug in the HP C Compiler
8247# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8248# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8249# This bug is HP SR number 8606223364.
8250{ echo "$as_me:$LINENO: checking size of short" >&5
8251echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008252if test "${ac_cv_sizeof_short+set}" = set; then
8253 echo $ECHO_N "(cached) $ECHO_C" >&6
8254else
Martin v. Löwis11437992002-04-12 09:54:03 +00008255 if test "$cross_compiling" = yes; then
8256 # Depending upon the size, compute the lo and hi bounds.
8257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008258/* confdefs.h. */
8259_ACEOF
8260cat confdefs.h >>conftest.$ac_ext
8261cat >>conftest.$ac_ext <<_ACEOF
8262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008263$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008264 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008265int
8266main ()
8267{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008268static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008269test_array [0] = 0
8270
8271 ;
8272 return 0;
8273}
8274_ACEOF
8275rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008276if { (ac_try="$ac_compile"
8277case "(($ac_try" in
8278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8279 *) ac_try_echo=$ac_try;;
8280esac
8281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8282 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008283 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008284 grep -v '^ *+' conftest.er1 >conftest.err
8285 rm -f conftest.er1
8286 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008288 (exit $ac_status); } && {
8289 test -z "$ac_c_werror_flag" ||
8290 test ! -s conftest.err
8291 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 ac_lo=0 ac_mid=0
8293 while :; do
8294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008295/* confdefs.h. */
8296_ACEOF
8297cat confdefs.h >>conftest.$ac_ext
8298cat >>conftest.$ac_ext <<_ACEOF
8299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008300$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008301 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008302int
8303main ()
8304{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008305static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008306test_array [0] = 0
8307
8308 ;
8309 return 0;
8310}
8311_ACEOF
8312rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313if { (ac_try="$ac_compile"
8314case "(($ac_try" in
8315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8316 *) ac_try_echo=$ac_try;;
8317esac
8318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008321 grep -v '^ *+' conftest.er1 >conftest.err
8322 rm -f conftest.er1
8323 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008325 (exit $ac_status); } && {
8326 test -z "$ac_c_werror_flag" ||
8327 test ! -s conftest.err
8328 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008329 ac_hi=$ac_mid; break
8330else
8331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008332sed 's/^/| /' conftest.$ac_ext >&5
8333
Martin v. Löwiseba40652007-08-30 20:10:57 +00008334 ac_lo=`expr $ac_mid + 1`
8335 if test $ac_lo -le $ac_mid; then
8336 ac_lo= ac_hi=
8337 break
8338 fi
8339 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008341
8342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008343 done
8344else
8345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008346sed 's/^/| /' conftest.$ac_ext >&5
8347
Martin v. Löwiseba40652007-08-30 20:10:57 +00008348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008349/* confdefs.h. */
8350_ACEOF
8351cat confdefs.h >>conftest.$ac_ext
8352cat >>conftest.$ac_ext <<_ACEOF
8353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008354$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008355 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008356int
8357main ()
8358{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008359static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008360test_array [0] = 0
8361
8362 ;
8363 return 0;
8364}
8365_ACEOF
8366rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008367if { (ac_try="$ac_compile"
8368case "(($ac_try" in
8369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8370 *) ac_try_echo=$ac_try;;
8371esac
8372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8373 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008374 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008375 grep -v '^ *+' conftest.er1 >conftest.err
8376 rm -f conftest.er1
8377 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008379 (exit $ac_status); } && {
8380 test -z "$ac_c_werror_flag" ||
8381 test ! -s conftest.err
8382 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008383 ac_hi=-1 ac_mid=-1
8384 while :; do
8385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008386/* confdefs.h. */
8387_ACEOF
8388cat confdefs.h >>conftest.$ac_ext
8389cat >>conftest.$ac_ext <<_ACEOF
8390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008391$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008392 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008393int
8394main ()
8395{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008397test_array [0] = 0
8398
8399 ;
8400 return 0;
8401}
8402_ACEOF
8403rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008404if { (ac_try="$ac_compile"
8405case "(($ac_try" in
8406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8407 *) ac_try_echo=$ac_try;;
8408esac
8409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008412 grep -v '^ *+' conftest.er1 >conftest.err
8413 rm -f conftest.er1
8414 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008416 (exit $ac_status); } && {
8417 test -z "$ac_c_werror_flag" ||
8418 test ! -s conftest.err
8419 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008420 ac_lo=$ac_mid; break
8421else
8422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008423sed 's/^/| /' conftest.$ac_ext >&5
8424
Martin v. Löwiseba40652007-08-30 20:10:57 +00008425 ac_hi=`expr '(' $ac_mid ')' - 1`
8426 if test $ac_mid -le $ac_hi; then
8427 ac_lo= ac_hi=
8428 break
8429 fi
8430 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008432
8433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 done
8435else
8436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008437sed 's/^/| /' conftest.$ac_ext >&5
8438
Martin v. Löwiseba40652007-08-30 20:10:57 +00008439 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008441
8442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008444
8445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008446# Binary search between lo and hi bounds.
8447while test "x$ac_lo" != "x$ac_hi"; do
8448 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008450/* confdefs.h. */
8451_ACEOF
8452cat confdefs.h >>conftest.$ac_ext
8453cat >>conftest.$ac_ext <<_ACEOF
8454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008455$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008456 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008457int
8458main ()
8459{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008460static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008461test_array [0] = 0
8462
8463 ;
8464 return 0;
8465}
8466_ACEOF
8467rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008468if { (ac_try="$ac_compile"
8469case "(($ac_try" in
8470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8471 *) ac_try_echo=$ac_try;;
8472esac
8473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8474 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008476 grep -v '^ *+' conftest.er1 >conftest.err
8477 rm -f conftest.er1
8478 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480 (exit $ac_status); } && {
8481 test -z "$ac_c_werror_flag" ||
8482 test ! -s conftest.err
8483 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 ac_hi=$ac_mid
8485else
8486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008487sed 's/^/| /' conftest.$ac_ext >&5
8488
Martin v. Löwiseba40652007-08-30 20:10:57 +00008489 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008491
8492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008493done
8494case $ac_lo in
8495?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008496'') if test "$ac_cv_type_short" = yes; then
8497 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008498See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008499echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008500See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008501 { (exit 77); exit 77; }; }
8502 else
8503 ac_cv_sizeof_short=0
8504 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008505esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008506else
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008508/* confdefs.h. */
8509_ACEOF
8510cat confdefs.h >>conftest.$ac_ext
8511cat >>conftest.$ac_ext <<_ACEOF
8512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008513$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008514 typedef short ac__type_sizeof_;
8515static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8516static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008517#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008518#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008519int
8520main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008521{
Martin v. Löwis11437992002-04-12 09:54:03 +00008522
8523 FILE *f = fopen ("conftest.val", "w");
8524 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008525 return 1;
8526 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008527 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008528 long int i = longval ();
8529 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8530 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008531 fprintf (f, "%ld\n", i);
8532 }
8533 else
8534 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008535 unsigned long int i = ulongval ();
8536 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8537 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 fprintf (f, "%lu\n", i);
8539 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008540 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008541
8542 ;
8543 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008544}
Martin v. Löwis11437992002-04-12 09:54:03 +00008545_ACEOF
8546rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008547if { (ac_try="$ac_link"
8548case "(($ac_try" in
8549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8550 *) ac_try_echo=$ac_try;;
8551esac
8552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8553 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ac_status=$?
8555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8556 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008557 { (case "(($ac_try" in
8558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8559 *) ac_try_echo=$ac_try;;
8560esac
8561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8562 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 ac_status=$?
8564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8565 (exit $ac_status); }; }; then
8566 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008567else
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 echo "$as_me: program exited with status $ac_status" >&5
8569echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008570sed 's/^/| /' conftest.$ac_ext >&5
8571
Martin v. Löwis11437992002-04-12 09:54:03 +00008572( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008573if test "$ac_cv_type_short" = yes; then
8574 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008575See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008577See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008578 { (exit 77); exit 77; }; }
8579 else
8580 ac_cv_sizeof_short=0
8581 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583rm -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 +00008584fi
8585rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008587{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8588echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8589
8590
8591
Martin v. Löwis11437992002-04-12 09:54:03 +00008592cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008593#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008594_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008595
8596
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597{ echo "$as_me:$LINENO: checking for float" >&5
8598echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008599if test "${ac_cv_type_float+set}" = set; then
8600 echo $ECHO_N "(cached) $ECHO_C" >&6
8601else
8602 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008603/* confdefs.h. */
8604_ACEOF
8605cat confdefs.h >>conftest.$ac_ext
8606cat >>conftest.$ac_ext <<_ACEOF
8607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008608$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008610int
8611main ()
8612{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008613if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008615if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008616 return 0;
8617 ;
8618 return 0;
8619}
8620_ACEOF
8621rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008622if { (ac_try="$ac_compile"
8623case "(($ac_try" in
8624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8625 *) ac_try_echo=$ac_try;;
8626esac
8627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008630 grep -v '^ *+' conftest.er1 >conftest.err
8631 rm -f conftest.er1
8632 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008634 (exit $ac_status); } && {
8635 test -z "$ac_c_werror_flag" ||
8636 test ! -s conftest.err
8637 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ac_cv_type_float=yes
8639else
8640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008641sed 's/^/| /' conftest.$ac_ext >&5
8642
Martin v. Löwiseba40652007-08-30 20:10:57 +00008643 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008644fi
Brett Cannon19fab762007-06-02 03:02:29 +00008645
Martin v. Löwiseba40652007-08-30 20:10:57 +00008646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8647fi
8648{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8649echo "${ECHO_T}$ac_cv_type_float" >&6; }
8650
8651# The cast to long int works around a bug in the HP C Compiler
8652# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8653# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8654# This bug is HP SR number 8606223364.
8655{ echo "$as_me:$LINENO: checking size of float" >&5
8656echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008657if test "${ac_cv_sizeof_float+set}" = set; then
8658 echo $ECHO_N "(cached) $ECHO_C" >&6
8659else
Martin v. Löwis11437992002-04-12 09:54:03 +00008660 if test "$cross_compiling" = yes; then
8661 # Depending upon the size, compute the lo and hi bounds.
8662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008663/* confdefs.h. */
8664_ACEOF
8665cat confdefs.h >>conftest.$ac_ext
8666cat >>conftest.$ac_ext <<_ACEOF
8667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008668$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008669 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008670int
8671main ()
8672{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008673static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008674test_array [0] = 0
8675
8676 ;
8677 return 0;
8678}
8679_ACEOF
8680rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008681if { (ac_try="$ac_compile"
8682case "(($ac_try" in
8683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8684 *) ac_try_echo=$ac_try;;
8685esac
8686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008689 grep -v '^ *+' conftest.er1 >conftest.err
8690 rm -f conftest.er1
8691 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693 (exit $ac_status); } && {
8694 test -z "$ac_c_werror_flag" ||
8695 test ! -s conftest.err
8696 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008697 ac_lo=0 ac_mid=0
8698 while :; do
8699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008700/* confdefs.h. */
8701_ACEOF
8702cat confdefs.h >>conftest.$ac_ext
8703cat >>conftest.$ac_ext <<_ACEOF
8704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008705$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008706 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008707int
8708main ()
8709{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008710static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008711test_array [0] = 0
8712
8713 ;
8714 return 0;
8715}
8716_ACEOF
8717rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718if { (ac_try="$ac_compile"
8719case "(($ac_try" in
8720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8721 *) ac_try_echo=$ac_try;;
8722esac
8723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008726 grep -v '^ *+' conftest.er1 >conftest.err
8727 rm -f conftest.er1
8728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008730 (exit $ac_status); } && {
8731 test -z "$ac_c_werror_flag" ||
8732 test ! -s conftest.err
8733 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008734 ac_hi=$ac_mid; break
8735else
8736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008737sed 's/^/| /' conftest.$ac_ext >&5
8738
Martin v. Löwiseba40652007-08-30 20:10:57 +00008739 ac_lo=`expr $ac_mid + 1`
8740 if test $ac_lo -le $ac_mid; then
8741 ac_lo= ac_hi=
8742 break
8743 fi
8744 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008746
8747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008748 done
8749else
8750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008751sed 's/^/| /' conftest.$ac_ext >&5
8752
Martin v. Löwiseba40652007-08-30 20:10:57 +00008753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008754/* confdefs.h. */
8755_ACEOF
8756cat confdefs.h >>conftest.$ac_ext
8757cat >>conftest.$ac_ext <<_ACEOF
8758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008759$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008760 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008761int
8762main ()
8763{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008764static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008765test_array [0] = 0
8766
8767 ;
8768 return 0;
8769}
8770_ACEOF
8771rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008772if { (ac_try="$ac_compile"
8773case "(($ac_try" in
8774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8775 *) ac_try_echo=$ac_try;;
8776esac
8777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008780 grep -v '^ *+' conftest.er1 >conftest.err
8781 rm -f conftest.er1
8782 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008784 (exit $ac_status); } && {
8785 test -z "$ac_c_werror_flag" ||
8786 test ! -s conftest.err
8787 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 ac_hi=-1 ac_mid=-1
8789 while :; do
8790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008791/* confdefs.h. */
8792_ACEOF
8793cat confdefs.h >>conftest.$ac_ext
8794cat >>conftest.$ac_ext <<_ACEOF
8795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008796$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008797 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008798int
8799main ()
8800{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008802test_array [0] = 0
8803
8804 ;
8805 return 0;
8806}
8807_ACEOF
8808rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008809if { (ac_try="$ac_compile"
8810case "(($ac_try" in
8811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8812 *) ac_try_echo=$ac_try;;
8813esac
8814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8815 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008817 grep -v '^ *+' conftest.er1 >conftest.err
8818 rm -f conftest.er1
8819 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008821 (exit $ac_status); } && {
8822 test -z "$ac_c_werror_flag" ||
8823 test ! -s conftest.err
8824 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008825 ac_lo=$ac_mid; break
8826else
8827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008828sed 's/^/| /' conftest.$ac_ext >&5
8829
Martin v. Löwiseba40652007-08-30 20:10:57 +00008830 ac_hi=`expr '(' $ac_mid ')' - 1`
8831 if test $ac_mid -le $ac_hi; then
8832 ac_lo= ac_hi=
8833 break
8834 fi
8835 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008837
8838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 done
8840else
8841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008842sed 's/^/| /' conftest.$ac_ext >&5
8843
Martin v. Löwiseba40652007-08-30 20:10:57 +00008844 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008846
8847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008849
8850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008851# Binary search between lo and hi bounds.
8852while test "x$ac_lo" != "x$ac_hi"; do
8853 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008855/* confdefs.h. */
8856_ACEOF
8857cat confdefs.h >>conftest.$ac_ext
8858cat >>conftest.$ac_ext <<_ACEOF
8859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008860$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008861 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008862int
8863main ()
8864{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008865static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008866test_array [0] = 0
8867
8868 ;
8869 return 0;
8870}
8871_ACEOF
8872rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008873if { (ac_try="$ac_compile"
8874case "(($ac_try" in
8875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8876 *) ac_try_echo=$ac_try;;
8877esac
8878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008881 grep -v '^ *+' conftest.er1 >conftest.err
8882 rm -f conftest.er1
8883 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885 (exit $ac_status); } && {
8886 test -z "$ac_c_werror_flag" ||
8887 test ! -s conftest.err
8888 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 ac_hi=$ac_mid
8890else
8891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008892sed 's/^/| /' conftest.$ac_ext >&5
8893
Martin v. Löwiseba40652007-08-30 20:10:57 +00008894 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008896
8897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008898done
8899case $ac_lo in
8900?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008901'') if test "$ac_cv_type_float" = yes; then
8902 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008903See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008904echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008905See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008906 { (exit 77); exit 77; }; }
8907 else
8908 ac_cv_sizeof_float=0
8909 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008910esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008911else
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008913/* confdefs.h. */
8914_ACEOF
8915cat confdefs.h >>conftest.$ac_ext
8916cat >>conftest.$ac_ext <<_ACEOF
8917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008918$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008919 typedef float ac__type_sizeof_;
8920static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8921static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008922#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008923#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008924int
8925main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008926{
Martin v. Löwis11437992002-04-12 09:54:03 +00008927
8928 FILE *f = fopen ("conftest.val", "w");
8929 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008930 return 1;
8931 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008932 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008933 long int i = longval ();
8934 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8935 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008936 fprintf (f, "%ld\n", i);
8937 }
8938 else
8939 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008940 unsigned long int i = ulongval ();
8941 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8942 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008943 fprintf (f, "%lu\n", i);
8944 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008945 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008946
8947 ;
8948 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008949}
Martin v. Löwis11437992002-04-12 09:54:03 +00008950_ACEOF
8951rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008952if { (ac_try="$ac_link"
8953case "(($ac_try" in
8954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8955 *) ac_try_echo=$ac_try;;
8956esac
8957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8958 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 ac_status=$?
8960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8961 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008962 { (case "(($ac_try" in
8963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8964 *) ac_try_echo=$ac_try;;
8965esac
8966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8967 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 ac_status=$?
8969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8970 (exit $ac_status); }; }; then
8971 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008972else
Martin v. Löwis11437992002-04-12 09:54:03 +00008973 echo "$as_me: program exited with status $ac_status" >&5
8974echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008975sed 's/^/| /' conftest.$ac_ext >&5
8976
Martin v. Löwis11437992002-04-12 09:54:03 +00008977( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008978if test "$ac_cv_type_float" = yes; then
8979 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008980See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008982See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008983 { (exit 77); exit 77; }; }
8984 else
8985 ac_cv_sizeof_float=0
8986 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988rm -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 +00008989fi
8990rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008992{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8993echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8994
8995
8996
Martin v. Löwis11437992002-04-12 09:54:03 +00008997cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008998#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008999_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009000
9001
Martin v. Löwiseba40652007-08-30 20:10:57 +00009002{ echo "$as_me:$LINENO: checking for double" >&5
9003echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009004if test "${ac_cv_type_double+set}" = set; then
9005 echo $ECHO_N "(cached) $ECHO_C" >&6
9006else
9007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009008/* confdefs.h. */
9009_ACEOF
9010cat confdefs.h >>conftest.$ac_ext
9011cat >>conftest.$ac_ext <<_ACEOF
9012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009013$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009015int
9016main ()
9017{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009018if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009019 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009020if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009021 return 0;
9022 ;
9023 return 0;
9024}
9025_ACEOF
9026rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009027if { (ac_try="$ac_compile"
9028case "(($ac_try" in
9029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9030 *) ac_try_echo=$ac_try;;
9031esac
9032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9033 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009035 grep -v '^ *+' conftest.er1 >conftest.err
9036 rm -f conftest.er1
9037 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009039 (exit $ac_status); } && {
9040 test -z "$ac_c_werror_flag" ||
9041 test ! -s conftest.err
9042 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 ac_cv_type_double=yes
9044else
9045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009046sed 's/^/| /' conftest.$ac_ext >&5
9047
Martin v. Löwiseba40652007-08-30 20:10:57 +00009048 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009049fi
Brett Cannon19fab762007-06-02 03:02:29 +00009050
Martin v. Löwiseba40652007-08-30 20:10:57 +00009051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9052fi
9053{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9054echo "${ECHO_T}$ac_cv_type_double" >&6; }
9055
9056# The cast to long int works around a bug in the HP C Compiler
9057# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9058# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9059# This bug is HP SR number 8606223364.
9060{ echo "$as_me:$LINENO: checking size of double" >&5
9061echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009062if test "${ac_cv_sizeof_double+set}" = set; then
9063 echo $ECHO_N "(cached) $ECHO_C" >&6
9064else
Martin v. Löwis11437992002-04-12 09:54:03 +00009065 if test "$cross_compiling" = yes; then
9066 # Depending upon the size, compute the lo and hi bounds.
9067cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009068/* confdefs.h. */
9069_ACEOF
9070cat confdefs.h >>conftest.$ac_ext
9071cat >>conftest.$ac_ext <<_ACEOF
9072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009073$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009074 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009075int
9076main ()
9077{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009078static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009079test_array [0] = 0
9080
9081 ;
9082 return 0;
9083}
9084_ACEOF
9085rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009086if { (ac_try="$ac_compile"
9087case "(($ac_try" in
9088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9089 *) ac_try_echo=$ac_try;;
9090esac
9091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9092 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009094 grep -v '^ *+' conftest.er1 >conftest.err
9095 rm -f conftest.er1
9096 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098 (exit $ac_status); } && {
9099 test -z "$ac_c_werror_flag" ||
9100 test ! -s conftest.err
9101 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009102 ac_lo=0 ac_mid=0
9103 while :; do
9104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009105/* confdefs.h. */
9106_ACEOF
9107cat confdefs.h >>conftest.$ac_ext
9108cat >>conftest.$ac_ext <<_ACEOF
9109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009110$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009111 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009112int
9113main ()
9114{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009115static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009116test_array [0] = 0
9117
9118 ;
9119 return 0;
9120}
9121_ACEOF
9122rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009123if { (ac_try="$ac_compile"
9124case "(($ac_try" in
9125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9126 *) ac_try_echo=$ac_try;;
9127esac
9128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009131 grep -v '^ *+' conftest.er1 >conftest.err
9132 rm -f conftest.er1
9133 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009135 (exit $ac_status); } && {
9136 test -z "$ac_c_werror_flag" ||
9137 test ! -s conftest.err
9138 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 ac_hi=$ac_mid; break
9140else
9141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009142sed 's/^/| /' conftest.$ac_ext >&5
9143
Martin v. Löwiseba40652007-08-30 20:10:57 +00009144 ac_lo=`expr $ac_mid + 1`
9145 if test $ac_lo -le $ac_mid; then
9146 ac_lo= ac_hi=
9147 break
9148 fi
9149 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009151
9152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 done
9154else
9155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009156sed 's/^/| /' conftest.$ac_ext >&5
9157
Martin v. Löwiseba40652007-08-30 20:10:57 +00009158 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009159/* confdefs.h. */
9160_ACEOF
9161cat confdefs.h >>conftest.$ac_ext
9162cat >>conftest.$ac_ext <<_ACEOF
9163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009164$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009165 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009166int
9167main ()
9168{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009169static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009170test_array [0] = 0
9171
9172 ;
9173 return 0;
9174}
9175_ACEOF
9176rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009177if { (ac_try="$ac_compile"
9178case "(($ac_try" in
9179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9180 *) ac_try_echo=$ac_try;;
9181esac
9182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9183 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009185 grep -v '^ *+' conftest.er1 >conftest.err
9186 rm -f conftest.er1
9187 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009189 (exit $ac_status); } && {
9190 test -z "$ac_c_werror_flag" ||
9191 test ! -s conftest.err
9192 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 ac_hi=-1 ac_mid=-1
9194 while :; do
9195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009196/* confdefs.h. */
9197_ACEOF
9198cat confdefs.h >>conftest.$ac_ext
9199cat >>conftest.$ac_ext <<_ACEOF
9200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009201$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009202 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009203int
9204main ()
9205{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009206static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009207test_array [0] = 0
9208
9209 ;
9210 return 0;
9211}
9212_ACEOF
9213rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009214if { (ac_try="$ac_compile"
9215case "(($ac_try" in
9216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9217 *) ac_try_echo=$ac_try;;
9218esac
9219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9220 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009222 grep -v '^ *+' conftest.er1 >conftest.err
9223 rm -f conftest.er1
9224 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009226 (exit $ac_status); } && {
9227 test -z "$ac_c_werror_flag" ||
9228 test ! -s conftest.err
9229 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009230 ac_lo=$ac_mid; break
9231else
9232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009233sed 's/^/| /' conftest.$ac_ext >&5
9234
Martin v. Löwiseba40652007-08-30 20:10:57 +00009235 ac_hi=`expr '(' $ac_mid ')' - 1`
9236 if test $ac_mid -le $ac_hi; then
9237 ac_lo= ac_hi=
9238 break
9239 fi
9240 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009242
9243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 done
9245else
9246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009247sed 's/^/| /' conftest.$ac_ext >&5
9248
Martin v. Löwiseba40652007-08-30 20:10:57 +00009249 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009251
9252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009254
9255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009256# Binary search between lo and hi bounds.
9257while test "x$ac_lo" != "x$ac_hi"; do
9258 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9259 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009260/* confdefs.h. */
9261_ACEOF
9262cat confdefs.h >>conftest.$ac_ext
9263cat >>conftest.$ac_ext <<_ACEOF
9264/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009265$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009266 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009267int
9268main ()
9269{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009270static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009271test_array [0] = 0
9272
9273 ;
9274 return 0;
9275}
9276_ACEOF
9277rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009278if { (ac_try="$ac_compile"
9279case "(($ac_try" in
9280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9281 *) ac_try_echo=$ac_try;;
9282esac
9283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9284 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009286 grep -v '^ *+' conftest.er1 >conftest.err
9287 rm -f conftest.er1
9288 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009290 (exit $ac_status); } && {
9291 test -z "$ac_c_werror_flag" ||
9292 test ! -s conftest.err
9293 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 ac_hi=$ac_mid
9295else
9296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009297sed 's/^/| /' conftest.$ac_ext >&5
9298
Martin v. Löwiseba40652007-08-30 20:10:57 +00009299 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009301
9302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009303done
9304case $ac_lo in
9305?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306'') if test "$ac_cv_type_double" = yes; then
9307 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009308See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009309echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009310See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009311 { (exit 77); exit 77; }; }
9312 else
9313 ac_cv_sizeof_double=0
9314 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009315esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009316else
Martin v. Löwis11437992002-04-12 09:54:03 +00009317 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009318/* confdefs.h. */
9319_ACEOF
9320cat confdefs.h >>conftest.$ac_ext
9321cat >>conftest.$ac_ext <<_ACEOF
9322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009323$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009324 typedef double ac__type_sizeof_;
9325static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9326static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009327#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009328#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009329int
9330main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009331{
Martin v. Löwis11437992002-04-12 09:54:03 +00009332
9333 FILE *f = fopen ("conftest.val", "w");
9334 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009335 return 1;
9336 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009337 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009338 long int i = longval ();
9339 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9340 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009341 fprintf (f, "%ld\n", i);
9342 }
9343 else
9344 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009345 unsigned long int i = ulongval ();
9346 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9347 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 fprintf (f, "%lu\n", i);
9349 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009350 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009351
9352 ;
9353 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009354}
Martin v. Löwis11437992002-04-12 09:54:03 +00009355_ACEOF
9356rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009357if { (ac_try="$ac_link"
9358case "(($ac_try" in
9359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9360 *) ac_try_echo=$ac_try;;
9361esac
9362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9363 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 ac_status=$?
9365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9366 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009367 { (case "(($ac_try" in
9368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9369 *) ac_try_echo=$ac_try;;
9370esac
9371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9372 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 ac_status=$?
9374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9375 (exit $ac_status); }; }; then
9376 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009377else
Martin v. Löwis11437992002-04-12 09:54:03 +00009378 echo "$as_me: program exited with status $ac_status" >&5
9379echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009380sed 's/^/| /' conftest.$ac_ext >&5
9381
Martin v. Löwis11437992002-04-12 09:54:03 +00009382( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009383if test "$ac_cv_type_double" = yes; then
9384 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009385See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009386echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009387See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009388 { (exit 77); exit 77; }; }
9389 else
9390 ac_cv_sizeof_double=0
9391 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393rm -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 +00009394fi
9395rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009397{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9398echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9399
9400
9401
Martin v. Löwis11437992002-04-12 09:54:03 +00009402cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009403#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009404_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009405
9406
Martin v. Löwiseba40652007-08-30 20:10:57 +00009407{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9408echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009409if test "${ac_cv_type_fpos_t+set}" = set; then
9410 echo $ECHO_N "(cached) $ECHO_C" >&6
9411else
9412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009413/* confdefs.h. */
9414_ACEOF
9415cat confdefs.h >>conftest.$ac_ext
9416cat >>conftest.$ac_ext <<_ACEOF
9417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009418$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009419typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009420int
9421main ()
9422{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009423if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009425if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 return 0;
9427 ;
9428 return 0;
9429}
9430_ACEOF
9431rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009432if { (ac_try="$ac_compile"
9433case "(($ac_try" in
9434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9435 *) ac_try_echo=$ac_try;;
9436esac
9437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009440 grep -v '^ *+' conftest.er1 >conftest.err
9441 rm -f conftest.er1
9442 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009444 (exit $ac_status); } && {
9445 test -z "$ac_c_werror_flag" ||
9446 test ! -s conftest.err
9447 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 ac_cv_type_fpos_t=yes
9449else
9450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009451sed 's/^/| /' conftest.$ac_ext >&5
9452
Martin v. Löwiseba40652007-08-30 20:10:57 +00009453 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009454fi
Brett Cannon19fab762007-06-02 03:02:29 +00009455
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9457fi
9458{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9459echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9460
9461# The cast to long int works around a bug in the HP C Compiler
9462# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9463# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9464# This bug is HP SR number 8606223364.
9465{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9466echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009467if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9468 echo $ECHO_N "(cached) $ECHO_C" >&6
9469else
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 if test "$cross_compiling" = yes; then
9471 # Depending upon the size, compute the lo and hi bounds.
9472cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009473/* confdefs.h. */
9474_ACEOF
9475cat confdefs.h >>conftest.$ac_ext
9476cat >>conftest.$ac_ext <<_ACEOF
9477/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009478$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009479 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009480int
9481main ()
9482{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009483static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009484test_array [0] = 0
9485
9486 ;
9487 return 0;
9488}
9489_ACEOF
9490rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009491if { (ac_try="$ac_compile"
9492case "(($ac_try" in
9493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9494 *) ac_try_echo=$ac_try;;
9495esac
9496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009499 grep -v '^ *+' conftest.er1 >conftest.err
9500 rm -f conftest.er1
9501 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503 (exit $ac_status); } && {
9504 test -z "$ac_c_werror_flag" ||
9505 test ! -s conftest.err
9506 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 ac_lo=0 ac_mid=0
9508 while :; do
9509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009510/* confdefs.h. */
9511_ACEOF
9512cat confdefs.h >>conftest.$ac_ext
9513cat >>conftest.$ac_ext <<_ACEOF
9514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009515$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009516 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009517int
9518main ()
9519{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009520static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009521test_array [0] = 0
9522
9523 ;
9524 return 0;
9525}
9526_ACEOF
9527rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009528if { (ac_try="$ac_compile"
9529case "(($ac_try" in
9530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9531 *) ac_try_echo=$ac_try;;
9532esac
9533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009536 grep -v '^ *+' conftest.er1 >conftest.err
9537 rm -f conftest.er1
9538 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009540 (exit $ac_status); } && {
9541 test -z "$ac_c_werror_flag" ||
9542 test ! -s conftest.err
9543 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009544 ac_hi=$ac_mid; break
9545else
9546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009547sed 's/^/| /' conftest.$ac_ext >&5
9548
Martin v. Löwiseba40652007-08-30 20:10:57 +00009549 ac_lo=`expr $ac_mid + 1`
9550 if test $ac_lo -le $ac_mid; then
9551 ac_lo= ac_hi=
9552 break
9553 fi
9554 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009556
9557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009558 done
9559else
9560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009561sed 's/^/| /' conftest.$ac_ext >&5
9562
Martin v. Löwiseba40652007-08-30 20:10:57 +00009563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009564/* confdefs.h. */
9565_ACEOF
9566cat confdefs.h >>conftest.$ac_ext
9567cat >>conftest.$ac_ext <<_ACEOF
9568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009569$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009570 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009571int
9572main ()
9573{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009574static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009575test_array [0] = 0
9576
9577 ;
9578 return 0;
9579}
9580_ACEOF
9581rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009582if { (ac_try="$ac_compile"
9583case "(($ac_try" in
9584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9585 *) ac_try_echo=$ac_try;;
9586esac
9587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009590 grep -v '^ *+' conftest.er1 >conftest.err
9591 rm -f conftest.er1
9592 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009594 (exit $ac_status); } && {
9595 test -z "$ac_c_werror_flag" ||
9596 test ! -s conftest.err
9597 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 ac_hi=-1 ac_mid=-1
9599 while :; do
9600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009601/* confdefs.h. */
9602_ACEOF
9603cat confdefs.h >>conftest.$ac_ext
9604cat >>conftest.$ac_ext <<_ACEOF
9605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009606$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009607 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009608int
9609main ()
9610{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009611static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009612test_array [0] = 0
9613
9614 ;
9615 return 0;
9616}
9617_ACEOF
9618rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009619if { (ac_try="$ac_compile"
9620case "(($ac_try" in
9621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9622 *) ac_try_echo=$ac_try;;
9623esac
9624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009627 grep -v '^ *+' conftest.er1 >conftest.err
9628 rm -f conftest.er1
9629 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009631 (exit $ac_status); } && {
9632 test -z "$ac_c_werror_flag" ||
9633 test ! -s conftest.err
9634 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 ac_lo=$ac_mid; break
9636else
9637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009638sed 's/^/| /' conftest.$ac_ext >&5
9639
Martin v. Löwiseba40652007-08-30 20:10:57 +00009640 ac_hi=`expr '(' $ac_mid ')' - 1`
9641 if test $ac_mid -le $ac_hi; then
9642 ac_lo= ac_hi=
9643 break
9644 fi
9645 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009647
9648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 done
9650else
9651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009652sed 's/^/| /' conftest.$ac_ext >&5
9653
Martin v. Löwiseba40652007-08-30 20:10:57 +00009654 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009656
9657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009658fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009659
9660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009661# Binary search between lo and hi bounds.
9662while test "x$ac_lo" != "x$ac_hi"; do
9663 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009665/* confdefs.h. */
9666_ACEOF
9667cat confdefs.h >>conftest.$ac_ext
9668cat >>conftest.$ac_ext <<_ACEOF
9669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009670$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009671 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009672int
9673main ()
9674{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009675static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009676test_array [0] = 0
9677
9678 ;
9679 return 0;
9680}
9681_ACEOF
9682rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009683if { (ac_try="$ac_compile"
9684case "(($ac_try" in
9685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9686 *) ac_try_echo=$ac_try;;
9687esac
9688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009691 grep -v '^ *+' conftest.er1 >conftest.err
9692 rm -f conftest.er1
9693 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695 (exit $ac_status); } && {
9696 test -z "$ac_c_werror_flag" ||
9697 test ! -s conftest.err
9698 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_hi=$ac_mid
9700else
9701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009702sed 's/^/| /' conftest.$ac_ext >&5
9703
Martin v. Löwiseba40652007-08-30 20:10:57 +00009704 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009706
9707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009708done
9709case $ac_lo in
9710?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009711'') if test "$ac_cv_type_fpos_t" = yes; then
9712 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009713See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009714echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009715See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009716 { (exit 77); exit 77; }; }
9717 else
9718 ac_cv_sizeof_fpos_t=0
9719 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009720esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009721else
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009723/* confdefs.h. */
9724_ACEOF
9725cat confdefs.h >>conftest.$ac_ext
9726cat >>conftest.$ac_ext <<_ACEOF
9727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009728$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009729 typedef fpos_t ac__type_sizeof_;
9730static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9731static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009732#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009733#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009734int
9735main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009736{
Martin v. Löwis11437992002-04-12 09:54:03 +00009737
9738 FILE *f = fopen ("conftest.val", "w");
9739 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009740 return 1;
9741 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009743 long int i = longval ();
9744 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9745 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009746 fprintf (f, "%ld\n", i);
9747 }
9748 else
9749 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009750 unsigned long int i = ulongval ();
9751 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9752 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 fprintf (f, "%lu\n", i);
9754 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009755 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009756
9757 ;
9758 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009759}
Martin v. Löwis11437992002-04-12 09:54:03 +00009760_ACEOF
9761rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009762if { (ac_try="$ac_link"
9763case "(($ac_try" in
9764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9765 *) ac_try_echo=$ac_try;;
9766esac
9767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9768 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ac_status=$?
9770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9771 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009772 { (case "(($ac_try" in
9773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9774 *) ac_try_echo=$ac_try;;
9775esac
9776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9777 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_status=$?
9779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9780 (exit $ac_status); }; }; then
9781 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009782else
Martin v. Löwis11437992002-04-12 09:54:03 +00009783 echo "$as_me: program exited with status $ac_status" >&5
9784echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009785sed 's/^/| /' conftest.$ac_ext >&5
9786
Martin v. Löwis11437992002-04-12 09:54:03 +00009787( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009788if test "$ac_cv_type_fpos_t" = yes; then
9789 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009790See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009792See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009793 { (exit 77); exit 77; }; }
9794 else
9795 ac_cv_sizeof_fpos_t=0
9796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798rm -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 +00009799fi
9800rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009802{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9803echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9804
9805
9806
Martin v. Löwis11437992002-04-12 09:54:03 +00009807cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009808#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009809_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009810
Michael W. Hudson54241132001-12-07 15:38:26 +00009811
Martin v. Löwiseba40652007-08-30 20:10:57 +00009812{ echo "$as_me:$LINENO: checking for size_t" >&5
9813echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009814if test "${ac_cv_type_size_t+set}" = set; then
9815 echo $ECHO_N "(cached) $ECHO_C" >&6
9816else
9817 cat >conftest.$ac_ext <<_ACEOF
9818/* confdefs.h. */
9819_ACEOF
9820cat confdefs.h >>conftest.$ac_ext
9821cat >>conftest.$ac_ext <<_ACEOF
9822/* end confdefs.h. */
9823$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009824typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009825int
9826main ()
9827{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009828if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009829 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009830if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009831 return 0;
9832 ;
9833 return 0;
9834}
9835_ACEOF
9836rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009837if { (ac_try="$ac_compile"
9838case "(($ac_try" in
9839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9840 *) ac_try_echo=$ac_try;;
9841esac
9842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009844 ac_status=$?
9845 grep -v '^ *+' conftest.er1 >conftest.err
9846 rm -f conftest.er1
9847 cat conftest.err >&5
9848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009849 (exit $ac_status); } && {
9850 test -z "$ac_c_werror_flag" ||
9851 test ! -s conftest.err
9852 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009853 ac_cv_type_size_t=yes
9854else
9855 echo "$as_me: failed program was:" >&5
9856sed 's/^/| /' conftest.$ac_ext >&5
9857
Martin v. Löwiseba40652007-08-30 20:10:57 +00009858 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009859fi
Brett Cannon19fab762007-06-02 03:02:29 +00009860
Martin v. Löwiseba40652007-08-30 20:10:57 +00009861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9862fi
9863{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9864echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9865
9866# The cast to long int works around a bug in the HP C Compiler
9867# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9868# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9869# This bug is HP SR number 8606223364.
9870{ echo "$as_me:$LINENO: checking size of size_t" >&5
9871echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009872if test "${ac_cv_sizeof_size_t+set}" = set; then
9873 echo $ECHO_N "(cached) $ECHO_C" >&6
9874else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009875 if test "$cross_compiling" = yes; then
9876 # Depending upon the size, compute the lo and hi bounds.
9877cat >conftest.$ac_ext <<_ACEOF
9878/* confdefs.h. */
9879_ACEOF
9880cat confdefs.h >>conftest.$ac_ext
9881cat >>conftest.$ac_ext <<_ACEOF
9882/* end confdefs.h. */
9883$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009884 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009885int
9886main ()
9887{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009888static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009889test_array [0] = 0
9890
9891 ;
9892 return 0;
9893}
9894_ACEOF
9895rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009896if { (ac_try="$ac_compile"
9897case "(($ac_try" in
9898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9899 *) ac_try_echo=$ac_try;;
9900esac
9901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9902 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009903 ac_status=$?
9904 grep -v '^ *+' conftest.er1 >conftest.err
9905 rm -f conftest.er1
9906 cat conftest.err >&5
9907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908 (exit $ac_status); } && {
9909 test -z "$ac_c_werror_flag" ||
9910 test ! -s conftest.err
9911 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009912 ac_lo=0 ac_mid=0
9913 while :; do
9914 cat >conftest.$ac_ext <<_ACEOF
9915/* confdefs.h. */
9916_ACEOF
9917cat confdefs.h >>conftest.$ac_ext
9918cat >>conftest.$ac_ext <<_ACEOF
9919/* end confdefs.h. */
9920$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009921 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009922int
9923main ()
9924{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009925static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009926test_array [0] = 0
9927
9928 ;
9929 return 0;
9930}
9931_ACEOF
9932rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933if { (ac_try="$ac_compile"
9934case "(($ac_try" in
9935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9936 *) ac_try_echo=$ac_try;;
9937esac
9938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9939 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009940 ac_status=$?
9941 grep -v '^ *+' conftest.er1 >conftest.err
9942 rm -f conftest.er1
9943 cat conftest.err >&5
9944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945 (exit $ac_status); } && {
9946 test -z "$ac_c_werror_flag" ||
9947 test ! -s conftest.err
9948 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009949 ac_hi=$ac_mid; break
9950else
9951 echo "$as_me: failed program was:" >&5
9952sed 's/^/| /' conftest.$ac_ext >&5
9953
Martin v. Löwiseba40652007-08-30 20:10:57 +00009954 ac_lo=`expr $ac_mid + 1`
9955 if test $ac_lo -le $ac_mid; then
9956 ac_lo= ac_hi=
9957 break
9958 fi
9959 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009961
9962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009963 done
9964else
9965 echo "$as_me: failed program was:" >&5
9966sed 's/^/| /' conftest.$ac_ext >&5
9967
Martin v. Löwiseba40652007-08-30 20:10:57 +00009968 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009969/* confdefs.h. */
9970_ACEOF
9971cat confdefs.h >>conftest.$ac_ext
9972cat >>conftest.$ac_ext <<_ACEOF
9973/* end confdefs.h. */
9974$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009975 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009976int
9977main ()
9978{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009979static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009980test_array [0] = 0
9981
9982 ;
9983 return 0;
9984}
9985_ACEOF
9986rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009987if { (ac_try="$ac_compile"
9988case "(($ac_try" in
9989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9990 *) ac_try_echo=$ac_try;;
9991esac
9992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009994 ac_status=$?
9995 grep -v '^ *+' conftest.er1 >conftest.err
9996 rm -f conftest.er1
9997 cat conftest.err >&5
9998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009999 (exit $ac_status); } && {
10000 test -z "$ac_c_werror_flag" ||
10001 test ! -s conftest.err
10002 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010003 ac_hi=-1 ac_mid=-1
10004 while :; do
10005 cat >conftest.$ac_ext <<_ACEOF
10006/* confdefs.h. */
10007_ACEOF
10008cat confdefs.h >>conftest.$ac_ext
10009cat >>conftest.$ac_ext <<_ACEOF
10010/* end confdefs.h. */
10011$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010012 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010013int
10014main ()
10015{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010016static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010017test_array [0] = 0
10018
10019 ;
10020 return 0;
10021}
10022_ACEOF
10023rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010024if { (ac_try="$ac_compile"
10025case "(($ac_try" in
10026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10027 *) ac_try_echo=$ac_try;;
10028esac
10029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10030 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010031 ac_status=$?
10032 grep -v '^ *+' conftest.er1 >conftest.err
10033 rm -f conftest.er1
10034 cat conftest.err >&5
10035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010036 (exit $ac_status); } && {
10037 test -z "$ac_c_werror_flag" ||
10038 test ! -s conftest.err
10039 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010040 ac_lo=$ac_mid; break
10041else
10042 echo "$as_me: failed program was:" >&5
10043sed 's/^/| /' conftest.$ac_ext >&5
10044
Martin v. Löwiseba40652007-08-30 20:10:57 +000010045 ac_hi=`expr '(' $ac_mid ')' - 1`
10046 if test $ac_mid -le $ac_hi; then
10047 ac_lo= ac_hi=
10048 break
10049 fi
10050 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010052
10053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010054 done
10055else
10056 echo "$as_me: failed program was:" >&5
10057sed 's/^/| /' conftest.$ac_ext >&5
10058
Martin v. Löwiseba40652007-08-30 20:10:57 +000010059 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010061
10062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010064
10065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010066# Binary search between lo and hi bounds.
10067while test "x$ac_lo" != "x$ac_hi"; do
10068 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10069 cat >conftest.$ac_ext <<_ACEOF
10070/* confdefs.h. */
10071_ACEOF
10072cat confdefs.h >>conftest.$ac_ext
10073cat >>conftest.$ac_ext <<_ACEOF
10074/* end confdefs.h. */
10075$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010076 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010077int
10078main ()
10079{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010080static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010081test_array [0] = 0
10082
10083 ;
10084 return 0;
10085}
10086_ACEOF
10087rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010088if { (ac_try="$ac_compile"
10089case "(($ac_try" in
10090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10091 *) ac_try_echo=$ac_try;;
10092esac
10093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10094 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010095 ac_status=$?
10096 grep -v '^ *+' conftest.er1 >conftest.err
10097 rm -f conftest.er1
10098 cat conftest.err >&5
10099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100 (exit $ac_status); } && {
10101 test -z "$ac_c_werror_flag" ||
10102 test ! -s conftest.err
10103 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010104 ac_hi=$ac_mid
10105else
10106 echo "$as_me: failed program was:" >&5
10107sed 's/^/| /' conftest.$ac_ext >&5
10108
Martin v. Löwiseba40652007-08-30 20:10:57 +000010109 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010111
10112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010113done
10114case $ac_lo in
10115?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010116'') if test "$ac_cv_type_size_t" = yes; then
10117 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010118See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010119echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010120See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010121 { (exit 77); exit 77; }; }
10122 else
10123 ac_cv_sizeof_size_t=0
10124 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010125esac
10126else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010127 cat >conftest.$ac_ext <<_ACEOF
10128/* confdefs.h. */
10129_ACEOF
10130cat confdefs.h >>conftest.$ac_ext
10131cat >>conftest.$ac_ext <<_ACEOF
10132/* end confdefs.h. */
10133$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010134 typedef size_t ac__type_sizeof_;
10135static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10136static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010137#include <stdio.h>
10138#include <stdlib.h>
10139int
10140main ()
10141{
10142
10143 FILE *f = fopen ("conftest.val", "w");
10144 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010145 return 1;
10146 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010147 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010148 long int i = longval ();
10149 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10150 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010151 fprintf (f, "%ld\n", i);
10152 }
10153 else
10154 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010155 unsigned long int i = ulongval ();
10156 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10157 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010158 fprintf (f, "%lu\n", i);
10159 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010160 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010161
10162 ;
10163 return 0;
10164}
10165_ACEOF
10166rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010167if { (ac_try="$ac_link"
10168case "(($ac_try" in
10169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10170 *) ac_try_echo=$ac_try;;
10171esac
10172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10173 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010174 ac_status=$?
10175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10176 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010177 { (case "(($ac_try" in
10178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10179 *) ac_try_echo=$ac_try;;
10180esac
10181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10182 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010183 ac_status=$?
10184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10185 (exit $ac_status); }; }; then
10186 ac_cv_sizeof_size_t=`cat conftest.val`
10187else
10188 echo "$as_me: program exited with status $ac_status" >&5
10189echo "$as_me: failed program was:" >&5
10190sed 's/^/| /' conftest.$ac_ext >&5
10191
10192( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010193if test "$ac_cv_type_size_t" = yes; then
10194 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010195See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010197See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010198 { (exit 77); exit 77; }; }
10199 else
10200 ac_cv_sizeof_size_t=0
10201 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203rm -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 +000010204fi
10205rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010207{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10208echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10209
10210
10211
Martin v. Löwis18e16552006-02-15 17:27:45 +000010212cat >>confdefs.h <<_ACEOF
10213#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10214_ACEOF
10215
10216
Christian Heimes951cc0f2008-01-31 23:08:23 +000010217{ echo "$as_me:$LINENO: checking for pid_t" >&5
10218echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10219if test "${ac_cv_type_pid_t+set}" = set; then
10220 echo $ECHO_N "(cached) $ECHO_C" >&6
10221else
10222 cat >conftest.$ac_ext <<_ACEOF
10223/* confdefs.h. */
10224_ACEOF
10225cat confdefs.h >>conftest.$ac_ext
10226cat >>conftest.$ac_ext <<_ACEOF
10227/* end confdefs.h. */
10228$ac_includes_default
10229typedef pid_t ac__type_new_;
10230int
10231main ()
10232{
10233if ((ac__type_new_ *) 0)
10234 return 0;
10235if (sizeof (ac__type_new_))
10236 return 0;
10237 ;
10238 return 0;
10239}
10240_ACEOF
10241rm -f conftest.$ac_objext
10242if { (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
10249 ac_status=$?
10250 grep -v '^ *+' conftest.er1 >conftest.err
10251 rm -f conftest.er1
10252 cat conftest.err >&5
10253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10254 (exit $ac_status); } && {
10255 test -z "$ac_c_werror_flag" ||
10256 test ! -s conftest.err
10257 } && test -s conftest.$ac_objext; then
10258 ac_cv_type_pid_t=yes
10259else
10260 echo "$as_me: failed program was:" >&5
10261sed 's/^/| /' conftest.$ac_ext >&5
10262
10263 ac_cv_type_pid_t=no
10264fi
10265
10266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10267fi
10268{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10269echo "${ECHO_T}$ac_cv_type_pid_t" >&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 pid_t" >&5
10276echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10277if test "${ac_cv_sizeof_pid_t+set}" = set; then
10278 echo $ECHO_N "(cached) $ECHO_C" >&6
10279else
10280 if test "$cross_compiling" = yes; then
10281 # Depending upon the size, compute the lo and hi bounds.
10282cat >conftest.$ac_ext <<_ACEOF
10283/* confdefs.h. */
10284_ACEOF
10285cat confdefs.h >>conftest.$ac_ext
10286cat >>conftest.$ac_ext <<_ACEOF
10287/* end confdefs.h. */
10288$ac_includes_default
10289 typedef pid_t ac__type_sizeof_;
10290int
10291main ()
10292{
10293static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10294test_array [0] = 0
10295
10296 ;
10297 return 0;
10298}
10299_ACEOF
10300rm -f conftest.$ac_objext
10301if { (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
10308 ac_status=$?
10309 grep -v '^ *+' conftest.er1 >conftest.err
10310 rm -f conftest.er1
10311 cat conftest.err >&5
10312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10313 (exit $ac_status); } && {
10314 test -z "$ac_c_werror_flag" ||
10315 test ! -s conftest.err
10316 } && test -s conftest.$ac_objext; then
10317 ac_lo=0 ac_mid=0
10318 while :; do
10319 cat >conftest.$ac_ext <<_ACEOF
10320/* confdefs.h. */
10321_ACEOF
10322cat confdefs.h >>conftest.$ac_ext
10323cat >>conftest.$ac_ext <<_ACEOF
10324/* end confdefs.h. */
10325$ac_includes_default
10326 typedef pid_t ac__type_sizeof_;
10327int
10328main ()
10329{
10330static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10331test_array [0] = 0
10332
10333 ;
10334 return 0;
10335}
10336_ACEOF
10337rm -f conftest.$ac_objext
10338if { (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
10345 ac_status=$?
10346 grep -v '^ *+' conftest.er1 >conftest.err
10347 rm -f conftest.er1
10348 cat conftest.err >&5
10349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10350 (exit $ac_status); } && {
10351 test -z "$ac_c_werror_flag" ||
10352 test ! -s conftest.err
10353 } && test -s conftest.$ac_objext; then
10354 ac_hi=$ac_mid; break
10355else
10356 echo "$as_me: failed program was:" >&5
10357sed 's/^/| /' conftest.$ac_ext >&5
10358
10359 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`
10365fi
10366
10367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10368 done
10369else
10370 echo "$as_me: failed program was:" >&5
10371sed 's/^/| /' conftest.$ac_ext >&5
10372
10373 cat >conftest.$ac_ext <<_ACEOF
10374/* confdefs.h. */
10375_ACEOF
10376cat confdefs.h >>conftest.$ac_ext
10377cat >>conftest.$ac_ext <<_ACEOF
10378/* end confdefs.h. */
10379$ac_includes_default
10380 typedef pid_t ac__type_sizeof_;
10381int
10382main ()
10383{
10384static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10385test_array [0] = 0
10386
10387 ;
10388 return 0;
10389}
10390_ACEOF
10391rm -f conftest.$ac_objext
10392if { (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
10399 ac_status=$?
10400 grep -v '^ *+' conftest.er1 >conftest.err
10401 rm -f conftest.er1
10402 cat conftest.err >&5
10403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10404 (exit $ac_status); } && {
10405 test -z "$ac_c_werror_flag" ||
10406 test ! -s conftest.err
10407 } && test -s conftest.$ac_objext; then
10408 ac_hi=-1 ac_mid=-1
10409 while :; do
10410 cat >conftest.$ac_ext <<_ACEOF
10411/* confdefs.h. */
10412_ACEOF
10413cat confdefs.h >>conftest.$ac_ext
10414cat >>conftest.$ac_ext <<_ACEOF
10415/* end confdefs.h. */
10416$ac_includes_default
10417 typedef pid_t ac__type_sizeof_;
10418int
10419main ()
10420{
10421static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10422test_array [0] = 0
10423
10424 ;
10425 return 0;
10426}
10427_ACEOF
10428rm -f conftest.$ac_objext
10429if { (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
10436 ac_status=$?
10437 grep -v '^ *+' conftest.er1 >conftest.err
10438 rm -f conftest.er1
10439 cat conftest.err >&5
10440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10441 (exit $ac_status); } && {
10442 test -z "$ac_c_werror_flag" ||
10443 test ! -s conftest.err
10444 } && test -s conftest.$ac_objext; then
10445 ac_lo=$ac_mid; break
10446else
10447 echo "$as_me: failed program was:" >&5
10448sed 's/^/| /' conftest.$ac_ext >&5
10449
10450 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`
10456fi
10457
10458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10459 done
10460else
10461 echo "$as_me: failed program was:" >&5
10462sed 's/^/| /' conftest.$ac_ext >&5
10463
10464 ac_lo= ac_hi=
10465fi
10466
10467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10468fi
10469
10470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10471# 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
10475/* confdefs.h. */
10476_ACEOF
10477cat confdefs.h >>conftest.$ac_ext
10478cat >>conftest.$ac_ext <<_ACEOF
10479/* end confdefs.h. */
10480$ac_includes_default
10481 typedef pid_t ac__type_sizeof_;
10482int
10483main ()
10484{
10485static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10486test_array [0] = 0
10487
10488 ;
10489 return 0;
10490}
10491_ACEOF
10492rm -f conftest.$ac_objext
10493if { (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
10500 ac_status=$?
10501 grep -v '^ *+' conftest.er1 >conftest.err
10502 rm -f conftest.er1
10503 cat conftest.err >&5
10504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10505 (exit $ac_status); } && {
10506 test -z "$ac_c_werror_flag" ||
10507 test ! -s conftest.err
10508 } && test -s conftest.$ac_objext; then
10509 ac_hi=$ac_mid
10510else
10511 echo "$as_me: failed program was:" >&5
10512sed 's/^/| /' conftest.$ac_ext >&5
10513
10514 ac_lo=`expr '(' $ac_mid ')' + 1`
10515fi
10516
10517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10518done
10519case $ac_lo in
10520?*) ac_cv_sizeof_pid_t=$ac_lo;;
10521'') if test "$ac_cv_type_pid_t" = yes; then
10522 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10523See \`config.log' for more details." >&5
10524echo "$as_me: error: cannot compute sizeof (pid_t)
10525See \`config.log' for more details." >&2;}
10526 { (exit 77); exit 77; }; }
10527 else
10528 ac_cv_sizeof_pid_t=0
10529 fi ;;
10530esac
10531else
10532 cat >conftest.$ac_ext <<_ACEOF
10533/* confdefs.h. */
10534_ACEOF
10535cat confdefs.h >>conftest.$ac_ext
10536cat >>conftest.$ac_ext <<_ACEOF
10537/* end confdefs.h. */
10538$ac_includes_default
10539 typedef pid_t 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_)); }
10542#include <stdio.h>
10543#include <stdlib.h>
10544int
10545main ()
10546{
10547
10548 FILE *f = fopen ("conftest.val", "w");
10549 if (! f)
10550 return 1;
10551 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10552 {
10553 long int i = longval ();
10554 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10555 return 1;
10556 fprintf (f, "%ld\n", i);
10557 }
10558 else
10559 {
10560 unsigned long int i = ulongval ();
10561 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10562 return 1;
10563 fprintf (f, "%lu\n", i);
10564 }
10565 return ferror (f) || fclose (f) != 0;
10566
10567 ;
10568 return 0;
10569}
10570_ACEOF
10571rm -f conftest$ac_exeext
10572if { (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
10579 ac_status=$?
10580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10581 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10582 { (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
10588 ac_status=$?
10589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10590 (exit $ac_status); }; }; then
10591 ac_cv_sizeof_pid_t=`cat conftest.val`
10592else
10593 echo "$as_me: program exited with status $ac_status" >&5
10594echo "$as_me: failed program was:" >&5
10595sed 's/^/| /' conftest.$ac_ext >&5
10596
10597( exit $ac_status )
10598if test "$ac_cv_type_pid_t" = yes; then
10599 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10600See \`config.log' for more details." >&5
10601echo "$as_me: error: cannot compute sizeof (pid_t)
10602See \`config.log' for more details." >&2;}
10603 { (exit 77); exit 77; }; }
10604 else
10605 ac_cv_sizeof_pid_t=0
10606 fi
10607fi
10608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10609fi
10610rm -f conftest.val
10611fi
10612{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10613echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10614
10615
10616
10617cat >>confdefs.h <<_ACEOF
10618#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10619_ACEOF
10620
10621
Michael W. Hudson54241132001-12-07 15:38:26 +000010622
Martin v. Löwiseba40652007-08-30 20:10:57 +000010623{ echo "$as_me:$LINENO: checking for long long support" >&5
10624echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010625have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010627/* confdefs.h. */
10628_ACEOF
10629cat confdefs.h >>conftest.$ac_ext
10630cat >>conftest.$ac_ext <<_ACEOF
10631/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010632
Martin v. Löwis11437992002-04-12 09:54:03 +000010633int
10634main ()
10635{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010636long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 ;
10638 return 0;
10639}
10640_ACEOF
10641rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010642if { (ac_try="$ac_compile"
10643case "(($ac_try" in
10644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10645 *) ac_try_echo=$ac_try;;
10646esac
10647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010650 grep -v '^ *+' conftest.er1 >conftest.err
10651 rm -f conftest.er1
10652 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010654 (exit $ac_status); } && {
10655 test -z "$ac_c_werror_flag" ||
10656 test ! -s conftest.err
10657 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010658
10659
10660cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010661#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010662_ACEOF
10663
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010664 have_long_long=yes
10665
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010666else
Martin v. Löwis11437992002-04-12 09:54:03 +000010667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010668sed 's/^/| /' conftest.$ac_ext >&5
10669
Martin v. Löwiseba40652007-08-30 20:10:57 +000010670
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672
10673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10674{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10675echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010676if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010677{ echo "$as_me:$LINENO: checking for long long" >&5
10678echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010679if test "${ac_cv_type_long_long+set}" = set; then
10680 echo $ECHO_N "(cached) $ECHO_C" >&6
10681else
10682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010683/* confdefs.h. */
10684_ACEOF
10685cat confdefs.h >>conftest.$ac_ext
10686cat >>conftest.$ac_ext <<_ACEOF
10687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010688$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010689typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010690int
10691main ()
10692{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010693if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 return 0;
10697 ;
10698 return 0;
10699}
10700_ACEOF
10701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010702if { (ac_try="$ac_compile"
10703case "(($ac_try" in
10704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10705 *) ac_try_echo=$ac_try;;
10706esac
10707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010710 grep -v '^ *+' conftest.er1 >conftest.err
10711 rm -f conftest.er1
10712 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010714 (exit $ac_status); } && {
10715 test -z "$ac_c_werror_flag" ||
10716 test ! -s conftest.err
10717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ac_cv_type_long_long=yes
10719else
10720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010721sed 's/^/| /' conftest.$ac_ext >&5
10722
Martin v. Löwiseba40652007-08-30 20:10:57 +000010723 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010724fi
Brett Cannon19fab762007-06-02 03:02:29 +000010725
Martin v. Löwiseba40652007-08-30 20:10:57 +000010726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10727fi
10728{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10729echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10730
10731# The cast to long int works around a bug in the HP C Compiler
10732# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10733# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10734# This bug is HP SR number 8606223364.
10735{ echo "$as_me:$LINENO: checking size of long long" >&5
10736echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010737if test "${ac_cv_sizeof_long_long+set}" = set; then
10738 echo $ECHO_N "(cached) $ECHO_C" >&6
10739else
Martin v. Löwis11437992002-04-12 09:54:03 +000010740 if test "$cross_compiling" = yes; then
10741 # Depending upon the size, compute the lo and hi bounds.
10742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010743/* confdefs.h. */
10744_ACEOF
10745cat confdefs.h >>conftest.$ac_ext
10746cat >>conftest.$ac_ext <<_ACEOF
10747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010748$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010749 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010750int
10751main ()
10752{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010753static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010754test_array [0] = 0
10755
10756 ;
10757 return 0;
10758}
10759_ACEOF
10760rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010761if { (ac_try="$ac_compile"
10762case "(($ac_try" in
10763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10764 *) ac_try_echo=$ac_try;;
10765esac
10766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010769 grep -v '^ *+' conftest.er1 >conftest.err
10770 rm -f conftest.er1
10771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010773 (exit $ac_status); } && {
10774 test -z "$ac_c_werror_flag" ||
10775 test ! -s conftest.err
10776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 ac_lo=0 ac_mid=0
10778 while :; do
10779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010780/* confdefs.h. */
10781_ACEOF
10782cat confdefs.h >>conftest.$ac_ext
10783cat >>conftest.$ac_ext <<_ACEOF
10784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010785$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010786 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010787int
10788main ()
10789{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010791test_array [0] = 0
10792
10793 ;
10794 return 0;
10795}
10796_ACEOF
10797rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010798if { (ac_try="$ac_compile"
10799case "(($ac_try" in
10800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10801 *) ac_try_echo=$ac_try;;
10802esac
10803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010806 grep -v '^ *+' conftest.er1 >conftest.err
10807 rm -f conftest.er1
10808 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010810 (exit $ac_status); } && {
10811 test -z "$ac_c_werror_flag" ||
10812 test ! -s conftest.err
10813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010814 ac_hi=$ac_mid; break
10815else
10816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010817sed 's/^/| /' conftest.$ac_ext >&5
10818
Martin v. Löwiseba40652007-08-30 20:10:57 +000010819 ac_lo=`expr $ac_mid + 1`
10820 if test $ac_lo -le $ac_mid; then
10821 ac_lo= ac_hi=
10822 break
10823 fi
10824 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010826
10827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010828 done
10829else
10830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010831sed 's/^/| /' conftest.$ac_ext >&5
10832
Martin v. Löwiseba40652007-08-30 20:10:57 +000010833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010834/* confdefs.h. */
10835_ACEOF
10836cat confdefs.h >>conftest.$ac_ext
10837cat >>conftest.$ac_ext <<_ACEOF
10838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010839$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010840 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010841int
10842main ()
10843{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010844static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010845test_array [0] = 0
10846
10847 ;
10848 return 0;
10849}
10850_ACEOF
10851rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010852if { (ac_try="$ac_compile"
10853case "(($ac_try" in
10854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10855 *) ac_try_echo=$ac_try;;
10856esac
10857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10858 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010860 grep -v '^ *+' conftest.er1 >conftest.err
10861 rm -f conftest.er1
10862 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010864 (exit $ac_status); } && {
10865 test -z "$ac_c_werror_flag" ||
10866 test ! -s conftest.err
10867 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 ac_hi=-1 ac_mid=-1
10869 while :; do
10870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010871/* confdefs.h. */
10872_ACEOF
10873cat confdefs.h >>conftest.$ac_ext
10874cat >>conftest.$ac_ext <<_ACEOF
10875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010876$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010877 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010878int
10879main ()
10880{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010882test_array [0] = 0
10883
10884 ;
10885 return 0;
10886}
10887_ACEOF
10888rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010889if { (ac_try="$ac_compile"
10890case "(($ac_try" in
10891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10892 *) ac_try_echo=$ac_try;;
10893esac
10894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010897 grep -v '^ *+' conftest.er1 >conftest.err
10898 rm -f conftest.er1
10899 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010901 (exit $ac_status); } && {
10902 test -z "$ac_c_werror_flag" ||
10903 test ! -s conftest.err
10904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 ac_lo=$ac_mid; break
10906else
10907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010908sed 's/^/| /' conftest.$ac_ext >&5
10909
Martin v. Löwiseba40652007-08-30 20:10:57 +000010910 ac_hi=`expr '(' $ac_mid ')' - 1`
10911 if test $ac_mid -le $ac_hi; then
10912 ac_lo= ac_hi=
10913 break
10914 fi
10915 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010917
10918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010919 done
10920else
10921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010922sed 's/^/| /' conftest.$ac_ext >&5
10923
Martin v. Löwiseba40652007-08-30 20:10:57 +000010924 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010926
10927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010929
10930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010931# Binary search between lo and hi bounds.
10932while test "x$ac_lo" != "x$ac_hi"; do
10933 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010935/* confdefs.h. */
10936_ACEOF
10937cat confdefs.h >>conftest.$ac_ext
10938cat >>conftest.$ac_ext <<_ACEOF
10939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010940$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010941 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010942int
10943main ()
10944{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010945static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010946test_array [0] = 0
10947
10948 ;
10949 return 0;
10950}
10951_ACEOF
10952rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010953if { (ac_try="$ac_compile"
10954case "(($ac_try" in
10955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10956 *) ac_try_echo=$ac_try;;
10957esac
10958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010961 grep -v '^ *+' conftest.er1 >conftest.err
10962 rm -f conftest.er1
10963 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010965 (exit $ac_status); } && {
10966 test -z "$ac_c_werror_flag" ||
10967 test ! -s conftest.err
10968 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010969 ac_hi=$ac_mid
10970else
10971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010972sed 's/^/| /' conftest.$ac_ext >&5
10973
Martin v. Löwiseba40652007-08-30 20:10:57 +000010974 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010976
10977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010978done
10979case $ac_lo in
10980?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010981'') if test "$ac_cv_type_long_long" = yes; then
10982 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010983See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010984echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010985See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010986 { (exit 77); exit 77; }; }
10987 else
10988 ac_cv_sizeof_long_long=0
10989 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010990esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010991else
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010993/* confdefs.h. */
10994_ACEOF
10995cat confdefs.h >>conftest.$ac_ext
10996cat >>conftest.$ac_ext <<_ACEOF
10997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010998$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010999 typedef long long ac__type_sizeof_;
11000static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11001static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011002#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011003#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011004int
11005main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011006{
Martin v. Löwis11437992002-04-12 09:54:03 +000011007
11008 FILE *f = fopen ("conftest.val", "w");
11009 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011010 return 1;
11011 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011013 long int i = longval ();
11014 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11015 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011016 fprintf (f, "%ld\n", i);
11017 }
11018 else
11019 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011020 unsigned long int i = ulongval ();
11021 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11022 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 fprintf (f, "%lu\n", i);
11024 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011025 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011026
11027 ;
11028 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011029}
Martin v. Löwis11437992002-04-12 09:54:03 +000011030_ACEOF
11031rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011032if { (ac_try="$ac_link"
11033case "(($ac_try" in
11034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11035 *) ac_try_echo=$ac_try;;
11036esac
11037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11038 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011039 ac_status=$?
11040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11041 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011042 { (case "(($ac_try" in
11043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11044 *) ac_try_echo=$ac_try;;
11045esac
11046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11047 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 ac_status=$?
11049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11050 (exit $ac_status); }; }; then
11051 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011052else
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 echo "$as_me: program exited with status $ac_status" >&5
11054echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011055sed 's/^/| /' conftest.$ac_ext >&5
11056
Martin v. Löwis11437992002-04-12 09:54:03 +000011057( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011058if test "$ac_cv_type_long_long" = yes; then
11059 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011060See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011061echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011062See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011063 { (exit 77); exit 77; }; }
11064 else
11065 ac_cv_sizeof_long_long=0
11066 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011068rm -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 +000011069fi
11070rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011072{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11073echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11074
11075
11076
Martin v. Löwis11437992002-04-12 09:54:03 +000011077cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011078#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011079_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011080
Michael W. Hudson54241132001-12-07 15:38:26 +000011081
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011082fi
11083
Martin v. Löwiseba40652007-08-30 20:10:57 +000011084{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11085echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011086have_c99_bool=no
11087cat >conftest.$ac_ext <<_ACEOF
11088/* confdefs.h. */
11089_ACEOF
11090cat confdefs.h >>conftest.$ac_ext
11091cat >>conftest.$ac_ext <<_ACEOF
11092/* end confdefs.h. */
11093
11094int
11095main ()
11096{
11097_Bool x; x = (_Bool)0;
11098 ;
11099 return 0;
11100}
11101_ACEOF
11102rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011103if { (ac_try="$ac_compile"
11104case "(($ac_try" in
11105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11106 *) ac_try_echo=$ac_try;;
11107esac
11108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011110 ac_status=$?
11111 grep -v '^ *+' conftest.er1 >conftest.err
11112 rm -f conftest.er1
11113 cat conftest.err >&5
11114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011115 (exit $ac_status); } && {
11116 test -z "$ac_c_werror_flag" ||
11117 test ! -s conftest.err
11118 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011119
11120
11121cat >>confdefs.h <<\_ACEOF
11122#define HAVE_C99_BOOL 1
11123_ACEOF
11124
11125 have_c99_bool=yes
11126
11127else
11128 echo "$as_me: failed program was:" >&5
11129sed 's/^/| /' conftest.$ac_ext >&5
11130
Martin v. Löwiseba40652007-08-30 20:10:57 +000011131
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011133
11134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11135{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11136echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011137if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011138{ echo "$as_me:$LINENO: checking for _Bool" >&5
11139echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011140if test "${ac_cv_type__Bool+set}" = set; then
11141 echo $ECHO_N "(cached) $ECHO_C" >&6
11142else
11143 cat >conftest.$ac_ext <<_ACEOF
11144/* confdefs.h. */
11145_ACEOF
11146cat confdefs.h >>conftest.$ac_ext
11147cat >>conftest.$ac_ext <<_ACEOF
11148/* end confdefs.h. */
11149$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011150typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011151int
11152main ()
11153{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011154if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011155 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011156if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011157 return 0;
11158 ;
11159 return 0;
11160}
11161_ACEOF
11162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011163if { (ac_try="$ac_compile"
11164case "(($ac_try" in
11165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11166 *) ac_try_echo=$ac_try;;
11167esac
11168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011170 ac_status=$?
11171 grep -v '^ *+' conftest.er1 >conftest.err
11172 rm -f conftest.er1
11173 cat conftest.err >&5
11174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011175 (exit $ac_status); } && {
11176 test -z "$ac_c_werror_flag" ||
11177 test ! -s conftest.err
11178 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011179 ac_cv_type__Bool=yes
11180else
11181 echo "$as_me: failed program was:" >&5
11182sed 's/^/| /' conftest.$ac_ext >&5
11183
Martin v. Löwiseba40652007-08-30 20:10:57 +000011184 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011185fi
Brett Cannon19fab762007-06-02 03:02:29 +000011186
Martin v. Löwiseba40652007-08-30 20:10:57 +000011187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11188fi
11189{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11190echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11191
11192# The cast to long int works around a bug in the HP C Compiler
11193# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11194# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11195# This bug is HP SR number 8606223364.
11196{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11197echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011198if test "${ac_cv_sizeof__Bool+set}" = set; then
11199 echo $ECHO_N "(cached) $ECHO_C" >&6
11200else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011201 if test "$cross_compiling" = yes; then
11202 # Depending upon the size, compute the lo and hi bounds.
11203cat >conftest.$ac_ext <<_ACEOF
11204/* confdefs.h. */
11205_ACEOF
11206cat confdefs.h >>conftest.$ac_ext
11207cat >>conftest.$ac_ext <<_ACEOF
11208/* end confdefs.h. */
11209$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011210 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011211int
11212main ()
11213{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011214static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011215test_array [0] = 0
11216
11217 ;
11218 return 0;
11219}
11220_ACEOF
11221rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011222if { (ac_try="$ac_compile"
11223case "(($ac_try" in
11224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11225 *) ac_try_echo=$ac_try;;
11226esac
11227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11228 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011229 ac_status=$?
11230 grep -v '^ *+' conftest.er1 >conftest.err
11231 rm -f conftest.er1
11232 cat conftest.err >&5
11233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011234 (exit $ac_status); } && {
11235 test -z "$ac_c_werror_flag" ||
11236 test ! -s conftest.err
11237 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011238 ac_lo=0 ac_mid=0
11239 while :; do
11240 cat >conftest.$ac_ext <<_ACEOF
11241/* confdefs.h. */
11242_ACEOF
11243cat confdefs.h >>conftest.$ac_ext
11244cat >>conftest.$ac_ext <<_ACEOF
11245/* end confdefs.h. */
11246$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011247 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011248int
11249main ()
11250{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011252test_array [0] = 0
11253
11254 ;
11255 return 0;
11256}
11257_ACEOF
11258rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011259if { (ac_try="$ac_compile"
11260case "(($ac_try" in
11261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11262 *) ac_try_echo=$ac_try;;
11263esac
11264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011266 ac_status=$?
11267 grep -v '^ *+' conftest.er1 >conftest.err
11268 rm -f conftest.er1
11269 cat conftest.err >&5
11270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011271 (exit $ac_status); } && {
11272 test -z "$ac_c_werror_flag" ||
11273 test ! -s conftest.err
11274 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011275 ac_hi=$ac_mid; break
11276else
11277 echo "$as_me: failed program was:" >&5
11278sed 's/^/| /' conftest.$ac_ext >&5
11279
Martin v. Löwiseba40652007-08-30 20:10:57 +000011280 ac_lo=`expr $ac_mid + 1`
11281 if test $ac_lo -le $ac_mid; then
11282 ac_lo= ac_hi=
11283 break
11284 fi
11285 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287
11288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011289 done
11290else
11291 echo "$as_me: failed program was:" >&5
11292sed 's/^/| /' conftest.$ac_ext >&5
11293
Martin v. Löwiseba40652007-08-30 20:10:57 +000011294 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011295/* confdefs.h. */
11296_ACEOF
11297cat confdefs.h >>conftest.$ac_ext
11298cat >>conftest.$ac_ext <<_ACEOF
11299/* end confdefs.h. */
11300$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011301 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011302int
11303main ()
11304{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011305static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011306test_array [0] = 0
11307
11308 ;
11309 return 0;
11310}
11311_ACEOF
11312rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011313if { (ac_try="$ac_compile"
11314case "(($ac_try" in
11315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11316 *) ac_try_echo=$ac_try;;
11317esac
11318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011320 ac_status=$?
11321 grep -v '^ *+' conftest.er1 >conftest.err
11322 rm -f conftest.er1
11323 cat conftest.err >&5
11324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011325 (exit $ac_status); } && {
11326 test -z "$ac_c_werror_flag" ||
11327 test ! -s conftest.err
11328 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011329 ac_hi=-1 ac_mid=-1
11330 while :; do
11331 cat >conftest.$ac_ext <<_ACEOF
11332/* confdefs.h. */
11333_ACEOF
11334cat confdefs.h >>conftest.$ac_ext
11335cat >>conftest.$ac_ext <<_ACEOF
11336/* end confdefs.h. */
11337$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011338 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011339int
11340main ()
11341{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011343test_array [0] = 0
11344
11345 ;
11346 return 0;
11347}
11348_ACEOF
11349rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011350if { (ac_try="$ac_compile"
11351case "(($ac_try" in
11352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11353 *) ac_try_echo=$ac_try;;
11354esac
11355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011357 ac_status=$?
11358 grep -v '^ *+' conftest.er1 >conftest.err
11359 rm -f conftest.er1
11360 cat conftest.err >&5
11361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011362 (exit $ac_status); } && {
11363 test -z "$ac_c_werror_flag" ||
11364 test ! -s conftest.err
11365 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011366 ac_lo=$ac_mid; break
11367else
11368 echo "$as_me: failed program was:" >&5
11369sed 's/^/| /' conftest.$ac_ext >&5
11370
Martin v. Löwiseba40652007-08-30 20:10:57 +000011371 ac_hi=`expr '(' $ac_mid ')' - 1`
11372 if test $ac_mid -le $ac_hi; then
11373 ac_lo= ac_hi=
11374 break
11375 fi
11376 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011378
11379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011380 done
11381else
11382 echo "$as_me: failed program was:" >&5
11383sed 's/^/| /' conftest.$ac_ext >&5
11384
Martin v. Löwiseba40652007-08-30 20:10:57 +000011385 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +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öwisaef4c6b2007-01-21 09:33:07 +000011389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011390
11391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011392# Binary search between lo and hi bounds.
11393while test "x$ac_lo" != "x$ac_hi"; do
11394 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11395 cat >conftest.$ac_ext <<_ACEOF
11396/* confdefs.h. */
11397_ACEOF
11398cat confdefs.h >>conftest.$ac_ext
11399cat >>conftest.$ac_ext <<_ACEOF
11400/* end confdefs.h. */
11401$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011402 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011403int
11404main ()
11405{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011407test_array [0] = 0
11408
11409 ;
11410 return 0;
11411}
11412_ACEOF
11413rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414if { (ac_try="$ac_compile"
11415case "(($ac_try" in
11416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11417 *) ac_try_echo=$ac_try;;
11418esac
11419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011421 ac_status=$?
11422 grep -v '^ *+' conftest.er1 >conftest.err
11423 rm -f conftest.er1
11424 cat conftest.err >&5
11425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011426 (exit $ac_status); } && {
11427 test -z "$ac_c_werror_flag" ||
11428 test ! -s conftest.err
11429 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011430 ac_hi=$ac_mid
11431else
11432 echo "$as_me: failed program was:" >&5
11433sed 's/^/| /' conftest.$ac_ext >&5
11434
Martin v. Löwiseba40652007-08-30 20:10:57 +000011435 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011437
11438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011439done
11440case $ac_lo in
11441?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011442'') if test "$ac_cv_type__Bool" = yes; then
11443 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011444See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011446See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011447 { (exit 77); exit 77; }; }
11448 else
11449 ac_cv_sizeof__Bool=0
11450 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011451esac
11452else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011453 cat >conftest.$ac_ext <<_ACEOF
11454/* confdefs.h. */
11455_ACEOF
11456cat confdefs.h >>conftest.$ac_ext
11457cat >>conftest.$ac_ext <<_ACEOF
11458/* end confdefs.h. */
11459$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460 typedef _Bool ac__type_sizeof_;
11461static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11462static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011463#include <stdio.h>
11464#include <stdlib.h>
11465int
11466main ()
11467{
11468
11469 FILE *f = fopen ("conftest.val", "w");
11470 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471 return 1;
11472 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011473 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474 long int i = longval ();
11475 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11476 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011477 fprintf (f, "%ld\n", i);
11478 }
11479 else
11480 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011481 unsigned long int i = ulongval ();
11482 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11483 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011484 fprintf (f, "%lu\n", i);
11485 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011486 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011487
11488 ;
11489 return 0;
11490}
11491_ACEOF
11492rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011493if { (ac_try="$ac_link"
11494case "(($ac_try" in
11495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11496 *) ac_try_echo=$ac_try;;
11497esac
11498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11499 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011500 ac_status=$?
11501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11502 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011503 { (case "(($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_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011509 ac_status=$?
11510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11511 (exit $ac_status); }; }; then
11512 ac_cv_sizeof__Bool=`cat conftest.val`
11513else
11514 echo "$as_me: program exited with status $ac_status" >&5
11515echo "$as_me: failed program was:" >&5
11516sed 's/^/| /' conftest.$ac_ext >&5
11517
11518( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011519if test "$ac_cv_type__Bool" = yes; then
11520 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011521See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011522echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011523See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011524 { (exit 77); exit 77; }; }
11525 else
11526 ac_cv_sizeof__Bool=0
11527 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011529rm -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 +000011530fi
11531rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011533{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11534echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11535
11536
11537
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011538cat >>confdefs.h <<_ACEOF
11539#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11540_ACEOF
11541
11542
11543fi
11544
Martin v. Löwiseba40652007-08-30 20:10:57 +000011545{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11546echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011547if test "${ac_cv_type_uintptr_t+set}" = set; then
11548 echo $ECHO_N "(cached) $ECHO_C" >&6
11549else
11550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011551/* confdefs.h. */
11552_ACEOF
11553cat confdefs.h >>conftest.$ac_ext
11554cat >>conftest.$ac_ext <<_ACEOF
11555/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011556#ifdef HAVE_STDINT_H
11557 #include <stdint.h>
11558 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011559
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011561int
11562main ()
11563{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011564if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011565 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011566if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011567 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 ;
11569 return 0;
11570}
11571_ACEOF
11572rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011573if { (ac_try="$ac_compile"
11574case "(($ac_try" in
11575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11576 *) ac_try_echo=$ac_try;;
11577esac
11578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011581 grep -v '^ *+' conftest.er1 >conftest.err
11582 rm -f conftest.er1
11583 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011585 (exit $ac_status); } && {
11586 test -z "$ac_c_werror_flag" ||
11587 test ! -s conftest.err
11588 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011589 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011590else
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011592sed 's/^/| /' conftest.$ac_ext >&5
11593
Martin v. Löwiseba40652007-08-30 20:10:57 +000011594 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011596
11597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011599{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11600echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011601if test $ac_cv_type_uintptr_t = yes; then
11602
11603cat >>confdefs.h <<_ACEOF
11604#define HAVE_UINTPTR_T 1
11605_ACEOF
11606
Martin v. Löwiseba40652007-08-30 20:10:57 +000011607{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11608echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011609if test "${ac_cv_type_uintptr_t+set}" = set; then
11610 echo $ECHO_N "(cached) $ECHO_C" >&6
11611else
11612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011613/* confdefs.h. */
11614_ACEOF
11615cat confdefs.h >>conftest.$ac_ext
11616cat >>conftest.$ac_ext <<_ACEOF
11617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011618$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011619typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011620int
11621main ()
11622{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011623if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011624 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011625if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011626 return 0;
11627 ;
11628 return 0;
11629}
11630_ACEOF
11631rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011632if { (ac_try="$ac_compile"
11633case "(($ac_try" in
11634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11635 *) ac_try_echo=$ac_try;;
11636esac
11637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011640 grep -v '^ *+' conftest.er1 >conftest.err
11641 rm -f conftest.er1
11642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011644 (exit $ac_status); } && {
11645 test -z "$ac_c_werror_flag" ||
11646 test ! -s conftest.err
11647 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 ac_cv_type_uintptr_t=yes
11649else
11650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011651sed 's/^/| /' conftest.$ac_ext >&5
11652
Martin v. Löwiseba40652007-08-30 20:10:57 +000011653 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011654fi
Brett Cannon19fab762007-06-02 03:02:29 +000011655
Martin v. Löwiseba40652007-08-30 20:10:57 +000011656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11657fi
11658{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11659echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11660
11661# The cast to long int works around a bug in the HP C Compiler
11662# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11663# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11664# This bug is HP SR number 8606223364.
11665{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11666echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011667if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11668 echo $ECHO_N "(cached) $ECHO_C" >&6
11669else
Martin v. Löwis11437992002-04-12 09:54:03 +000011670 if test "$cross_compiling" = yes; then
11671 # Depending upon the size, compute the lo and hi bounds.
11672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011673/* confdefs.h. */
11674_ACEOF
11675cat confdefs.h >>conftest.$ac_ext
11676cat >>conftest.$ac_ext <<_ACEOF
11677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011678$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011679 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011680int
11681main ()
11682{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011683static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011684test_array [0] = 0
11685
11686 ;
11687 return 0;
11688}
11689_ACEOF
11690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011691if { (ac_try="$ac_compile"
11692case "(($ac_try" in
11693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11694 *) ac_try_echo=$ac_try;;
11695esac
11696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011699 grep -v '^ *+' conftest.er1 >conftest.err
11700 rm -f conftest.er1
11701 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011703 (exit $ac_status); } && {
11704 test -z "$ac_c_werror_flag" ||
11705 test ! -s conftest.err
11706 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011707 ac_lo=0 ac_mid=0
11708 while :; do
11709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011710/* confdefs.h. */
11711_ACEOF
11712cat confdefs.h >>conftest.$ac_ext
11713cat >>conftest.$ac_ext <<_ACEOF
11714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011715$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011716 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011717int
11718main ()
11719{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011720static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011721test_array [0] = 0
11722
11723 ;
11724 return 0;
11725}
11726_ACEOF
11727rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011728if { (ac_try="$ac_compile"
11729case "(($ac_try" in
11730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11731 *) ac_try_echo=$ac_try;;
11732esac
11733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011736 grep -v '^ *+' conftest.er1 >conftest.err
11737 rm -f conftest.er1
11738 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011740 (exit $ac_status); } && {
11741 test -z "$ac_c_werror_flag" ||
11742 test ! -s conftest.err
11743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011744 ac_hi=$ac_mid; break
11745else
11746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011747sed 's/^/| /' conftest.$ac_ext >&5
11748
Martin v. Löwiseba40652007-08-30 20:10:57 +000011749 ac_lo=`expr $ac_mid + 1`
11750 if test $ac_lo -le $ac_mid; then
11751 ac_lo= ac_hi=
11752 break
11753 fi
11754 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011756
11757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011758 done
11759else
11760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011761sed 's/^/| /' conftest.$ac_ext >&5
11762
Martin v. Löwiseba40652007-08-30 20:10:57 +000011763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011764/* confdefs.h. */
11765_ACEOF
11766cat confdefs.h >>conftest.$ac_ext
11767cat >>conftest.$ac_ext <<_ACEOF
11768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011769$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011770 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011771int
11772main ()
11773{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011774static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011775test_array [0] = 0
11776
11777 ;
11778 return 0;
11779}
11780_ACEOF
11781rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011782if { (ac_try="$ac_compile"
11783case "(($ac_try" in
11784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11785 *) ac_try_echo=$ac_try;;
11786esac
11787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11788 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011790 grep -v '^ *+' conftest.er1 >conftest.err
11791 rm -f conftest.er1
11792 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011794 (exit $ac_status); } && {
11795 test -z "$ac_c_werror_flag" ||
11796 test ! -s conftest.err
11797 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011798 ac_hi=-1 ac_mid=-1
11799 while :; do
11800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011801/* confdefs.h. */
11802_ACEOF
11803cat confdefs.h >>conftest.$ac_ext
11804cat >>conftest.$ac_ext <<_ACEOF
11805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011806$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011807 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011808int
11809main ()
11810{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011812test_array [0] = 0
11813
11814 ;
11815 return 0;
11816}
11817_ACEOF
11818rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011819if { (ac_try="$ac_compile"
11820case "(($ac_try" in
11821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11822 *) ac_try_echo=$ac_try;;
11823esac
11824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011827 grep -v '^ *+' conftest.er1 >conftest.err
11828 rm -f conftest.er1
11829 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011831 (exit $ac_status); } && {
11832 test -z "$ac_c_werror_flag" ||
11833 test ! -s conftest.err
11834 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011835 ac_lo=$ac_mid; break
11836else
11837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011838sed 's/^/| /' conftest.$ac_ext >&5
11839
Martin v. Löwiseba40652007-08-30 20:10:57 +000011840 ac_hi=`expr '(' $ac_mid ')' - 1`
11841 if test $ac_mid -le $ac_hi; then
11842 ac_lo= ac_hi=
11843 break
11844 fi
11845 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011847
11848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011849 done
11850else
11851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011852sed 's/^/| /' conftest.$ac_ext >&5
11853
Martin v. Löwiseba40652007-08-30 20:10:57 +000011854 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011856
11857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011859
11860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011861# Binary search between lo and hi bounds.
11862while test "x$ac_lo" != "x$ac_hi"; do
11863 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011865/* confdefs.h. */
11866_ACEOF
11867cat confdefs.h >>conftest.$ac_ext
11868cat >>conftest.$ac_ext <<_ACEOF
11869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011870$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011871 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011872int
11873main ()
11874{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011875static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011876test_array [0] = 0
11877
11878 ;
11879 return 0;
11880}
11881_ACEOF
11882rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011883if { (ac_try="$ac_compile"
11884case "(($ac_try" in
11885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11886 *) ac_try_echo=$ac_try;;
11887esac
11888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011891 grep -v '^ *+' conftest.er1 >conftest.err
11892 rm -f conftest.er1
11893 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011895 (exit $ac_status); } && {
11896 test -z "$ac_c_werror_flag" ||
11897 test ! -s conftest.err
11898 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011899 ac_hi=$ac_mid
11900else
11901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011902sed 's/^/| /' conftest.$ac_ext >&5
11903
Martin v. Löwiseba40652007-08-30 20:10:57 +000011904 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011906
11907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011908done
11909case $ac_lo in
11910?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011911'') if test "$ac_cv_type_uintptr_t" = yes; then
11912 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011913See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011914echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011915See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011916 { (exit 77); exit 77; }; }
11917 else
11918 ac_cv_sizeof_uintptr_t=0
11919 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011920esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011921else
Martin v. Löwis11437992002-04-12 09:54:03 +000011922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011923/* confdefs.h. */
11924_ACEOF
11925cat confdefs.h >>conftest.$ac_ext
11926cat >>conftest.$ac_ext <<_ACEOF
11927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011928$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011929 typedef uintptr_t ac__type_sizeof_;
11930static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11931static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011932#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011933#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011934int
11935main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011936{
Martin v. Löwis11437992002-04-12 09:54:03 +000011937
11938 FILE *f = fopen ("conftest.val", "w");
11939 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011940 return 1;
11941 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011942 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011943 long int i = longval ();
11944 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11945 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011946 fprintf (f, "%ld\n", i);
11947 }
11948 else
11949 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011950 unsigned long int i = ulongval ();
11951 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11952 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011953 fprintf (f, "%lu\n", i);
11954 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011955 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011956
11957 ;
11958 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011959}
Martin v. Löwis11437992002-04-12 09:54:03 +000011960_ACEOF
11961rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011962if { (ac_try="$ac_link"
11963case "(($ac_try" in
11964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11965 *) ac_try_echo=$ac_try;;
11966esac
11967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11968 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011969 ac_status=$?
11970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11971 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011972 { (case "(($ac_try" in
11973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11974 *) ac_try_echo=$ac_try;;
11975esac
11976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11977 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011978 ac_status=$?
11979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11980 (exit $ac_status); }; }; then
11981 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011982else
Martin v. Löwis11437992002-04-12 09:54:03 +000011983 echo "$as_me: program exited with status $ac_status" >&5
11984echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011985sed 's/^/| /' conftest.$ac_ext >&5
11986
Martin v. Löwis11437992002-04-12 09:54:03 +000011987( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011988if test "$ac_cv_type_uintptr_t" = yes; then
11989 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011990See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011991echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011992See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011993 { (exit 77); exit 77; }; }
11994 else
11995 ac_cv_sizeof_uintptr_t=0
11996 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011998rm -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 +000011999fi
12000rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012002{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12003echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12004
12005
12006
Martin v. Löwis11437992002-04-12 09:54:03 +000012007cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012008#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012009_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012010
Michael W. Hudson54241132001-12-07 15:38:26 +000012011
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012012fi
12013
Martin v. Löwisebe26702006-10-02 14:55:51 +000012014
12015
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012016# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012017{ echo "$as_me:$LINENO: checking size of off_t" >&5
12018echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012019if test "${ac_cv_sizeof_off_t+set}" = set; then
12020 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012021else
12022 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012023 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012024else
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012026/* confdefs.h. */
12027_ACEOF
12028cat confdefs.h >>conftest.$ac_ext
12029cat >>conftest.$ac_ext <<_ACEOF
12030/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012031#include <stdio.h>
12032#include <sys/types.h>
12033main()
12034{
12035 FILE *f=fopen("conftestval", "w");
12036 if (!f) exit(1);
12037 fprintf(f, "%d\n", sizeof(off_t));
12038 exit(0);
12039}
Martin v. Löwis11437992002-04-12 09:54:03 +000012040_ACEOF
12041rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012042if { (ac_try="$ac_link"
12043case "(($ac_try" in
12044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12045 *) ac_try_echo=$ac_try;;
12046esac
12047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12048 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012049 ac_status=$?
12050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12051 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012052 { (case "(($ac_try" in
12053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12054 *) ac_try_echo=$ac_try;;
12055esac
12056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12057 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 ac_status=$?
12059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12060 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012061 ac_cv_sizeof_off_t=`cat conftestval`
12062else
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 echo "$as_me: program exited with status $ac_status" >&5
12064echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012065sed 's/^/| /' conftest.$ac_ext >&5
12066
Martin v. Löwis11437992002-04-12 09:54:03 +000012067( exit $ac_status )
12068ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012070rm -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 +000012071fi
12072
Martin v. Löwiseba40652007-08-30 20:10:57 +000012073
12074
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012075fi
12076
Martin v. Löwiseba40652007-08-30 20:10:57 +000012077{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12078echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012079
12080cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012081#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012082_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012083
Michael W. Hudson54241132001-12-07 15:38:26 +000012084
Martin v. Löwiseba40652007-08-30 20:10:57 +000012085{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12086echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012087if test "$have_long_long" = yes -a \
12088 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12089 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012090
Martin v. Löwis11437992002-04-12 09:54:03 +000012091cat >>confdefs.h <<\_ACEOF
12092#define HAVE_LARGEFILE_SUPPORT 1
12093_ACEOF
12094
Martin v. Löwiseba40652007-08-30 20:10:57 +000012095 { echo "$as_me:$LINENO: result: yes" >&5
12096echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012097else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012098 { echo "$as_me:$LINENO: result: no" >&5
12099echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012100fi
12101
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012102# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012103{ echo "$as_me:$LINENO: checking size of time_t" >&5
12104echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012105if test "${ac_cv_sizeof_time_t+set}" = set; then
12106 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012107else
12108 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012109 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012110else
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012112/* confdefs.h. */
12113_ACEOF
12114cat confdefs.h >>conftest.$ac_ext
12115cat >>conftest.$ac_ext <<_ACEOF
12116/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012117#include <stdio.h>
12118#include <time.h>
12119main()
12120{
12121 FILE *f=fopen("conftestval", "w");
12122 if (!f) exit(1);
12123 fprintf(f, "%d\n", sizeof(time_t));
12124 exit(0);
12125}
Martin v. Löwis11437992002-04-12 09:54:03 +000012126_ACEOF
12127rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012128if { (ac_try="$ac_link"
12129case "(($ac_try" in
12130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12131 *) ac_try_echo=$ac_try;;
12132esac
12133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12134 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 ac_status=$?
12136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12137 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012138 { (case "(($ac_try" in
12139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12140 *) ac_try_echo=$ac_try;;
12141esac
12142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12143 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 ac_status=$?
12145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12146 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012147 ac_cv_sizeof_time_t=`cat conftestval`
12148else
Martin v. Löwis11437992002-04-12 09:54:03 +000012149 echo "$as_me: program exited with status $ac_status" >&5
12150echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012151sed 's/^/| /' conftest.$ac_ext >&5
12152
Martin v. Löwis11437992002-04-12 09:54:03 +000012153( exit $ac_status )
12154ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012156rm -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 +000012157fi
12158
Martin v. Löwiseba40652007-08-30 20:10:57 +000012159
12160
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012161fi
12162
Martin v. Löwiseba40652007-08-30 20:10:57 +000012163{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12164echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
12166cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012167#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012168_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012169
Michael W. Hudson54241132001-12-07 15:38:26 +000012170
12171
Trent Mick635f6fb2000-08-23 21:33:05 +000012172# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012173ac_save_cc="$CC"
12174if test "$ac_cv_kpthread" = "yes"
12175then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012176elif test "$ac_cv_kthread" = "yes"
12177then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012178elif test "$ac_cv_pthread" = "yes"
12179then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012181{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12182echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012183have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012185/* confdefs.h. */
12186_ACEOF
12187cat confdefs.h >>conftest.$ac_ext
12188cat >>conftest.$ac_ext <<_ACEOF
12189/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012190#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012191int
12192main ()
12193{
Guido van Rossum12580492000-09-24 16:47:19 +000012194pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 ;
12196 return 0;
12197}
12198_ACEOF
12199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012200if { (ac_try="$ac_compile"
12201case "(($ac_try" in
12202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12203 *) ac_try_echo=$ac_try;;
12204esac
12205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012208 grep -v '^ *+' conftest.er1 >conftest.err
12209 rm -f conftest.er1
12210 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012212 (exit $ac_status); } && {
12213 test -z "$ac_c_werror_flag" ||
12214 test ! -s conftest.err
12215 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012216 have_pthread_t=yes
12217else
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012219sed 's/^/| /' conftest.$ac_ext >&5
12220
Martin v. Löwiseba40652007-08-30 20:10:57 +000012221
Trent Mick635f6fb2000-08-23 21:33:05 +000012222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012223
12224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12225{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12226echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012227if test "$have_pthread_t" = yes ; then
12228 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012229 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12230echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012231 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12232 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012233else
12234 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012235 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012236else
Martin v. Löwis11437992002-04-12 09:54:03 +000012237 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012238/* confdefs.h. */
12239_ACEOF
12240cat confdefs.h >>conftest.$ac_ext
12241cat >>conftest.$ac_ext <<_ACEOF
12242/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012243#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012244#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012245 main()
12246 {
12247 FILE *f=fopen("conftestval", "w");
12248 if (!f) exit(1);
12249 fprintf(f, "%d\n", sizeof(pthread_t));
12250 exit(0);
12251 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012252_ACEOF
12253rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012254if { (ac_try="$ac_link"
12255case "(($ac_try" in
12256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12257 *) ac_try_echo=$ac_try;;
12258esac
12259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12260 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 ac_status=$?
12262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12263 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012264 { (case "(($ac_try" in
12265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12266 *) ac_try_echo=$ac_try;;
12267esac
12268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12269 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012270 ac_status=$?
12271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12272 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012273 ac_cv_sizeof_pthread_t=`cat conftestval`
12274else
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 echo "$as_me: program exited with status $ac_status" >&5
12276echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012277sed 's/^/| /' conftest.$ac_ext >&5
12278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279( exit $ac_status )
12280ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012282rm -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 +000012283fi
12284
Martin v. Löwiseba40652007-08-30 20:10:57 +000012285
12286
Trent Mick635f6fb2000-08-23 21:33:05 +000012287fi
12288
Martin v. Löwiseba40652007-08-30 20:10:57 +000012289 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12290echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012291
12292cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012293#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012294_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012295
12296fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012297CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012298
Martin v. Löwiseba40652007-08-30 20:10:57 +000012299{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12300echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12301# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012302if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012303 enableval=$enable_toolbox_glue;
12304fi
Jack Jansene578a632001-08-15 01:27:14 +000012305
12306
12307if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012308then
Jack Jansene578a632001-08-15 01:27:14 +000012309 case $ac_sys_system/$ac_sys_release in
12310 Darwin/*)
12311 enable_toolbox_glue="yes";;
12312 *)
12313 enable_toolbox_glue="no";;
12314 esac
12315fi
12316case "$enable_toolbox_glue" in
12317yes)
Jack Jansene578a632001-08-15 01:27:14 +000012318 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012319 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012320
12321cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012322#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012323_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012324
12325 ;;
12326*)
Jack Jansene578a632001-08-15 01:27:14 +000012327 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012328 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012329 ;;
12330esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012331{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12332echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012333
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012334
12335case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012336 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012337 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12338 ;;
12339 Darwin/*)
12340 OTHER_LIBTOOL_OPT=""
12341 ;;
12342esac
12343
12344
12345case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012346 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012347 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12348 if test "${enable_universalsdk}"; then
12349 :
12350 else
12351 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12352 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012353 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012354 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012355 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012356 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12357 if test ${gcc_version} '<' 4.0
12358 then
12359 LIBTOOL_CRUFT="-lcc_dynamic"
12360 else
12361 LIBTOOL_CRUFT=""
12362 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012363 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012364 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012365 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012366esac
12367
Martin v. Löwiseba40652007-08-30 20:10:57 +000012368{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12369echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012370if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012371then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012372 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012373 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012374 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012375
Martin v. Löwis11437992002-04-12 09:54:03 +000012376cat >>confdefs.h <<\_ACEOF
12377#define WITH_NEXT_FRAMEWORK 1
12378_ACEOF
12379
Martin v. Löwiseba40652007-08-30 20:10:57 +000012380 { echo "$as_me:$LINENO: result: yes" >&5
12381echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012382else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012383 { echo "$as_me:$LINENO: result: no" >&5
12384echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012385fi
12386
Martin v. Löwiseba40652007-08-30 20:10:57 +000012387{ echo "$as_me:$LINENO: checking for dyld" >&5
12388echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012389case $ac_sys_system/$ac_sys_release in
12390 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012391
Martin v. Löwis11437992002-04-12 09:54:03 +000012392cat >>confdefs.h <<\_ACEOF
12393#define WITH_DYLD 1
12394_ACEOF
12395
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12397echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012398 ;;
12399 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012400 { echo "$as_me:$LINENO: result: no" >&5
12401echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012402 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012403esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012404
Guido van Rossum0a516c91994-09-12 10:58:40 +000012405# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012406
Michael W. Hudson54241132001-12-07 15:38:26 +000012407
12408
12409
12410
Guido van Rossum0a516c91994-09-12 10:58:40 +000012411# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012412# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012413{ echo "$as_me:$LINENO: checking SO" >&5
12414echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012415if test -z "$SO"
12416then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012417 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012418 hp*|HP*)
12419 case `uname -m` in
12420 ia64) SO=.so;;
12421 *) SO=.sl;;
12422 esac
12423 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012424 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012425 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012426 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012427else
12428 # this might also be a termcap variable, see #610332
12429 echo
12430 echo '====================================================================='
12431 echo '+ +'
12432 echo '+ WARNING: You have set SO in your environment. +'
12433 echo '+ Do you really mean to change the extension for shared libraries? +'
12434 echo '+ Continuing in 10 seconds to let you to ponder. +'
12435 echo '+ +'
12436 echo '====================================================================='
12437 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012439{ echo "$as_me:$LINENO: result: $SO" >&5
12440echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012441
12442cat >>confdefs.h <<_ACEOF
12443#define SHLIB_EXT "$SO"
12444_ACEOF
12445
Guido van Rossum0a516c91994-09-12 10:58:40 +000012446# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012447# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012448# (Shared libraries in this instance are shared modules to be loaded into
12449# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012450{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12451echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012452if test -z "$LDSHARED"
12453then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012454 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012455 AIX*)
12456 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012457 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012458 ;;
12459 BeOS*)
12460 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012461 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012462 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012463 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012464 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012466 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012467 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012468 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012469 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000012470 hp*|HP*)
12471 if test "$GCC" = "yes"
12472 then LDSHARED='$(CC) -shared'
12473 else LDSHARED='ld -b';
12474 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012475 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012476 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012477 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12478 if test "$enable_framework" ; then
12479 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012480 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12481 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012482 else
12483 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012484 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012485 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012486 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012487 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12488 if test "$enable_framework" ; then
12489 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012490 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12491 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012492 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012493 # No framework, use the Python app as bundle-loader
12494 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012495 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012496 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012497 Darwin/*)
12498 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12499 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012500 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012501 if test ${cur_target} '>' 10.2; then
12502 cur_target=10.3
12503 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012504 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012505
12506 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12507 # environment with a value that is the same as what we'll use
12508 # in the Makefile to ensure that we'll get the same compiler
12509 # environment during configure and build time.
12510 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12511 export MACOSX_DEPLOYMENT_TARGET
12512
Ronald Oussoren988117f2006-04-29 11:31:35 +000012513 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012514 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012515 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012516 if test "${enable_universalsdk}"; then
12517 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12518 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012519 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12520 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012521 else
12522 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12523 if test "$enable_framework" ; then
12524 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012525 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12526 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012527 else
12528 # No framework, use the Python app as bundle-loader
12529 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12530 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12531 fi
12532 fi
12533 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012534 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012535 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012536 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012537 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012538 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012539 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012540 else
12541 LDSHARED="ld -Bshareable ${LDFLAGS}"
12542 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012543 OpenBSD*)
12544 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12545 then
12546 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12547 else
12548 case `uname -r` in
12549 [01].* | 2.[0-7] | 2.[0-7].*)
12550 LDSHARED="ld -Bshareable ${LDFLAGS}"
12551 ;;
12552 *)
12553 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12554 ;;
12555 esac
12556 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012557 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012558 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012559 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012560 then LDSHARED='$(CC) -shared'
12561 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012562 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012563 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012564 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012565 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012566 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012567 *) LDSHARED="ld";;
12568 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12571echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012572BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012573# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012574# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012575{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12576echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012577if test -z "$CCSHARED"
12578then
Guido van Rossum07397971997-04-29 21:49:50 +000012579 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012580 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012581 then CCSHARED="-fPIC";
12582 elif test `uname -p` = sparc;
12583 then CCSHARED="-xcode=pic32";
12584 else CCSHARED="-Kpic";
12585 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012586 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012587 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012588 else CCSHARED="+z";
12589 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012590 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012591 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012592 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012593 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012594 if test "$GCC" = "yes"
12595 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012596 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012597 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012598 SCO_SV*)
12599 if test "$GCC" = "yes"
12600 then CCSHARED="-fPIC"
12601 else CCSHARED="-Kpic -belf"
12602 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012603 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012604 IRIX*/6*) case $CC in
12605 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012606 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012607 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012608 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012609 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012611{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12612echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012613# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012614# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012615{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12616echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012617if test -z "$LINKFORSHARED"
12618then
Guido van Rossum07397971997-04-29 21:49:50 +000012619 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012620 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012621 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012622 LINKFORSHARED="-Wl,-E -Wl,+s";;
12623# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012624 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012625 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012626 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012628 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12629 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012630 # not used by the core itself but which needs to be in the core so
12631 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012632 # -prebind is no longer used, because it actually seems to give a
12633 # slowdown in stead of a speedup, maybe due to the large number of
12634 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012635
12636 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012637 if test "$enable_framework"
12638 then
Jack Jansenda49e192005-01-07 13:08:22 +000012639 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012640 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012641 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012642 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012643 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012644 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012645 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012646 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12647 then
12648 LINKFORSHARED="-Wl,--export-dynamic"
12649 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012650 SunOS/5*) case $CC in
12651 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012652 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012653 then
12654 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012655 fi;;
12656 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012657 CYGWIN*)
12658 if test $enable_shared = "no"
12659 then
12660 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12661 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012662 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012664{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12665echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012666
Michael W. Hudson54241132001-12-07 15:38:26 +000012667
Martin v. Löwiseba40652007-08-30 20:10:57 +000012668{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12669echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012670if test ! "$LIBRARY" = "$LDLIBRARY"
12671then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012672 case $ac_sys_system in
12673 CYGWIN*)
12674 # Cygwin needs CCSHARED when building extension DLLs
12675 # but not when building the interpreter DLL.
12676 CFLAGSFORSHARED='';;
12677 *)
12678 CFLAGSFORSHARED='$(CCSHARED)'
12679 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012681{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12682echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012683
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012684# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12685# library (with --enable-shared).
12686# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012687# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12688# if it is not required, since it creates a dependency of the shared library
12689# to LIBS. This, in turn, means that applications linking the shared libpython
12690# don't need to link LIBS explicitly. The default should be only changed
12691# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012692
Martin v. Löwiseba40652007-08-30 20:10:57 +000012693{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12694echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012695case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012696 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012697 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012698esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012699{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12700echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012701
12702
Guido van Rossum627b2d71993-12-24 10:39:16 +000012703# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012704
Martin v. Löwiseba40652007-08-30 20:10:57 +000012705{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12706echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012707if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12708 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012709else
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012711LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012713/* confdefs.h. */
12714_ACEOF
12715cat confdefs.h >>conftest.$ac_ext
12716cat >>conftest.$ac_ext <<_ACEOF
12717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012718
Martin v. Löwiseba40652007-08-30 20:10:57 +000012719/* Override any GCC internal prototype to avoid an error.
12720 Use char because int might match the return type of a GCC
12721 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012722#ifdef __cplusplus
12723extern "C"
12724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012725char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012726int
12727main ()
12728{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012729return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012730 ;
12731 return 0;
12732}
12733_ACEOF
12734rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012735if { (ac_try="$ac_link"
12736case "(($ac_try" in
12737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12738 *) ac_try_echo=$ac_try;;
12739esac
12740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12741 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012743 grep -v '^ *+' conftest.er1 >conftest.err
12744 rm -f conftest.er1
12745 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012747 (exit $ac_status); } && {
12748 test -z "$ac_c_werror_flag" ||
12749 test ! -s conftest.err
12750 } && test -s conftest$ac_exeext &&
12751 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012752 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012753else
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012755sed 's/^/| /' conftest.$ac_ext >&5
12756
Martin v. Löwiseba40652007-08-30 20:10:57 +000012757 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012758fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012759
12760rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012761 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012762LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012764{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12765echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012766if test $ac_cv_lib_dl_dlopen = yes; then
12767 cat >>confdefs.h <<_ACEOF
12768#define HAVE_LIBDL 1
12769_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012770
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012771 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012772
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012773fi
12774 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Martin v. Löwiseba40652007-08-30 20:10:57 +000012776{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12777echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012778if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12779 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012780else
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012782LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012783cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012784/* confdefs.h. */
12785_ACEOF
12786cat confdefs.h >>conftest.$ac_ext
12787cat >>conftest.$ac_ext <<_ACEOF
12788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012789
Martin v. Löwiseba40652007-08-30 20:10:57 +000012790/* Override any GCC internal prototype to avoid an error.
12791 Use char because int might match the return type of a GCC
12792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012793#ifdef __cplusplus
12794extern "C"
12795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012796char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012797int
12798main ()
12799{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012800return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ;
12802 return 0;
12803}
12804_ACEOF
12805rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012806if { (ac_try="$ac_link"
12807case "(($ac_try" in
12808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12809 *) ac_try_echo=$ac_try;;
12810esac
12811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12812 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012814 grep -v '^ *+' conftest.er1 >conftest.err
12815 rm -f conftest.er1
12816 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012818 (exit $ac_status); } && {
12819 test -z "$ac_c_werror_flag" ||
12820 test ! -s conftest.err
12821 } && test -s conftest$ac_exeext &&
12822 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012823 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012824else
Martin v. Löwis11437992002-04-12 09:54:03 +000012825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012826sed 's/^/| /' conftest.$ac_ext >&5
12827
Martin v. Löwiseba40652007-08-30 20:10:57 +000012828 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012830
12831rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012833LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012835{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12836echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012837if test $ac_cv_lib_dld_shl_load = yes; then
12838 cat >>confdefs.h <<_ACEOF
12839#define HAVE_LIBDLD 1
12840_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012841
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012842 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012843
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012844fi
12845 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012846
12847# only check for sem_ini if thread support is requested
12848if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012849 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12850echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012851if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012853else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012854 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012855cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012856/* confdefs.h. */
12857_ACEOF
12858cat confdefs.h >>conftest.$ac_ext
12859cat >>conftest.$ac_ext <<_ACEOF
12860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012861
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862/* Override any GCC internal prototype to avoid an error.
12863 Use char because int might match the return type of a GCC
12864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012865#ifdef __cplusplus
12866extern "C"
12867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012868char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012869int
12870main ()
12871{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012872return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 ;
12874 return 0;
12875}
12876_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012877for ac_lib in '' pthread rt posix4; do
12878 if test -z "$ac_lib"; then
12879 ac_res="none required"
12880 else
12881 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012882 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012883 fi
12884 rm -f conftest.$ac_objext conftest$ac_exeext
12885if { (ac_try="$ac_link"
12886case "(($ac_try" in
12887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12888 *) ac_try_echo=$ac_try;;
12889esac
12890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12891 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012892 ac_status=$?
12893 grep -v '^ *+' conftest.er1 >conftest.err
12894 rm -f conftest.er1
12895 cat conftest.err >&5
12896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012897 (exit $ac_status); } && {
12898 test -z "$ac_c_werror_flag" ||
12899 test ! -s conftest.err
12900 } && test -s conftest$ac_exeext &&
12901 $as_test_x conftest$ac_exeext; then
12902 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012903else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012904 echo "$as_me: failed program was:" >&5
12905sed 's/^/| /' conftest.$ac_ext >&5
12906
Martin v. Löwiseba40652007-08-30 20:10:57 +000012907
Brett Cannon19fab762007-06-02 03:02:29 +000012908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012909
12910rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12911 conftest$ac_exeext
12912 if test "${ac_cv_search_sem_init+set}" = set; then
12913 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012915done
12916if test "${ac_cv_search_sem_init+set}" = set; then
12917 :
12918else
12919 ac_cv_search_sem_init=no
12920fi
12921rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012922LIBS=$ac_func_search_save_LIBS
12923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012924{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12925echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12926ac_res=$ac_cv_search_sem_init
12927if test "$ac_res" != no; then
12928 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012929
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012930fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012931 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012932 # posix4 on Solaris 2.6
12933 # pthread (first!) on Linux
12934fi
12935
Martin v. Löwis19d17342003-06-14 21:03:05 +000012936# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012937{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12938echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012939if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12940 echo $ECHO_N "(cached) $ECHO_C" >&6
12941else
12942 ac_check_lib_save_LIBS=$LIBS
12943LIBS="-lintl $LIBS"
12944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012945/* confdefs.h. */
12946_ACEOF
12947cat confdefs.h >>conftest.$ac_ext
12948cat >>conftest.$ac_ext <<_ACEOF
12949/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012950
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951/* Override any GCC internal prototype to avoid an error.
12952 Use char because int might match the return type of a GCC
12953 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012954#ifdef __cplusplus
12955extern "C"
12956#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012957char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012958int
12959main ()
12960{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012962 ;
12963 return 0;
12964}
12965_ACEOF
12966rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012967if { (ac_try="$ac_link"
12968case "(($ac_try" in
12969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12970 *) ac_try_echo=$ac_try;;
12971esac
12972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12973 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012975 grep -v '^ *+' conftest.er1 >conftest.err
12976 rm -f conftest.er1
12977 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012979 (exit $ac_status); } && {
12980 test -z "$ac_c_werror_flag" ||
12981 test ! -s conftest.err
12982 } && test -s conftest$ac_exeext &&
12983 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012984 ac_cv_lib_intl_textdomain=yes
12985else
12986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012987sed 's/^/| /' conftest.$ac_ext >&5
12988
Martin v. Löwiseba40652007-08-30 20:10:57 +000012989 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012991
12992rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012993 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012994LIBS=$ac_check_lib_save_LIBS
12995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012996{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12997echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012998if test $ac_cv_lib_intl_textdomain = yes; then
12999
13000cat >>confdefs.h <<\_ACEOF
13001#define WITH_LIBINTL 1
13002_ACEOF
13003
13004fi
13005
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013006
13007# checks for system dependent C++ extensions support
13008case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013009 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13010echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013012/* confdefs.h. */
13013_ACEOF
13014cat confdefs.h >>conftest.$ac_ext
13015cat >>conftest.$ac_ext <<_ACEOF
13016/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013017#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013018int
13019main ()
13020{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013021loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 ;
13023 return 0;
13024}
13025_ACEOF
13026rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013027if { (ac_try="$ac_link"
13028case "(($ac_try" in
13029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13030 *) ac_try_echo=$ac_try;;
13031esac
13032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13033 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013035 grep -v '^ *+' conftest.er1 >conftest.err
13036 rm -f conftest.er1
13037 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013039 (exit $ac_status); } && {
13040 test -z "$ac_c_werror_flag" ||
13041 test ! -s conftest.err
13042 } && test -s conftest$ac_exeext &&
13043 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013044
Martin v. Löwis11437992002-04-12 09:54:03 +000013045cat >>confdefs.h <<\_ACEOF
13046#define AIX_GENUINE_CPLUSPLUS 1
13047_ACEOF
13048
Martin v. Löwiseba40652007-08-30 20:10:57 +000013049 { echo "$as_me:$LINENO: result: yes" >&5
13050echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013051else
Martin v. Löwis11437992002-04-12 09:54:03 +000013052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013053sed 's/^/| /' conftest.$ac_ext >&5
13054
Martin v. Löwiseba40652007-08-30 20:10:57 +000013055 { echo "$as_me:$LINENO: result: no" >&5
13056echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013058
13059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013060 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013061 *) ;;
13062esac
13063
Guido van Rossum70c7f481998-03-26 18:44:10 +000013064# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013065# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013066{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13067echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013068if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13069 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013070else
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013072LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013073cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013074/* confdefs.h. */
13075_ACEOF
13076cat confdefs.h >>conftest.$ac_ext
13077cat >>conftest.$ac_ext <<_ACEOF
13078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013079
Martin v. Löwiseba40652007-08-30 20:10:57 +000013080/* Override any GCC internal prototype to avoid an error.
13081 Use char because int might match the return type of a GCC
13082 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013083#ifdef __cplusplus
13084extern "C"
13085#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013086char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013087int
13088main ()
13089{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013090return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 ;
13092 return 0;
13093}
13094_ACEOF
13095rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013096if { (ac_try="$ac_link"
13097case "(($ac_try" in
13098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13099 *) ac_try_echo=$ac_try;;
13100esac
13101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13102 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013104 grep -v '^ *+' conftest.er1 >conftest.err
13105 rm -f conftest.er1
13106 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013108 (exit $ac_status); } && {
13109 test -z "$ac_c_werror_flag" ||
13110 test ! -s conftest.err
13111 } && test -s conftest$ac_exeext &&
13112 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013113 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013114else
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013116sed 's/^/| /' conftest.$ac_ext >&5
13117
Martin v. Löwiseba40652007-08-30 20:10:57 +000013118 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013120
13121rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013123LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013125{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13126echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013127if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013128 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013129fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013130 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013131{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13132echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013133if test "${ac_cv_lib_socket_socket+set}" = set; then
13134 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013135else
Martin v. Löwis11437992002-04-12 09:54:03 +000013136 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013137LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013139/* confdefs.h. */
13140_ACEOF
13141cat confdefs.h >>conftest.$ac_ext
13142cat >>conftest.$ac_ext <<_ACEOF
13143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013144
Martin v. Löwiseba40652007-08-30 20:10:57 +000013145/* Override any GCC internal prototype to avoid an error.
13146 Use char because int might match the return type of a GCC
13147 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013148#ifdef __cplusplus
13149extern "C"
13150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013151char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013152int
13153main ()
13154{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013155return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013156 ;
13157 return 0;
13158}
13159_ACEOF
13160rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013161if { (ac_try="$ac_link"
13162case "(($ac_try" in
13163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13164 *) ac_try_echo=$ac_try;;
13165esac
13166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13167 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013169 grep -v '^ *+' conftest.er1 >conftest.err
13170 rm -f conftest.er1
13171 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013173 (exit $ac_status); } && {
13174 test -z "$ac_c_werror_flag" ||
13175 test ! -s conftest.err
13176 } && test -s conftest$ac_exeext &&
13177 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013179else
Martin v. Löwis11437992002-04-12 09:54:03 +000013180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013181sed 's/^/| /' conftest.$ac_ext >&5
13182
Martin v. Löwiseba40652007-08-30 20:10:57 +000013183 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013185
13186rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013188LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013190{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13191echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013192if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013193 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013194fi
13195 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013196
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013197case "$ac_sys_system" in
13198BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013199{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13200echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013201if test "${ac_cv_lib_net_socket+set}" = set; then
13202 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013203else
Martin v. Löwis11437992002-04-12 09:54:03 +000013204 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013205LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013206cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013207/* confdefs.h. */
13208_ACEOF
13209cat confdefs.h >>conftest.$ac_ext
13210cat >>conftest.$ac_ext <<_ACEOF
13211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
Martin v. Löwiseba40652007-08-30 20:10:57 +000013213/* Override any GCC internal prototype to avoid an error.
13214 Use char because int might match the return type of a GCC
13215 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013216#ifdef __cplusplus
13217extern "C"
13218#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013219char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013220int
13221main ()
13222{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013223return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 ;
13225 return 0;
13226}
13227_ACEOF
13228rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013229if { (ac_try="$ac_link"
13230case "(($ac_try" in
13231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13232 *) ac_try_echo=$ac_try;;
13233esac
13234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13235 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013236 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013237 grep -v '^ *+' conftest.er1 >conftest.err
13238 rm -f conftest.er1
13239 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013241 (exit $ac_status); } && {
13242 test -z "$ac_c_werror_flag" ||
13243 test ! -s conftest.err
13244 } && test -s conftest$ac_exeext &&
13245 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013246 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013247else
Martin v. Löwis11437992002-04-12 09:54:03 +000013248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013249sed 's/^/| /' conftest.$ac_ext >&5
13250
Martin v. Löwiseba40652007-08-30 20:10:57 +000013251 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013253
13254rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013255 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013256LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013258{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13259echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013260if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013261 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013262fi
13263 # BeOS
13264;;
13265esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013266
Martin v. Löwiseba40652007-08-30 20:10:57 +000013267{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13268echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013269
Martin v. Löwiseba40652007-08-30 20:10:57 +000013270# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013271if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013272 withval=$with_libs;
13273{ echo "$as_me:$LINENO: result: $withval" >&5
13274echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013275LIBS="$withval $LIBS"
13276
13277else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013278 { echo "$as_me:$LINENO: result: no" >&5
13279echo "${ECHO_T}no" >&6; }
13280fi
13281
Guido van Rossum7f43da71994-08-01 12:15:30 +000013282
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013283# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013284{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13285echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013286
Martin v. Löwiseba40652007-08-30 20:10:57 +000013287# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013288if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013289 withval=$with_system_ffi;
13290fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013291
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013292
Martin v. Löwiseba40652007-08-30 20:10:57 +000013293{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13294echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013295
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013296# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013297
13298
Martin v. Löwiseba40652007-08-30 20:10:57 +000013299{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13300echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013301
Martin v. Löwiseba40652007-08-30 20:10:57 +000013302# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013303if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013304 withval=$with_signal_module;
13305fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013306
13307
13308if test -z "$with_signal_module"
13309then with_signal_module="yes"
13310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013311{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13312echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013313
13314if test "${with_signal_module}" = "yes"; then
13315 USE_SIGNAL_MODULE=""
13316 SIGNAL_OBJS=""
13317else
13318 USE_SIGNAL_MODULE="#"
13319 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13320fi
13321
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013322# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013323
Barry Warsawc0d24d82000-06-29 16:12:00 +000013324USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013325
Martin v. Löwiseba40652007-08-30 20:10:57 +000013326{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13327echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013328
Guido van Rossumec2f0731997-01-22 20:54:01 +000013329
Martin v. Löwiseba40652007-08-30 20:10:57 +000013330# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013331if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013332 withval=$with_dec_threads;
13333{ echo "$as_me:$LINENO: result: $withval" >&5
13334echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013335LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013336if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013337 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013338fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013339else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013340 { echo "$as_me:$LINENO: result: no" >&5
13341echo "${ECHO_T}no" >&6; }
13342fi
13343
Martin v. Löwis11437992002-04-12 09:54:03 +000013344
13345# Templates for things AC_DEFINEd more than once.
13346# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013347
13348
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
13350
13351
13352
13353
Martin v. Löwiseba40652007-08-30 20:10:57 +000013354{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13355echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013356
Martin v. Löwiseba40652007-08-30 20:10:57 +000013357# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013358if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013359 withval=$with_threads;
13360fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013361
13362
Barry Warsawc0d24d82000-06-29 16:12:00 +000013363# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
Martin v. Löwiseba40652007-08-30 20:10:57 +000013365# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013366if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013367 withval=$with_thread; with_threads=$with_thread
13368fi
13369
Barry Warsawc0d24d82000-06-29 16:12:00 +000013370
13371if test -z "$with_threads"
13372then with_threads="yes"
13373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013374{ echo "$as_me:$LINENO: result: $with_threads" >&5
13375echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013376
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013377
Barry Warsawc0d24d82000-06-29 16:12:00 +000013378if test "$with_threads" = "no"
13379then
13380 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013381elif test "$ac_cv_pthread_is_default" = yes
13382then
Martin v. Löwis11437992002-04-12 09:54:03 +000013383 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013384#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013385_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013386
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013387 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013389#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013390_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013391
13392 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013394elif test "$ac_cv_kpthread" = "yes"
13395then
13396 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013397 if test "$ac_cv_cxx_thread" = "yes"; then
13398 CXX="$CXX -Kpthread"
13399 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013401#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013402_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013403
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013404 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013405 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013406elif test "$ac_cv_kthread" = "yes"
13407then
13408 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013409 if test "$ac_cv_cxx_thread" = "yes"; then
13410 CXX="$CXX -Kthread"
13411 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013412 cat >>confdefs.h <<\_ACEOF
13413#define WITH_THREAD 1
13414_ACEOF
13415
13416 posix_threads=yes
13417 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013418elif test "$ac_cv_pthread" = "yes"
13419then
13420 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013421 if test "$ac_cv_cxx_thread" = "yes"; then
13422 CXX="$CXX -pthread"
13423 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013424 cat >>confdefs.h <<\_ACEOF
13425#define WITH_THREAD 1
13426_ACEOF
13427
13428 posix_threads=yes
13429 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013430else
13431 if test ! -z "$with_threads" -a -d "$with_threads"
13432 then LDFLAGS="$LDFLAGS -L$with_threads"
13433 fi
13434 if test ! -z "$withval" -a -d "$withval"
13435 then LDFLAGS="$LDFLAGS -L$withval"
13436 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013437
13438 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013439 # define _POSIX_THREADS in unistd.h. Some apparently don't
13440 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013441 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13442echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013444/* confdefs.h. */
13445_ACEOF
13446cat confdefs.h >>conftest.$ac_ext
13447cat >>conftest.$ac_ext <<_ACEOF
13448/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013449
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013450#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013451#ifdef _POSIX_THREADS
13452yes
13453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
13455_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013457 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013458 unistd_defines_pthreads=yes
13459else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013460 unistd_defines_pthreads=no
13461fi
13462rm -f conftest*
13463
Martin v. Löwiseba40652007-08-30 20:10:57 +000013464 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13465echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013466
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013468#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013469_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013470
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013472 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13473echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013474if test "${ac_cv_header_cthreads_h+set}" = set; then
13475 echo $ECHO_N "(cached) $ECHO_C" >&6
13476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013477{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13478echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013479else
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013481{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13482echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013484/* confdefs.h. */
13485_ACEOF
13486cat confdefs.h >>conftest.$ac_ext
13487cat >>conftest.$ac_ext <<_ACEOF
13488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013489$ac_includes_default
13490#include <cthreads.h>
13491_ACEOF
13492rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013493if { (ac_try="$ac_compile"
13494case "(($ac_try" in
13495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13496 *) ac_try_echo=$ac_try;;
13497esac
13498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13499 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013501 grep -v '^ *+' conftest.er1 >conftest.err
13502 rm -f conftest.er1
13503 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013505 (exit $ac_status); } && {
13506 test -z "$ac_c_werror_flag" ||
13507 test ! -s conftest.err
13508 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013509 ac_header_compiler=yes
13510else
13511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013512sed 's/^/| /' conftest.$ac_ext >&5
13513
Martin v. Löwiseba40652007-08-30 20:10:57 +000013514 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013516
13517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13518{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13519echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013520
13521# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13523echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013524cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013525/* confdefs.h. */
13526_ACEOF
13527cat confdefs.h >>conftest.$ac_ext
13528cat >>conftest.$ac_ext <<_ACEOF
13529/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013530#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013531_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013532if { (ac_try="$ac_cpp conftest.$ac_ext"
13533case "(($ac_try" in
13534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13535 *) ac_try_echo=$ac_try;;
13536esac
13537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13538 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013539 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013540 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013541 rm -f conftest.er1
13542 cat conftest.err >&5
13543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013544 (exit $ac_status); } >/dev/null && {
13545 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13546 test ! -s conftest.err
13547 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013548 ac_header_preproc=yes
13549else
13550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013551sed 's/^/| /' conftest.$ac_ext >&5
13552
Martin v. Löwis11437992002-04-12 09:54:03 +000013553 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013555
Martin v. Löwis11437992002-04-12 09:54:03 +000013556rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013557{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13558echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013559
13560# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013561case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13562 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13564echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013565 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13566echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13567 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013568 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013569 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013570 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13571echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013572 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13573echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13574 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13575echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13576 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13577echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013578 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13579echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013580 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13581echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013582 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013583## ------------------------------------------------ ##
13584## Report this to http://www.python.org/python-bugs ##
13585## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013586_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013587 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013588 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013589esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013590{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13591echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013592if test "${ac_cv_header_cthreads_h+set}" = set; then
13593 echo $ECHO_N "(cached) $ECHO_C" >&6
13594else
13595 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013597{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13598echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013599
13600fi
13601if test $ac_cv_header_cthreads_h = yes; then
13602 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013603#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013604_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013605
Martin v. Löwis11437992002-04-12 09:54:03 +000013606 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013607#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013608_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013609
Martin v. Löwis11437992002-04-12 09:54:03 +000013610
13611cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013612#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013613_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013614
13615 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013616 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013617else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013618
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013620 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13621echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013622if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13623 echo $ECHO_N "(cached) $ECHO_C" >&6
13624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013625{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13626echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013627else
Martin v. Löwis11437992002-04-12 09:54:03 +000013628 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013629{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13630echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013631cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013632/* confdefs.h. */
13633_ACEOF
13634cat confdefs.h >>conftest.$ac_ext
13635cat >>conftest.$ac_ext <<_ACEOF
13636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013637$ac_includes_default
13638#include <mach/cthreads.h>
13639_ACEOF
13640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013641if { (ac_try="$ac_compile"
13642case "(($ac_try" in
13643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13644 *) ac_try_echo=$ac_try;;
13645esac
13646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013649 grep -v '^ *+' conftest.er1 >conftest.err
13650 rm -f conftest.er1
13651 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013653 (exit $ac_status); } && {
13654 test -z "$ac_c_werror_flag" ||
13655 test ! -s conftest.err
13656 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013657 ac_header_compiler=yes
13658else
13659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013660sed 's/^/| /' conftest.$ac_ext >&5
13661
Martin v. Löwiseba40652007-08-30 20:10:57 +000013662 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013664
13665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13666{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13667echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013668
13669# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013670{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13671echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013673/* confdefs.h. */
13674_ACEOF
13675cat confdefs.h >>conftest.$ac_ext
13676cat >>conftest.$ac_ext <<_ACEOF
13677/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013678#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013679_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013680if { (ac_try="$ac_cpp conftest.$ac_ext"
13681case "(($ac_try" in
13682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13683 *) ac_try_echo=$ac_try;;
13684esac
13685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13686 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013687 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013688 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 rm -f conftest.er1
13690 cat conftest.err >&5
13691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013692 (exit $ac_status); } >/dev/null && {
13693 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13694 test ! -s conftest.err
13695 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013696 ac_header_preproc=yes
13697else
13698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013699sed 's/^/| /' conftest.$ac_ext >&5
13700
Martin v. Löwis11437992002-04-12 09:54:03 +000013701 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013703
Martin v. Löwis11437992002-04-12 09:54:03 +000013704rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013705{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13706echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013707
13708# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013709case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13710 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13712echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013713 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13714echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13715 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013716 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013717 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013718 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13719echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013720 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13721echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13722 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13723echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13724 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13725echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013726 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13727echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013728 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13729echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013730 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013731## ------------------------------------------------ ##
13732## Report this to http://www.python.org/python-bugs ##
13733## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013734_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013735 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013736 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013737esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013738{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13739echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013740if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13741 echo $ECHO_N "(cached) $ECHO_C" >&6
13742else
13743 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013745{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13746echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013747
13748fi
13749if test $ac_cv_header_mach_cthreads_h = yes; then
13750 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013751#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013752_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013753
Martin v. Löwis11437992002-04-12 09:54:03 +000013754 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013755#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013756_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013757
Martin v. Löwis11437992002-04-12 09:54:03 +000013758
13759cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013760#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013761_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013762
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013763 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013764else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013765
Martin v. Löwiseba40652007-08-30 20:10:57 +000013766 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13767echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013768
Martin v. Löwiseba40652007-08-30 20:10:57 +000013769# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013770if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013771 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13772echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013773 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013774#define WITH_THREAD 1
13775_ACEOF
13776
13777
13778cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013779#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013780_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013781
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013782 LIBS="-lpth $LIBS"
13783 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013784else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013785 { echo "$as_me:$LINENO: result: no" >&5
13786echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013787
13788 # Just looking for pthread_create in libpthread is not enough:
13789 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13790 # So we really have to include pthread.h, and then link.
13791 _libs=$LIBS
13792 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013793 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13794echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013796/* confdefs.h. */
13797_ACEOF
13798cat confdefs.h >>conftest.$ac_ext
13799cat >>conftest.$ac_ext <<_ACEOF
13800/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013801#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013802
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013803void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013804int
13805main ()
13806{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013807
13808pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 ;
13810 return 0;
13811}
13812_ACEOF
13813rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013814if { (ac_try="$ac_link"
13815case "(($ac_try" in
13816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13817 *) ac_try_echo=$ac_try;;
13818esac
13819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13820 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013822 grep -v '^ *+' conftest.er1 >conftest.err
13823 rm -f conftest.er1
13824 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013826 (exit $ac_status); } && {
13827 test -z "$ac_c_werror_flag" ||
13828 test ! -s conftest.err
13829 } && test -s conftest$ac_exeext &&
13830 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013831
Martin v. Löwiseba40652007-08-30 20:10:57 +000013832 { echo "$as_me:$LINENO: result: yes" >&5
13833echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013835#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013836_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013837
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013838 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013839 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013840else
Martin v. Löwis11437992002-04-12 09:54:03 +000013841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013842sed 's/^/| /' conftest.$ac_ext >&5
13843
Martin v. Löwis11437992002-04-12 09:54:03 +000013844
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013845 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013846 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13847echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013848if test "${ac_cv_func_pthread_detach+set}" = set; then
13849 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013850else
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013852/* confdefs.h. */
13853_ACEOF
13854cat confdefs.h >>conftest.$ac_ext
13855cat >>conftest.$ac_ext <<_ACEOF
13856/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013857/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13858 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13859#define pthread_detach innocuous_pthread_detach
13860
Guido van Rossumad678af1998-10-02 14:42:15 +000013861/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013862 which can conflict with char pthread_detach (); below.
13863 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013864 <limits.h> exists even on freestanding compilers. */
13865
13866#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013867# include <limits.h>
13868#else
13869# include <assert.h>
13870#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013871
13872#undef pthread_detach
13873
Martin v. Löwiseba40652007-08-30 20:10:57 +000013874/* Override any GCC internal prototype to avoid an error.
13875 Use char because int might match the return type of a GCC
13876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013877#ifdef __cplusplus
13878extern "C"
13879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013880char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013881/* The GNU C library defines this for functions which it implements
13882 to always fail with ENOSYS. Some functions are actually named
13883 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013884#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013885choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013886#endif
13887
Skip Montanaro6dead952003-09-25 14:50:04 +000013888int
13889main ()
13890{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013892 ;
13893 return 0;
13894}
13895_ACEOF
13896rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013897if { (ac_try="$ac_link"
13898case "(($ac_try" in
13899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13900 *) ac_try_echo=$ac_try;;
13901esac
13902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13903 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013905 grep -v '^ *+' conftest.er1 >conftest.err
13906 rm -f conftest.er1
13907 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013909 (exit $ac_status); } && {
13910 test -z "$ac_c_werror_flag" ||
13911 test ! -s conftest.err
13912 } && test -s conftest$ac_exeext &&
13913 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013915else
Martin v. Löwis11437992002-04-12 09:54:03 +000013916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013917sed 's/^/| /' conftest.$ac_ext >&5
13918
Martin v. Löwiseba40652007-08-30 20:10:57 +000013919 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013921
13922rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013923 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013925{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13926echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013927if test $ac_cv_func_pthread_detach = yes; then
13928 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013929#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013930_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013931
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013932 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013933 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013934else
Guido van Rossumad678af1998-10-02 14:42:15 +000013935
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013936 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013937 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13938echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013939if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13940 echo $ECHO_N "(cached) $ECHO_C" >&6
13941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013942{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13943echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013944else
13945 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013946{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13947echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013949/* confdefs.h. */
13950_ACEOF
13951cat confdefs.h >>conftest.$ac_ext
13952cat >>conftest.$ac_ext <<_ACEOF
13953/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013954$ac_includes_default
13955#include <atheos/threads.h>
13956_ACEOF
13957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013958if { (ac_try="$ac_compile"
13959case "(($ac_try" in
13960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13961 *) ac_try_echo=$ac_try;;
13962esac
13963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013966 grep -v '^ *+' conftest.er1 >conftest.err
13967 rm -f conftest.er1
13968 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013970 (exit $ac_status); } && {
13971 test -z "$ac_c_werror_flag" ||
13972 test ! -s conftest.err
13973 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013974 ac_header_compiler=yes
13975else
13976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013977sed 's/^/| /' conftest.$ac_ext >&5
13978
Martin v. Löwiseba40652007-08-30 20:10:57 +000013979 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013981
13982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13983{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13984echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013985
13986# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013987{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13988echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013989cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013990/* confdefs.h. */
13991_ACEOF
13992cat confdefs.h >>conftest.$ac_ext
13993cat >>conftest.$ac_ext <<_ACEOF
13994/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013995#include <atheos/threads.h>
13996_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997if { (ac_try="$ac_cpp conftest.$ac_ext"
13998case "(($ac_try" in
13999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14000 *) ac_try_echo=$ac_try;;
14001esac
14002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14003 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014004 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014005 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014006 rm -f conftest.er1
14007 cat conftest.err >&5
14008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014009 (exit $ac_status); } >/dev/null && {
14010 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14011 test ! -s conftest.err
14012 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014013 ac_header_preproc=yes
14014else
14015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014016sed 's/^/| /' conftest.$ac_ext >&5
14017
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014018 ac_header_preproc=no
14019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014020
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014021rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014022{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14023echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014024
14025# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014026case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14027 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014028 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14029echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014030 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14031echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14032 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014033 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014034 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014035 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14036echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014037 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14038echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14039 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14040echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14041 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14042echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014043 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14044echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014045 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14046echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014047 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014048## ------------------------------------------------ ##
14049## Report this to http://www.python.org/python-bugs ##
14050## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014051_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014052 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014053 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014054esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014055{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14056echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014057if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14058 echo $ECHO_N "(cached) $ECHO_C" >&6
14059else
14060 ac_cv_header_atheos_threads_h=$ac_header_preproc
14061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014062{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14063echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014064
14065fi
14066if test $ac_cv_header_atheos_threads_h = yes; then
14067 cat >>confdefs.h <<\_ACEOF
14068#define WITH_THREAD 1
14069_ACEOF
14070
14071
14072cat >>confdefs.h <<\_ACEOF
14073#define ATHEOS_THREADS 1
14074_ACEOF
14075
14076 THREADOBJ="Python/thread.o"
14077else
14078
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014080 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14081echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014082if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14083 echo $ECHO_N "(cached) $ECHO_C" >&6
14084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014085{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14086echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014087else
Martin v. Löwis11437992002-04-12 09:54:03 +000014088 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014089{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14090echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014092/* confdefs.h. */
14093_ACEOF
14094cat confdefs.h >>conftest.$ac_ext
14095cat >>conftest.$ac_ext <<_ACEOF
14096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014097$ac_includes_default
14098#include <kernel/OS.h>
14099_ACEOF
14100rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014101if { (ac_try="$ac_compile"
14102case "(($ac_try" in
14103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14104 *) ac_try_echo=$ac_try;;
14105esac
14106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014109 grep -v '^ *+' conftest.er1 >conftest.err
14110 rm -f conftest.er1
14111 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014113 (exit $ac_status); } && {
14114 test -z "$ac_c_werror_flag" ||
14115 test ! -s conftest.err
14116 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 ac_header_compiler=yes
14118else
14119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014120sed 's/^/| /' conftest.$ac_ext >&5
14121
Martin v. Löwiseba40652007-08-30 20:10:57 +000014122 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014124
14125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14126{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14127echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014128
14129# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014130{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14131echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014133/* confdefs.h. */
14134_ACEOF
14135cat confdefs.h >>conftest.$ac_ext
14136cat >>conftest.$ac_ext <<_ACEOF
14137/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014138#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014139_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014140if { (ac_try="$ac_cpp conftest.$ac_ext"
14141case "(($ac_try" in
14142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14143 *) ac_try_echo=$ac_try;;
14144esac
14145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14146 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014147 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014148 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 rm -f conftest.er1
14150 cat conftest.err >&5
14151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014152 (exit $ac_status); } >/dev/null && {
14153 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14154 test ! -s conftest.err
14155 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014156 ac_header_preproc=yes
14157else
14158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014159sed 's/^/| /' conftest.$ac_ext >&5
14160
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014163
Martin v. Löwis11437992002-04-12 09:54:03 +000014164rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014165{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14166echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014167
Martin v. Löwis11437992002-04-12 09:54:03 +000014168# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014169case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14170 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14172echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014173 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14174echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14175 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014176 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014177 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014178 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14179echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014180 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14181echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14182 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14183echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14184 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14185echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014186 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14187echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014188 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14189echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014190 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014191## ------------------------------------------------ ##
14192## Report this to http://www.python.org/python-bugs ##
14193## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014194_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014195 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014196 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014197esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014198{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14199echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014200if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14201 echo $ECHO_N "(cached) $ECHO_C" >&6
14202else
14203 ac_cv_header_kernel_OS_h=$ac_header_preproc
14204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014205{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14206echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014207
14208fi
14209if test $ac_cv_header_kernel_OS_h = yes; then
14210 cat >>confdefs.h <<\_ACEOF
14211#define WITH_THREAD 1
14212_ACEOF
14213
14214
14215cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014216#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014217_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014218
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014219 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014220else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014221
Martin v. Löwiseba40652007-08-30 20:10:57 +000014222 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14223echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014224if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14225 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014226else
Martin v. Löwis11437992002-04-12 09:54:03 +000014227 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014228LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014230/* confdefs.h. */
14231_ACEOF
14232cat confdefs.h >>conftest.$ac_ext
14233cat >>conftest.$ac_ext <<_ACEOF
14234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014235
Martin v. Löwiseba40652007-08-30 20:10:57 +000014236/* Override any GCC internal prototype to avoid an error.
14237 Use char because int might match the return type of a GCC
14238 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014239#ifdef __cplusplus
14240extern "C"
14241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014242char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014243int
14244main ()
14245{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014246return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014247 ;
14248 return 0;
14249}
14250_ACEOF
14251rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014252if { (ac_try="$ac_link"
14253case "(($ac_try" in
14254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14255 *) ac_try_echo=$ac_try;;
14256esac
14257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14258 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014260 grep -v '^ *+' conftest.er1 >conftest.err
14261 rm -f conftest.er1
14262 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014264 (exit $ac_status); } && {
14265 test -z "$ac_c_werror_flag" ||
14266 test ! -s conftest.err
14267 } && test -s conftest$ac_exeext &&
14268 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014269 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014270else
Martin v. Löwis11437992002-04-12 09:54:03 +000014271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014272sed 's/^/| /' conftest.$ac_ext >&5
14273
Martin v. Löwiseba40652007-08-30 20:10:57 +000014274 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014276
14277rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014279LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014281{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14282echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014283if test $ac_cv_lib_pthreads_pthread_create = yes; then
14284 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014285#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014286_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014287
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014288 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014289 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014290 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014291else
Greg Steinadf63d62000-07-05 10:38:09 +000014292
Martin v. Löwiseba40652007-08-30 20:10:57 +000014293 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14294echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014295if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14296 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014297else
Martin v. Löwis11437992002-04-12 09:54:03 +000014298 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014299LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014300cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014301/* confdefs.h. */
14302_ACEOF
14303cat confdefs.h >>conftest.$ac_ext
14304cat >>conftest.$ac_ext <<_ACEOF
14305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014306
Martin v. Löwiseba40652007-08-30 20:10:57 +000014307/* Override any GCC internal prototype to avoid an error.
14308 Use char because int might match the return type of a GCC
14309 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014310#ifdef __cplusplus
14311extern "C"
14312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014313char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014314int
14315main ()
14316{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014317return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014318 ;
14319 return 0;
14320}
14321_ACEOF
14322rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014323if { (ac_try="$ac_link"
14324case "(($ac_try" in
14325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14326 *) ac_try_echo=$ac_try;;
14327esac
14328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14329 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014331 grep -v '^ *+' conftest.er1 >conftest.err
14332 rm -f conftest.er1
14333 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014335 (exit $ac_status); } && {
14336 test -z "$ac_c_werror_flag" ||
14337 test ! -s conftest.err
14338 } && test -s conftest$ac_exeext &&
14339 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014340 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014341else
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014343sed 's/^/| /' conftest.$ac_ext >&5
14344
Martin v. Löwiseba40652007-08-30 20:10:57 +000014345 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014347
14348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014349 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014350LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014352{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14353echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014354if test $ac_cv_lib_c_r_pthread_create = yes; then
14355 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014356#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014357_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014358
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014359 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014360 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014361 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014362else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014363
Martin v. Löwiseba40652007-08-30 20:10:57 +000014364 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14365echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014366if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14367 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014368else
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014370LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014371cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014372/* confdefs.h. */
14373_ACEOF
14374cat confdefs.h >>conftest.$ac_ext
14375cat >>conftest.$ac_ext <<_ACEOF
14376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
Martin v. Löwiseba40652007-08-30 20:10:57 +000014378/* Override any GCC internal prototype to avoid an error.
14379 Use char because int might match the return type of a GCC
14380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014381#ifdef __cplusplus
14382extern "C"
14383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014384char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014385int
14386main ()
14387{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014388return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014389 ;
14390 return 0;
14391}
14392_ACEOF
14393rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014394if { (ac_try="$ac_link"
14395case "(($ac_try" in
14396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14397 *) ac_try_echo=$ac_try;;
14398esac
14399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014402 grep -v '^ *+' conftest.er1 >conftest.err
14403 rm -f conftest.er1
14404 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014406 (exit $ac_status); } && {
14407 test -z "$ac_c_werror_flag" ||
14408 test ! -s conftest.err
14409 } && test -s conftest$ac_exeext &&
14410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014411 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014412else
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014414sed 's/^/| /' conftest.$ac_ext >&5
14415
Martin v. Löwiseba40652007-08-30 20:10:57 +000014416 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014418
14419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014421LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014423{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14424echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014425if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14426 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014427#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014428_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014429
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014430 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014431 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014432 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014433else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014434
Martin v. Löwiseba40652007-08-30 20:10:57 +000014435 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14436echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014437if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14438 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014439else
Martin v. Löwis11437992002-04-12 09:54:03 +000014440 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014441LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014443/* confdefs.h. */
14444_ACEOF
14445cat confdefs.h >>conftest.$ac_ext
14446cat >>conftest.$ac_ext <<_ACEOF
14447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014448
Martin v. Löwiseba40652007-08-30 20:10:57 +000014449/* Override any GCC internal prototype to avoid an error.
14450 Use char because int might match the return type of a GCC
14451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014452#ifdef __cplusplus
14453extern "C"
14454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014455char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014456int
14457main ()
14458{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014459return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014460 ;
14461 return 0;
14462}
14463_ACEOF
14464rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014465if { (ac_try="$ac_link"
14466case "(($ac_try" in
14467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14468 *) ac_try_echo=$ac_try;;
14469esac
14470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14471 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014473 grep -v '^ *+' conftest.er1 >conftest.err
14474 rm -f conftest.er1
14475 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014477 (exit $ac_status); } && {
14478 test -z "$ac_c_werror_flag" ||
14479 test ! -s conftest.err
14480 } && test -s conftest$ac_exeext &&
14481 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014483else
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014485sed 's/^/| /' conftest.$ac_ext >&5
14486
Martin v. Löwiseba40652007-08-30 20:10:57 +000014487 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014489
14490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014492LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14495echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014496if test $ac_cv_lib_cma_pthread_create = yes; then
14497 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014498#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014499_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014500
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014501 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014502 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014503 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014504else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014505
Martin v. Löwis130fb172001-07-19 11:00:41 +000014506 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014507fi
14508
Guido van Rossum627b2d71993-12-24 10:39:16 +000014509
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014510fi
14511
Guido van Rossum0be3e491997-05-22 20:33:33 +000014512fi
14513
Guido van Rossum49545951997-12-02 19:28:29 +000014514fi
14515
Guido van Rossumb93a8621998-05-07 13:27:32 +000014516fi
14517
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014518
Michael W. Hudson54241132001-12-07 15:38:26 +000014519fi
14520
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014521
14522fi
14523
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014525
14526rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014527 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014528fi
14529
Martin v. Löwis11437992002-04-12 09:54:03 +000014530fi
14531
14532
14533fi
14534
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014535
Michael W. Hudson54241132001-12-07 15:38:26 +000014536
Martin v. Löwiseba40652007-08-30 20:10:57 +000014537 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14538echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014539if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014541else
Martin v. Löwis11437992002-04-12 09:54:03 +000014542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014543LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014544cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014545/* confdefs.h. */
14546_ACEOF
14547cat confdefs.h >>conftest.$ac_ext
14548cat >>conftest.$ac_ext <<_ACEOF
14549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014550
Martin v. Löwiseba40652007-08-30 20:10:57 +000014551/* Override any GCC internal prototype to avoid an error.
14552 Use char because int might match the return type of a GCC
14553 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014554#ifdef __cplusplus
14555extern "C"
14556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014557char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014558int
14559main ()
14560{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014561return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014562 ;
14563 return 0;
14564}
14565_ACEOF
14566rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567if { (ac_try="$ac_link"
14568case "(($ac_try" in
14569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14570 *) ac_try_echo=$ac_try;;
14571esac
14572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14573 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014575 grep -v '^ *+' conftest.er1 >conftest.err
14576 rm -f conftest.er1
14577 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014579 (exit $ac_status); } && {
14580 test -z "$ac_c_werror_flag" ||
14581 test ! -s conftest.err
14582 } && test -s conftest$ac_exeext &&
14583 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014584 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014585else
Martin v. Löwis11437992002-04-12 09:54:03 +000014586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014587sed 's/^/| /' conftest.$ac_ext >&5
14588
Martin v. Löwiseba40652007-08-30 20:10:57 +000014589 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014591
14592rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014594LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014596{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14597echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014598if test $ac_cv_lib_mpc_usconfig = yes; then
14599 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014600#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014601_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014602
Martin v. Löwis130fb172001-07-19 11:00:41 +000014603 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014604 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014605 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014606fi
14607
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014608
Neal Norwitza978ab02002-11-02 16:58:05 +000014609 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014610 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14611echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014612if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14613 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014614else
Martin v. Löwis11437992002-04-12 09:54:03 +000014615 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014616LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014618/* confdefs.h. */
14619_ACEOF
14620cat confdefs.h >>conftest.$ac_ext
14621cat >>conftest.$ac_ext <<_ACEOF
14622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014623
Martin v. Löwiseba40652007-08-30 20:10:57 +000014624/* Override any GCC internal prototype to avoid an error.
14625 Use char because int might match the return type of a GCC
14626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014627#ifdef __cplusplus
14628extern "C"
14629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014630char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014631int
14632main ()
14633{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014634return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014635 ;
14636 return 0;
14637}
14638_ACEOF
14639rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014640if { (ac_try="$ac_link"
14641case "(($ac_try" in
14642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14643 *) ac_try_echo=$ac_try;;
14644esac
14645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14646 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014648 grep -v '^ *+' conftest.er1 >conftest.err
14649 rm -f conftest.er1
14650 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014652 (exit $ac_status); } && {
14653 test -z "$ac_c_werror_flag" ||
14654 test ! -s conftest.err
14655 } && test -s conftest$ac_exeext &&
14656 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014658else
Martin v. Löwis11437992002-04-12 09:54:03 +000014659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014660sed 's/^/| /' conftest.$ac_ext >&5
14661
Martin v. Löwiseba40652007-08-30 20:10:57 +000014662 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014664
14665rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014667LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014669{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14670echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014671if test $ac_cv_lib_thread_thr_create = yes; then
14672 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014673#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014674_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014675
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014676 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014677 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014678 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014679fi
14680
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014681 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014682
Martin v. Löwis130fb172001-07-19 11:00:41 +000014683 if test "$USE_THREAD_MODULE" != "#"
14684 then
14685 # If the above checks didn't disable threads, (at least) OSF1
14686 # needs this '-threads' argument during linking.
14687 case $ac_sys_system in
14688 OSF1) LDLAST=-threads;;
14689 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014690 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014691fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014693if test "$posix_threads" = "yes"; then
14694 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014695
14696cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014697#define _POSIX_THREADS 1
14698_ACEOF
14699
14700 fi
14701
14702 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14703 case $ac_sys_system/$ac_sys_release in
14704 SunOS/5.6)
14705cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014706#define HAVE_PTHREAD_DESTRUCTOR 1
14707_ACEOF
14708
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014709 ;;
14710 SunOS/5.8)
14711cat >>confdefs.h <<\_ACEOF
14712#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14713_ACEOF
14714
14715 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014716 AIX/5)
14717cat >>confdefs.h <<\_ACEOF
14718#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14719_ACEOF
14720
14721 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014722 esac
14723
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14725echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014726 if test "${ac_cv_pthread_system_supported+set}" = set; then
14727 echo $ECHO_N "(cached) $ECHO_C" >&6
14728else
14729 if test "$cross_compiling" = yes; then
14730 ac_cv_pthread_system_supported=no
14731else
14732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014733/* confdefs.h. */
14734_ACEOF
14735cat confdefs.h >>conftest.$ac_ext
14736cat >>conftest.$ac_ext <<_ACEOF
14737/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014738#include <pthread.h>
14739 void *foo(void *parm) {
14740 return NULL;
14741 }
14742 main() {
14743 pthread_attr_t attr;
14744 pthread_t id;
14745 if (pthread_attr_init(&attr)) exit(-1);
14746 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14747 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14748 exit(0);
14749 }
14750_ACEOF
14751rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014752if { (ac_try="$ac_link"
14753case "(($ac_try" in
14754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14755 *) ac_try_echo=$ac_try;;
14756esac
14757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14758 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014759 ac_status=$?
14760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014762 { (case "(($ac_try" in
14763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14764 *) ac_try_echo=$ac_try;;
14765esac
14766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14767 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014768 ac_status=$?
14769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14770 (exit $ac_status); }; }; then
14771 ac_cv_pthread_system_supported=yes
14772else
14773 echo "$as_me: program exited with status $ac_status" >&5
14774echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014775sed 's/^/| /' conftest.$ac_ext >&5
14776
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014777( exit $ac_status )
14778ac_cv_pthread_system_supported=no
14779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014780rm -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 +000014781fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014782
Martin v. Löwiseba40652007-08-30 20:10:57 +000014783
14784
Guido van Rossum627b2d71993-12-24 10:39:16 +000014785fi
14786
Martin v. Löwiseba40652007-08-30 20:10:57 +000014787 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14788echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014789 if test "$ac_cv_pthread_system_supported" = "yes"; then
14790
14791cat >>confdefs.h <<\_ACEOF
14792#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14793_ACEOF
14794
14795 fi
14796
14797for ac_func in pthread_sigmask
14798do
14799as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014800{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14801echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14802if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014803 echo $ECHO_N "(cached) $ECHO_C" >&6
14804else
14805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014806/* confdefs.h. */
14807_ACEOF
14808cat confdefs.h >>conftest.$ac_ext
14809cat >>conftest.$ac_ext <<_ACEOF
14810/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014811/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14812 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14813#define $ac_func innocuous_$ac_func
14814
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014815/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014816 which can conflict with char $ac_func (); below.
14817 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014818 <limits.h> exists even on freestanding compilers. */
14819
14820#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014821# include <limits.h>
14822#else
14823# include <assert.h>
14824#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014825
14826#undef $ac_func
14827
Martin v. Löwiseba40652007-08-30 20:10:57 +000014828/* Override any GCC internal prototype to avoid an error.
14829 Use char because int might match the return type of a GCC
14830 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014831#ifdef __cplusplus
14832extern "C"
14833#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014834char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014835/* The GNU C library defines this for functions which it implements
14836 to always fail with ENOSYS. Some functions are actually named
14837 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014838#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014839choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014840#endif
14841
Skip Montanaro6dead952003-09-25 14:50:04 +000014842int
14843main ()
14844{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014845return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014846 ;
14847 return 0;
14848}
14849_ACEOF
14850rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014851if { (ac_try="$ac_link"
14852case "(($ac_try" in
14853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14854 *) ac_try_echo=$ac_try;;
14855esac
14856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14857 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014859 grep -v '^ *+' conftest.er1 >conftest.err
14860 rm -f conftest.er1
14861 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014863 (exit $ac_status); } && {
14864 test -z "$ac_c_werror_flag" ||
14865 test ! -s conftest.err
14866 } && test -s conftest$ac_exeext &&
14867 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014868 eval "$as_ac_var=yes"
14869else
14870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014871sed 's/^/| /' conftest.$ac_ext >&5
14872
Martin v. Löwiseba40652007-08-30 20:10:57 +000014873 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014875
14876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014879ac_res=`eval echo '${'$as_ac_var'}'`
14880 { echo "$as_me:$LINENO: result: $ac_res" >&5
14881echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014882if test `eval echo '${'$as_ac_var'}'` = yes; then
14883 cat >>confdefs.h <<_ACEOF
14884#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14885_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014886 case $ac_sys_system in
14887 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014888
Jason Tishlerfac083d2003-07-22 15:20:49 +000014889cat >>confdefs.h <<\_ACEOF
14890#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14891_ACEOF
14892
14893 ;;
14894 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014895fi
14896done
14897
14898fi
14899
14900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014901# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014902
14903
Martin v. Löwiseba40652007-08-30 20:10:57 +000014904{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14905echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14906# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014907if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014908 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014909 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014910 { echo "$as_me:$LINENO: result: no" >&5
14911echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014912 ipv6=no
14913 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014914 *) { echo "$as_me:$LINENO: result: yes" >&5
14915echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014917#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014918_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014919
14920 ipv6=yes
14921 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014922 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014923else
Martin v. Löwis11437992002-04-12 09:54:03 +000014924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014925 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014926 { echo "$as_me:$LINENO: result: no" >&5
14927echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014928 ipv6=no
14929
14930else
Martin v. Löwis11437992002-04-12 09:54:03 +000014931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014932/* confdefs.h. */
14933_ACEOF
14934cat confdefs.h >>conftest.$ac_ext
14935cat >>conftest.$ac_ext <<_ACEOF
14936/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014937 /* AF_INET6 available check */
14938#include <sys/types.h>
14939#include <sys/socket.h>
14940main()
14941{
14942 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14943 exit(1);
14944 else
14945 exit(0);
14946}
14947
Martin v. Löwis11437992002-04-12 09:54:03 +000014948_ACEOF
14949rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014950if { (ac_try="$ac_link"
14951case "(($ac_try" in
14952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14953 *) ac_try_echo=$ac_try;;
14954esac
14955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14956 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 ac_status=$?
14958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14959 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014960 { (case "(($ac_try" in
14961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14962 *) ac_try_echo=$ac_try;;
14963esac
14964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14965 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 ac_status=$?
14967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14968 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014969 { echo "$as_me:$LINENO: result: yes" >&5
14970echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014971 ipv6=yes
14972else
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 echo "$as_me: program exited with status $ac_status" >&5
14974echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014975sed 's/^/| /' conftest.$ac_ext >&5
14976
Martin v. Löwis11437992002-04-12 09:54:03 +000014977( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014978{ echo "$as_me:$LINENO: result: no" >&5
14979echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014980 ipv6=no
14981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014982rm -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 +000014983fi
14984
Martin v. Löwiseba40652007-08-30 20:10:57 +000014985
14986
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014987if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014988 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14989echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014991/* confdefs.h. */
14992_ACEOF
14993cat confdefs.h >>conftest.$ac_ext
14994cat >>conftest.$ac_ext <<_ACEOF
14995/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014996#include <sys/types.h>
14997#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014998int
14999main ()
15000{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015001struct sockaddr_in6 x;
15002x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 ;
15004 return 0;
15005}
15006_ACEOF
15007rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015008if { (ac_try="$ac_compile"
15009case "(($ac_try" in
15010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15011 *) ac_try_echo=$ac_try;;
15012esac
15013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015016 grep -v '^ *+' conftest.er1 >conftest.err
15017 rm -f conftest.er1
15018 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015020 (exit $ac_status); } && {
15021 test -z "$ac_c_werror_flag" ||
15022 test ! -s conftest.err
15023 } && test -s conftest.$ac_objext; then
15024 { echo "$as_me:$LINENO: result: yes" >&5
15025echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015026 ipv6=yes
15027else
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015029sed 's/^/| /' conftest.$ac_ext >&5
15030
Martin v. Löwiseba40652007-08-30 20:10:57 +000015031 { echo "$as_me:$LINENO: result: no" >&5
15032echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015033 ipv6=no
15034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035
15036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015037fi
15038
15039if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015041#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015042_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015043
15044fi
15045
Martin v. Löwiseba40652007-08-30 20:10:57 +000015046fi
15047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015048
15049ipv6type=unknown
15050ipv6lib=none
15051ipv6trylibc=no
15052
15053if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15055echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015056 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15057 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015058 case $i in
15059 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015061/* confdefs.h. */
15062_ACEOF
15063cat confdefs.h >>conftest.$ac_ext
15064cat >>conftest.$ac_ext <<_ACEOF
15065/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015066
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015067#include <netinet/in.h>
15068#ifdef IPV6_INRIA_VERSION
15069yes
15070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015071_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015073 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015074 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015075fi
15076rm -f conftest*
15077
15078 ;;
15079 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015081/* confdefs.h. */
15082_ACEOF
15083cat confdefs.h >>conftest.$ac_ext
15084cat >>conftest.$ac_ext <<_ACEOF
15085/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015086
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015087#include <netinet/in.h>
15088#ifdef __KAME__
15089yes
15090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015091_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015092if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015093 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015094 ipv6type=$i;
15095 ipv6lib=inet6
15096 ipv6libdir=/usr/local/v6/lib
15097 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015098fi
15099rm -f conftest*
15100
15101 ;;
15102 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015104/* confdefs.h. */
15105_ACEOF
15106cat confdefs.h >>conftest.$ac_ext
15107cat >>conftest.$ac_ext <<_ACEOF
15108/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015109
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015110#include <features.h>
15111#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15112yes
15113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015114_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015116 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015117 ipv6type=$i;
15118 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015119fi
15120rm -f conftest*
15121
15122 ;;
15123 linux-inet6)
15124 if test -d /usr/inet6; then
15125 ipv6type=$i
15126 ipv6lib=inet6
15127 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015128 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015129 fi
15130 ;;
15131 solaris)
15132 if test -f /etc/netconfig; then
15133 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15134 ipv6type=$i
15135 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015136 fi
15137 fi
15138 ;;
15139 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015141/* confdefs.h. */
15142_ACEOF
15143cat confdefs.h >>conftest.$ac_ext
15144cat >>conftest.$ac_ext <<_ACEOF
15145/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015146
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015147#include <sys/param.h>
15148#ifdef _TOSHIBA_INET6
15149yes
15150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015151_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015153 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015154 ipv6type=$i;
15155 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015156 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015157fi
15158rm -f conftest*
15159
15160 ;;
15161 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015163/* confdefs.h. */
15164_ACEOF
15165cat confdefs.h >>conftest.$ac_ext
15166cat >>conftest.$ac_ext <<_ACEOF
15167/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015168
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015169#include </usr/local/v6/include/sys/v6config.h>
15170#ifdef __V6D__
15171yes
15172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015173_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015175 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015176 ipv6type=$i;
15177 ipv6lib=v6;
15178 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015179 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015180fi
15181rm -f conftest*
15182
15183 ;;
15184 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015185 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015186/* confdefs.h. */
15187_ACEOF
15188cat confdefs.h >>conftest.$ac_ext
15189cat >>conftest.$ac_ext <<_ACEOF
15190/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015191
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015192#include <sys/param.h>
15193#ifdef _ZETA_MINAMI_INET6
15194yes
15195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015196_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015197if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015198 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015199 ipv6type=$i;
15200 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015201 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015202fi
15203rm -f conftest*
15204
15205 ;;
15206 esac
15207 if test "$ipv6type" != "unknown"; then
15208 break
15209 fi
15210 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015211 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15212echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015213fi
15214
15215if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15216 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15217 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15218 echo "using lib$ipv6lib"
15219 else
15220 if test $ipv6trylibc = "yes"; then
15221 echo "using libc"
15222 else
15223 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15224 echo "You need to fetch lib$ipv6lib.a from appropriate"
15225 echo 'ipv6 kit and compile beforehand.'
15226 exit 1
15227 fi
15228 fi
15229fi
15230
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015231# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015232{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15233echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015234
Martin v. Löwiseba40652007-08-30 20:10:57 +000015235# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015236if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237 withval=$with_doc_strings;
15238fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015239
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015240
15241if test -z "$with_doc_strings"
15242then with_doc_strings="yes"
15243fi
15244if test "$with_doc_strings" != "no"
15245then
15246
15247cat >>confdefs.h <<\_ACEOF
15248#define WITH_DOC_STRINGS 1
15249_ACEOF
15250
15251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015252{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15253echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015254
Neil Schemenauera35c6882001-02-27 04:45:05 +000015255# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015256{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15257echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015258
Martin v. Löwiseba40652007-08-30 20:10:57 +000015259# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015260if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015261 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015262if test "$withval" != no
15263then
15264
15265cat >>confdefs.h <<\_ACEOF
15266#define WITH_TSC 1
15267_ACEOF
15268
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269 { echo "$as_me:$LINENO: result: yes" >&5
15270echo "${ECHO_T}yes" >&6; }
15271else { echo "$as_me:$LINENO: result: no" >&5
15272echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015273fi
15274else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015275 { echo "$as_me:$LINENO: result: no" >&5
15276echo "${ECHO_T}no" >&6; }
15277fi
15278
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015279
15280# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015281{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15282echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015283
Martin v. Löwiseba40652007-08-30 20:10:57 +000015284# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015285if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015286 withval=$with_pymalloc;
15287fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015288
Neil Schemenauera35c6882001-02-27 04:45:05 +000015289
Neil Schemenauer16c22972002-03-22 15:34:49 +000015290if test -z "$with_pymalloc"
15291then with_pymalloc="yes"
15292fi
15293if test "$with_pymalloc" != "no"
15294then
Martin v. Löwis11437992002-04-12 09:54:03 +000015295
15296cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015297#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015298_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015299
15300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015301{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15302echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015303
Barry Warsawef82cd72000-06-30 16:21:01 +000015304# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015305{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15306echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015307
Martin v. Löwiseba40652007-08-30 20:10:57 +000015308# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015309if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015310 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015311if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015312then
15313
15314cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015315#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015316_ACEOF
15317
Martin v. Löwiseba40652007-08-30 20:10:57 +000015318 { echo "$as_me:$LINENO: result: yes" >&5
15319echo "${ECHO_T}yes" >&6; }
15320else { echo "$as_me:$LINENO: result: no" >&5
15321echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015322fi
15323else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015324 { echo "$as_me:$LINENO: result: no" >&5
15325echo "${ECHO_T}no" >&6; }
15326fi
15327
Barry Warsawef82cd72000-06-30 16:21:01 +000015328
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015329# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015330
Guido van Rossum98935bf2001-09-05 19:13:16 +000015331DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015332
Guido van Rossume97ee181999-12-20 21:27:22 +000015333# the dlopen() function means we might want to use dynload_shlib.o. some
15334# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015335
Thomas Wouters3a584202000-08-05 23:28:51 +000015336for ac_func in dlopen
15337do
Martin v. Löwis11437992002-04-12 09:54:03 +000015338as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015339{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15340echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15341if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015343else
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 cat >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öwis4ddc78a2006-01-29 09:53:44 +000015350/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15351 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15352#define $ac_func innocuous_$ac_func
15353
Guido van Rossume97ee181999-12-20 21:27:22 +000015354/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015355 which can conflict with char $ac_func (); below.
15356 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015357 <limits.h> exists even on freestanding compilers. */
15358
15359#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015360# include <limits.h>
15361#else
15362# include <assert.h>
15363#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015364
15365#undef $ac_func
15366
Martin v. Löwiseba40652007-08-30 20:10:57 +000015367/* Override any GCC internal prototype to avoid an error.
15368 Use char because int might match the return type of a GCC
15369 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015370#ifdef __cplusplus
15371extern "C"
15372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015373char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015374/* The GNU C library defines this for functions which it implements
15375 to always fail with ENOSYS. Some functions are actually named
15376 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015377#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015378choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015379#endif
15380
Skip Montanaro6dead952003-09-25 14:50:04 +000015381int
15382main ()
15383{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015384return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015385 ;
15386 return 0;
15387}
15388_ACEOF
15389rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390if { (ac_try="$ac_link"
15391case "(($ac_try" in
15392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15393 *) ac_try_echo=$ac_try;;
15394esac
15395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15396 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015398 grep -v '^ *+' conftest.er1 >conftest.err
15399 rm -f conftest.er1
15400 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015402 (exit $ac_status); } && {
15403 test -z "$ac_c_werror_flag" ||
15404 test ! -s conftest.err
15405 } && test -s conftest$ac_exeext &&
15406 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015407 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015408else
Martin v. Löwis11437992002-04-12 09:54:03 +000015409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015410sed 's/^/| /' conftest.$ac_ext >&5
15411
Martin v. Löwiseba40652007-08-30 20:10:57 +000015412 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015414
15415rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015416 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015418ac_res=`eval echo '${'$as_ac_var'}'`
15419 { echo "$as_me:$LINENO: result: $ac_res" >&5
15420echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015421if test `eval echo '${'$as_ac_var'}'` = yes; then
15422 cat >>confdefs.h <<_ACEOF
15423#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15424_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015425
Guido van Rossume97ee181999-12-20 21:27:22 +000015426fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015427done
Guido van Rossume97ee181999-12-20 21:27:22 +000015428
Michael W. Hudson54241132001-12-07 15:38:26 +000015429
Guido van Rossume97ee181999-12-20 21:27:22 +000015430# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15431# loading of modules.
15432
Martin v. Löwiseba40652007-08-30 20:10:57 +000015433{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15434echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015435if test -z "$DYNLOADFILE"
15436then
15437 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015438 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15439 if test "$ac_cv_func_dlopen" = yes
15440 then DYNLOADFILE="dynload_shlib.o"
15441 else DYNLOADFILE="dynload_aix.o"
15442 fi
15443 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015444 BeOS*) DYNLOADFILE="dynload_beos.o";;
15445 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015446 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15447 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015448 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015449 *)
15450 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15451 # out any dynamic loading
15452 if test "$ac_cv_func_dlopen" = yes
15453 then DYNLOADFILE="dynload_shlib.o"
15454 else DYNLOADFILE="dynload_stub.o"
15455 fi
15456 ;;
15457 esac
15458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015459{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15460echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015461if test "$DYNLOADFILE" != "dynload_stub.o"
15462then
Martin v. Löwis11437992002-04-12 09:54:03 +000015463
15464cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015465#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015466_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015467
15468fi
15469
Neil Schemenauer4e425612001-06-19 15:44:15 +000015470# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15471
Michael W. Hudson54241132001-12-07 15:38:26 +000015472
Martin v. Löwiseba40652007-08-30 20:10:57 +000015473{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15474echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015475if test -z "$MACHDEP_OBJS"
15476then
Jack Jansene578a632001-08-15 01:27:14 +000015477 MACHDEP_OBJS=$extra_machdep_objs
15478else
15479 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015481{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15482echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015483
Guido van Rossum627b2d71993-12-24 10:39:16 +000015484# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
Martin v. Löwisd6320502004-08-12 13:45:08 +000015556
Martin v. Löwisc3001752005-01-23 09:27:24 +000015557
15558
Neal Norwitz05a45592006-03-20 06:30:08 +000015559
15560
Martin v. Löwis382abef2007-02-19 10:55:19 +000015561
15562
Christian Heimes36281872007-11-30 21:11:28 +000015563
Martin v. Löwisaef18b12008-03-24 13:31:16 +000015564
15565
15566for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
15567 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015568 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015569 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015570 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015571 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015572 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015573 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015574 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015575 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015576 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015577 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015578do
Martin v. Löwis11437992002-04-12 09:54:03 +000015579as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015580{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15581echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15582if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015584else
Martin v. Löwis11437992002-04-12 09:54:03 +000015585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015586/* confdefs.h. */
15587_ACEOF
15588cat confdefs.h >>conftest.$ac_ext
15589cat >>conftest.$ac_ext <<_ACEOF
15590/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015591/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15592 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15593#define $ac_func innocuous_$ac_func
15594
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015595/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015596 which can conflict with char $ac_func (); below.
15597 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015598 <limits.h> exists even on freestanding compilers. */
15599
15600#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015601# include <limits.h>
15602#else
15603# include <assert.h>
15604#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015605
15606#undef $ac_func
15607
Martin v. Löwiseba40652007-08-30 20:10:57 +000015608/* Override any GCC internal prototype to avoid an error.
15609 Use char because int might match the return type of a GCC
15610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015611#ifdef __cplusplus
15612extern "C"
15613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015614char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015615/* The GNU C library defines this for functions which it implements
15616 to always fail with ENOSYS. Some functions are actually named
15617 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015618#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015619choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015620#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015621
Skip Montanaro6dead952003-09-25 14:50:04 +000015622int
15623main ()
15624{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015625return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015626 ;
15627 return 0;
15628}
15629_ACEOF
15630rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015631if { (ac_try="$ac_link"
15632case "(($ac_try" in
15633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15634 *) ac_try_echo=$ac_try;;
15635esac
15636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15637 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015639 grep -v '^ *+' conftest.er1 >conftest.err
15640 rm -f conftest.er1
15641 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015643 (exit $ac_status); } && {
15644 test -z "$ac_c_werror_flag" ||
15645 test ! -s conftest.err
15646 } && test -s conftest$ac_exeext &&
15647 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015649else
Martin v. Löwis11437992002-04-12 09:54:03 +000015650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015651sed 's/^/| /' conftest.$ac_ext >&5
15652
Martin v. Löwiseba40652007-08-30 20:10:57 +000015653 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015655
15656rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015657 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015658fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015659ac_res=`eval echo '${'$as_ac_var'}'`
15660 { echo "$as_me:$LINENO: result: $ac_res" >&5
15661echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015662if test `eval echo '${'$as_ac_var'}'` = yes; then
15663 cat >>confdefs.h <<_ACEOF
15664#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15665_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015666
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015667fi
15668done
15669
Michael W. Hudson54241132001-12-07 15:38:26 +000015670
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015671# For some functions, having a definition is not sufficient, since
15672# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015673{ echo "$as_me:$LINENO: checking for chroot" >&5
15674echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015676/* confdefs.h. */
15677_ACEOF
15678cat confdefs.h >>conftest.$ac_ext
15679cat >>conftest.$ac_ext <<_ACEOF
15680/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015681#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015682int
15683main ()
15684{
15685void *x=chroot
15686 ;
15687 return 0;
15688}
15689_ACEOF
15690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015691if { (ac_try="$ac_compile"
15692case "(($ac_try" in
15693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15694 *) ac_try_echo=$ac_try;;
15695esac
15696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015699 grep -v '^ *+' conftest.er1 >conftest.err
15700 rm -f conftest.er1
15701 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015703 (exit $ac_status); } && {
15704 test -z "$ac_c_werror_flag" ||
15705 test ! -s conftest.err
15706 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015707
15708cat >>confdefs.h <<\_ACEOF
15709#define HAVE_CHROOT 1
15710_ACEOF
15711
Martin v. Löwiseba40652007-08-30 20:10:57 +000015712 { echo "$as_me:$LINENO: result: yes" >&5
15713echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015714else
15715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015716sed 's/^/| /' conftest.$ac_ext >&5
15717
Martin v. Löwiseba40652007-08-30 20:10:57 +000015718 { echo "$as_me:$LINENO: result: no" >&5
15719echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015720
15721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015722
15723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15724{ echo "$as_me:$LINENO: checking for link" >&5
15725echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015726cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015727/* confdefs.h. */
15728_ACEOF
15729cat confdefs.h >>conftest.$ac_ext
15730cat >>conftest.$ac_ext <<_ACEOF
15731/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015732#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015733int
15734main ()
15735{
15736void *x=link
15737 ;
15738 return 0;
15739}
15740_ACEOF
15741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015742if { (ac_try="$ac_compile"
15743case "(($ac_try" in
15744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15745 *) ac_try_echo=$ac_try;;
15746esac
15747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015750 grep -v '^ *+' conftest.er1 >conftest.err
15751 rm -f conftest.er1
15752 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015754 (exit $ac_status); } && {
15755 test -z "$ac_c_werror_flag" ||
15756 test ! -s conftest.err
15757 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015758
15759cat >>confdefs.h <<\_ACEOF
15760#define HAVE_LINK 1
15761_ACEOF
15762
Martin v. Löwiseba40652007-08-30 20:10:57 +000015763 { echo "$as_me:$LINENO: result: yes" >&5
15764echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015765else
15766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015767sed 's/^/| /' conftest.$ac_ext >&5
15768
Martin v. Löwiseba40652007-08-30 20:10:57 +000015769 { echo "$as_me:$LINENO: result: no" >&5
15770echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015771
15772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015773
15774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15775{ echo "$as_me:$LINENO: checking for symlink" >&5
15776echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015778/* confdefs.h. */
15779_ACEOF
15780cat confdefs.h >>conftest.$ac_ext
15781cat >>conftest.$ac_ext <<_ACEOF
15782/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015783#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015784int
15785main ()
15786{
15787void *x=symlink
15788 ;
15789 return 0;
15790}
15791_ACEOF
15792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015793if { (ac_try="$ac_compile"
15794case "(($ac_try" in
15795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15796 *) ac_try_echo=$ac_try;;
15797esac
15798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015801 grep -v '^ *+' conftest.er1 >conftest.err
15802 rm -f conftest.er1
15803 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015805 (exit $ac_status); } && {
15806 test -z "$ac_c_werror_flag" ||
15807 test ! -s conftest.err
15808 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015809
15810cat >>confdefs.h <<\_ACEOF
15811#define HAVE_SYMLINK 1
15812_ACEOF
15813
Martin v. Löwiseba40652007-08-30 20:10:57 +000015814 { echo "$as_me:$LINENO: result: yes" >&5
15815echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015816else
15817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015818sed 's/^/| /' conftest.$ac_ext >&5
15819
Martin v. Löwiseba40652007-08-30 20:10:57 +000015820 { echo "$as_me:$LINENO: result: no" >&5
15821echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015822
15823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015824
15825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15826{ echo "$as_me:$LINENO: checking for fchdir" >&5
15827echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015829/* confdefs.h. */
15830_ACEOF
15831cat confdefs.h >>conftest.$ac_ext
15832cat >>conftest.$ac_ext <<_ACEOF
15833/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015834#include <unistd.h>
15835int
15836main ()
15837{
15838void *x=fchdir
15839 ;
15840 return 0;
15841}
15842_ACEOF
15843rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015844if { (ac_try="$ac_compile"
15845case "(($ac_try" in
15846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15847 *) ac_try_echo=$ac_try;;
15848esac
15849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15850 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015852 grep -v '^ *+' conftest.er1 >conftest.err
15853 rm -f conftest.er1
15854 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015856 (exit $ac_status); } && {
15857 test -z "$ac_c_werror_flag" ||
15858 test ! -s conftest.err
15859 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015860
15861cat >>confdefs.h <<\_ACEOF
15862#define HAVE_FCHDIR 1
15863_ACEOF
15864
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865 { echo "$as_me:$LINENO: result: yes" >&5
15866echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015867else
15868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015869sed 's/^/| /' conftest.$ac_ext >&5
15870
Martin v. Löwiseba40652007-08-30 20:10:57 +000015871 { echo "$as_me:$LINENO: result: no" >&5
15872echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015873
15874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015875
15876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15877{ echo "$as_me:$LINENO: checking for fsync" >&5
15878echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015880/* confdefs.h. */
15881_ACEOF
15882cat confdefs.h >>conftest.$ac_ext
15883cat >>conftest.$ac_ext <<_ACEOF
15884/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015885#include <unistd.h>
15886int
15887main ()
15888{
15889void *x=fsync
15890 ;
15891 return 0;
15892}
15893_ACEOF
15894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015895if { (ac_try="$ac_compile"
15896case "(($ac_try" in
15897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15898 *) ac_try_echo=$ac_try;;
15899esac
15900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015903 grep -v '^ *+' conftest.er1 >conftest.err
15904 rm -f conftest.er1
15905 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015907 (exit $ac_status); } && {
15908 test -z "$ac_c_werror_flag" ||
15909 test ! -s conftest.err
15910 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015911
15912cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015913#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015914_ACEOF
15915
Martin v. Löwiseba40652007-08-30 20:10:57 +000015916 { echo "$as_me:$LINENO: result: yes" >&5
15917echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015918else
15919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015920sed 's/^/| /' conftest.$ac_ext >&5
15921
Martin v. Löwiseba40652007-08-30 20:10:57 +000015922 { echo "$as_me:$LINENO: result: no" >&5
15923echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015924
15925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015926
15927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15928{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15929echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015931/* confdefs.h. */
15932_ACEOF
15933cat confdefs.h >>conftest.$ac_ext
15934cat >>conftest.$ac_ext <<_ACEOF
15935/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015936#include <unistd.h>
15937int
15938main ()
15939{
15940void *x=fdatasync
15941 ;
15942 return 0;
15943}
15944_ACEOF
15945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015946if { (ac_try="$ac_compile"
15947case "(($ac_try" in
15948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15949 *) ac_try_echo=$ac_try;;
15950esac
15951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015954 grep -v '^ *+' conftest.er1 >conftest.err
15955 rm -f conftest.er1
15956 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015958 (exit $ac_status); } && {
15959 test -z "$ac_c_werror_flag" ||
15960 test ! -s conftest.err
15961 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015962
15963cat >>confdefs.h <<\_ACEOF
15964#define HAVE_FDATASYNC 1
15965_ACEOF
15966
Martin v. Löwiseba40652007-08-30 20:10:57 +000015967 { echo "$as_me:$LINENO: result: yes" >&5
15968echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015969else
15970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015971sed 's/^/| /' conftest.$ac_ext >&5
15972
Martin v. Löwiseba40652007-08-30 20:10:57 +000015973 { echo "$as_me:$LINENO: result: no" >&5
15974echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015975
15976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015977
15978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015979{ echo "$as_me:$LINENO: checking for epoll" >&5
15980echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
15981cat >conftest.$ac_ext <<_ACEOF
15982/* confdefs.h. */
15983_ACEOF
15984cat confdefs.h >>conftest.$ac_ext
15985cat >>conftest.$ac_ext <<_ACEOF
15986/* end confdefs.h. */
15987#include <sys/epoll.h>
15988int
15989main ()
15990{
15991void *x=epoll_create
15992 ;
15993 return 0;
15994}
15995_ACEOF
15996rm -f conftest.$ac_objext
15997if { (ac_try="$ac_compile"
15998case "(($ac_try" in
15999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16000 *) ac_try_echo=$ac_try;;
16001esac
16002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16003 (eval "$ac_compile") 2>conftest.er1
16004 ac_status=$?
16005 grep -v '^ *+' conftest.er1 >conftest.err
16006 rm -f conftest.er1
16007 cat conftest.err >&5
16008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16009 (exit $ac_status); } && {
16010 test -z "$ac_c_werror_flag" ||
16011 test ! -s conftest.err
16012 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016013
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016014cat >>confdefs.h <<\_ACEOF
16015#define HAVE_EPOLL 1
16016_ACEOF
16017
16018 { echo "$as_me:$LINENO: result: yes" >&5
16019echo "${ECHO_T}yes" >&6; }
16020else
16021 echo "$as_me: failed program was:" >&5
16022sed 's/^/| /' conftest.$ac_ext >&5
16023
16024 { echo "$as_me:$LINENO: result: no" >&5
16025echo "${ECHO_T}no" >&6; }
16026
16027fi
16028
16029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16030{ echo "$as_me:$LINENO: checking for kqueue" >&5
16031echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16032cat >conftest.$ac_ext <<_ACEOF
16033/* confdefs.h. */
16034_ACEOF
16035cat confdefs.h >>conftest.$ac_ext
16036cat >>conftest.$ac_ext <<_ACEOF
16037/* end confdefs.h. */
16038
16039#include <sys/types.h>
16040#include <sys/event.h>
16041
16042int
16043main ()
16044{
16045int x=kqueue()
16046 ;
16047 return 0;
16048}
16049_ACEOF
16050rm -f conftest.$ac_objext
16051if { (ac_try="$ac_compile"
16052case "(($ac_try" in
16053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16054 *) ac_try_echo=$ac_try;;
16055esac
16056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16057 (eval "$ac_compile") 2>conftest.er1
16058 ac_status=$?
16059 grep -v '^ *+' conftest.er1 >conftest.err
16060 rm -f conftest.er1
16061 cat conftest.err >&5
16062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16063 (exit $ac_status); } && {
16064 test -z "$ac_c_werror_flag" ||
16065 test ! -s conftest.err
16066 } && test -s conftest.$ac_objext; then
16067
16068cat >>confdefs.h <<\_ACEOF
16069#define HAVE_KQUEUE 1
16070_ACEOF
16071
16072 { echo "$as_me:$LINENO: result: yes" >&5
16073echo "${ECHO_T}yes" >&6; }
16074else
16075 echo "$as_me: failed program was:" >&5
16076sed 's/^/| /' conftest.$ac_ext >&5
16077
16078 { echo "$as_me:$LINENO: result: no" >&5
16079echo "${ECHO_T}no" >&6; }
16080
16081fi
16082
16083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016084# On some systems (eg. FreeBSD 5), we would find a definition of the
16085# functions ctermid_r, setgroups in the library, but no prototype
16086# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16087# address to avoid compiler warnings and potential miscompilations
16088# because of the missing prototypes.
16089
Martin v. Löwiseba40652007-08-30 20:10:57 +000016090{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16091echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016092cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016093/* confdefs.h. */
16094_ACEOF
16095cat confdefs.h >>conftest.$ac_ext
16096cat >>conftest.$ac_ext <<_ACEOF
16097/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016098
16099#include "confdefs.h"
16100#include <stdio.h>
16101
Martin v. Löwisd5843682002-11-21 20:41:28 +000016102int
16103main ()
16104{
16105void* p = ctermid_r
16106 ;
16107 return 0;
16108}
16109_ACEOF
16110rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016111if { (ac_try="$ac_compile"
16112case "(($ac_try" in
16113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16114 *) ac_try_echo=$ac_try;;
16115esac
16116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016119 grep -v '^ *+' conftest.er1 >conftest.err
16120 rm -f conftest.er1
16121 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016123 (exit $ac_status); } && {
16124 test -z "$ac_c_werror_flag" ||
16125 test ! -s conftest.err
16126 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016127
16128cat >>confdefs.h <<\_ACEOF
16129#define HAVE_CTERMID_R 1
16130_ACEOF
16131
Martin v. Löwiseba40652007-08-30 20:10:57 +000016132 { echo "$as_me:$LINENO: result: yes" >&5
16133echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016134else
16135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016136sed 's/^/| /' conftest.$ac_ext >&5
16137
Martin v. Löwiseba40652007-08-30 20:10:57 +000016138 { echo "$as_me:$LINENO: result: no" >&5
16139echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016140
16141fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016142
Martin v. Löwiseba40652007-08-30 20:10:57 +000016143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16144
16145{ echo "$as_me:$LINENO: checking for flock" >&5
16146echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016148/* confdefs.h. */
16149_ACEOF
16150cat confdefs.h >>conftest.$ac_ext
16151cat >>conftest.$ac_ext <<_ACEOF
16152/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016153
16154#include "confdefs.h"
16155#include <sys/file.h>
16156
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016157int
16158main ()
16159{
16160void* p = flock
16161 ;
16162 return 0;
16163}
16164_ACEOF
16165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166if { (ac_try="$ac_compile"
16167case "(($ac_try" in
16168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16169 *) ac_try_echo=$ac_try;;
16170esac
16171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016174 grep -v '^ *+' conftest.er1 >conftest.err
16175 rm -f conftest.er1
16176 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016178 (exit $ac_status); } && {
16179 test -z "$ac_c_werror_flag" ||
16180 test ! -s conftest.err
16181 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016182
16183cat >>confdefs.h <<\_ACEOF
16184#define HAVE_FLOCK 1
16185_ACEOF
16186
Martin v. Löwiseba40652007-08-30 20:10:57 +000016187 { echo "$as_me:$LINENO: result: yes" >&5
16188echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016189else
16190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016191sed 's/^/| /' conftest.$ac_ext >&5
16192
Martin v. Löwiseba40652007-08-30 20:10:57 +000016193 { echo "$as_me:$LINENO: result: no" >&5
16194echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016195
16196fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016197
Martin v. Löwiseba40652007-08-30 20:10:57 +000016198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16199
16200{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16201echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016202cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016203/* confdefs.h. */
16204_ACEOF
16205cat confdefs.h >>conftest.$ac_ext
16206cat >>conftest.$ac_ext <<_ACEOF
16207/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016208
16209#include "confdefs.h"
16210#include <unistd.h>
16211
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016212int
16213main ()
16214{
16215void* p = getpagesize
16216 ;
16217 return 0;
16218}
16219_ACEOF
16220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016221if { (ac_try="$ac_compile"
16222case "(($ac_try" in
16223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16224 *) ac_try_echo=$ac_try;;
16225esac
16226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016229 grep -v '^ *+' conftest.er1 >conftest.err
16230 rm -f conftest.er1
16231 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016233 (exit $ac_status); } && {
16234 test -z "$ac_c_werror_flag" ||
16235 test ! -s conftest.err
16236 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016237
16238cat >>confdefs.h <<\_ACEOF
16239#define HAVE_GETPAGESIZE 1
16240_ACEOF
16241
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242 { echo "$as_me:$LINENO: result: yes" >&5
16243echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016244else
16245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016246sed 's/^/| /' conftest.$ac_ext >&5
16247
Martin v. Löwiseba40652007-08-30 20:10:57 +000016248 { echo "$as_me:$LINENO: result: no" >&5
16249echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016250
16251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016252
16253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016254
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016255for ac_prog in true
16256do
16257 # Extract the first word of "$ac_prog", so it can be a program name with args.
16258set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16260echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016261if test "${ac_cv_prog_TRUE+set}" = set; then
16262 echo $ECHO_N "(cached) $ECHO_C" >&6
16263else
16264 if test -n "$TRUE"; then
16265 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16266else
16267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16268for as_dir in $PATH
16269do
16270 IFS=$as_save_IFS
16271 test -z "$as_dir" && as_dir=.
16272 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016273 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 +000016274 ac_cv_prog_TRUE="$ac_prog"
16275 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16276 break 2
16277 fi
16278done
16279done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016280IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016281
16282fi
16283fi
16284TRUE=$ac_cv_prog_TRUE
16285if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016286 { echo "$as_me:$LINENO: result: $TRUE" >&5
16287echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016288else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016289 { echo "$as_me:$LINENO: result: no" >&5
16290echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016291fi
16292
Martin v. Löwiseba40652007-08-30 20:10:57 +000016293
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016294 test -n "$TRUE" && break
16295done
16296test -n "$TRUE" || TRUE="/bin/true"
16297
16298
Martin v. Löwiseba40652007-08-30 20:10:57 +000016299{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16300echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016301if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16302 echo $ECHO_N "(cached) $ECHO_C" >&6
16303else
16304 ac_check_lib_save_LIBS=$LIBS
16305LIBS="-lc $LIBS"
16306cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016307/* confdefs.h. */
16308_ACEOF
16309cat confdefs.h >>conftest.$ac_ext
16310cat >>conftest.$ac_ext <<_ACEOF
16311/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016312
Martin v. Löwiseba40652007-08-30 20:10:57 +000016313/* Override any GCC internal prototype to avoid an error.
16314 Use char because int might match the return type of a GCC
16315 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016316#ifdef __cplusplus
16317extern "C"
16318#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016319char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016320int
16321main ()
16322{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016323return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016324 ;
16325 return 0;
16326}
16327_ACEOF
16328rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016329if { (ac_try="$ac_link"
16330case "(($ac_try" in
16331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16332 *) ac_try_echo=$ac_try;;
16333esac
16334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16335 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016337 grep -v '^ *+' conftest.er1 >conftest.err
16338 rm -f conftest.er1
16339 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016341 (exit $ac_status); } && {
16342 test -z "$ac_c_werror_flag" ||
16343 test ! -s conftest.err
16344 } && test -s conftest$ac_exeext &&
16345 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016346 ac_cv_lib_c_inet_aton=yes
16347else
16348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016349sed 's/^/| /' conftest.$ac_ext >&5
16350
Martin v. Löwiseba40652007-08-30 20:10:57 +000016351 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016353
16354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016356LIBS=$ac_check_lib_save_LIBS
16357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016358{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16359echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016360if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016361 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016362else
16363
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16365echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016366if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16367 echo $ECHO_N "(cached) $ECHO_C" >&6
16368else
16369 ac_check_lib_save_LIBS=$LIBS
16370LIBS="-lresolv $LIBS"
16371cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016372/* confdefs.h. */
16373_ACEOF
16374cat confdefs.h >>conftest.$ac_ext
16375cat >>conftest.$ac_ext <<_ACEOF
16376/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016377
Martin v. Löwiseba40652007-08-30 20:10:57 +000016378/* Override any GCC internal prototype to avoid an error.
16379 Use char because int might match the return type of a GCC
16380 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016381#ifdef __cplusplus
16382extern "C"
16383#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016384char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016385int
16386main ()
16387{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016388return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016389 ;
16390 return 0;
16391}
16392_ACEOF
16393rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016394if { (ac_try="$ac_link"
16395case "(($ac_try" in
16396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16397 *) ac_try_echo=$ac_try;;
16398esac
16399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016402 grep -v '^ *+' conftest.er1 >conftest.err
16403 rm -f conftest.er1
16404 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016406 (exit $ac_status); } && {
16407 test -z "$ac_c_werror_flag" ||
16408 test ! -s conftest.err
16409 } && test -s conftest$ac_exeext &&
16410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016411 ac_cv_lib_resolv_inet_aton=yes
16412else
16413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016414sed 's/^/| /' conftest.$ac_ext >&5
16415
Martin v. Löwiseba40652007-08-30 20:10:57 +000016416 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016418
16419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016421LIBS=$ac_check_lib_save_LIBS
16422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016423{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16424echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016425if test $ac_cv_lib_resolv_inet_aton = yes; then
16426 cat >>confdefs.h <<_ACEOF
16427#define HAVE_LIBRESOLV 1
16428_ACEOF
16429
16430 LIBS="-lresolv $LIBS"
16431
16432fi
16433
16434
16435fi
16436
16437
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016438# On Tru64, chflags seems to be present, but calling it will
16439# exit Python
16440{ echo "$as_me:$LINENO: checking for chflags" >&5
16441echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16442if test "$cross_compiling" = yes; then
16443 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16444See \`config.log' for more details." >&5
16445echo "$as_me: error: cannot run test program while cross compiling
16446See \`config.log' for more details." >&2;}
16447 { (exit 1); exit 1; }; }
16448else
16449 cat >conftest.$ac_ext <<_ACEOF
16450/* confdefs.h. */
16451_ACEOF
16452cat confdefs.h >>conftest.$ac_ext
16453cat >>conftest.$ac_ext <<_ACEOF
16454/* end confdefs.h. */
16455
16456#include <sys/stat.h>
16457#include <unistd.h>
16458int main(int argc, char*argv[])
16459{
16460 if(chflags(argv[0], 0) != 0)
16461 return 1;
16462 return 0;
16463}
16464
16465_ACEOF
16466rm -f conftest$ac_exeext
16467if { (ac_try="$ac_link"
16468case "(($ac_try" in
16469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16470 *) ac_try_echo=$ac_try;;
16471esac
16472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16473 (eval "$ac_link") 2>&5
16474 ac_status=$?
16475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16476 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16477 { (case "(($ac_try" in
16478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16479 *) ac_try_echo=$ac_try;;
16480esac
16481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16482 (eval "$ac_try") 2>&5
16483 ac_status=$?
16484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16485 (exit $ac_status); }; }; then
16486
16487cat >>confdefs.h <<\_ACEOF
16488#define HAVE_CHFLAGS 1
16489_ACEOF
16490
16491 { echo "$as_me:$LINENO: result: yes" >&5
16492echo "${ECHO_T}yes" >&6; }
16493else
16494 echo "$as_me: program exited with status $ac_status" >&5
16495echo "$as_me: failed program was:" >&5
16496sed 's/^/| /' conftest.$ac_ext >&5
16497
16498( exit $ac_status )
16499{ echo "$as_me:$LINENO: result: no" >&5
16500echo "${ECHO_T}no" >&6; }
16501
16502fi
16503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16504fi
16505
16506
16507
16508{ echo "$as_me:$LINENO: checking for lchflags" >&5
16509echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16510if test "$cross_compiling" = yes; then
16511 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16512See \`config.log' for more details." >&5
16513echo "$as_me: error: cannot run test program while cross compiling
16514See \`config.log' for more details." >&2;}
16515 { (exit 1); exit 1; }; }
16516else
16517 cat >conftest.$ac_ext <<_ACEOF
16518/* confdefs.h. */
16519_ACEOF
16520cat confdefs.h >>conftest.$ac_ext
16521cat >>conftest.$ac_ext <<_ACEOF
16522/* end confdefs.h. */
16523
16524#include <sys/stat.h>
16525#include <unistd.h>
16526int main(int argc, char*argv[])
16527{
16528 if(lchflags(argv[0], 0) != 0)
16529 return 1;
16530 return 0;
16531}
16532
16533_ACEOF
16534rm -f conftest$ac_exeext
16535if { (ac_try="$ac_link"
16536case "(($ac_try" in
16537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16538 *) ac_try_echo=$ac_try;;
16539esac
16540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16541 (eval "$ac_link") 2>&5
16542 ac_status=$?
16543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16545 { (case "(($ac_try" in
16546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16547 *) ac_try_echo=$ac_try;;
16548esac
16549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16550 (eval "$ac_try") 2>&5
16551 ac_status=$?
16552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16553 (exit $ac_status); }; }; then
16554
16555cat >>confdefs.h <<\_ACEOF
16556#define HAVE_LCHFLAGS 1
16557_ACEOF
16558
16559 { echo "$as_me:$LINENO: result: yes" >&5
16560echo "${ECHO_T}yes" >&6; }
16561else
16562 echo "$as_me: program exited with status $ac_status" >&5
16563echo "$as_me: failed program was:" >&5
16564sed 's/^/| /' conftest.$ac_ext >&5
16565
16566( exit $ac_status )
16567{ echo "$as_me:$LINENO: result: no" >&5
16568echo "${ECHO_T}no" >&6; }
16569
16570fi
16571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16572fi
16573
16574
16575
Ronald Oussorenf8752642006-07-06 10:13:35 +000016576case $ac_sys_system/$ac_sys_release in
16577Darwin/*)
16578 _CUR_CFLAGS="${CFLAGS}"
16579 _CUR_LDFLAGS="${LDFLAGS}"
16580 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16581 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16582 ;;
16583esac
16584
Martin v. Löwiseba40652007-08-30 20:10:57 +000016585{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16586echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016587if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16588 echo $ECHO_N "(cached) $ECHO_C" >&6
16589else
16590 ac_check_lib_save_LIBS=$LIBS
16591LIBS="-lz $LIBS"
16592cat >conftest.$ac_ext <<_ACEOF
16593/* confdefs.h. */
16594_ACEOF
16595cat confdefs.h >>conftest.$ac_ext
16596cat >>conftest.$ac_ext <<_ACEOF
16597/* end confdefs.h. */
16598
Martin v. Löwiseba40652007-08-30 20:10:57 +000016599/* Override any GCC internal prototype to avoid an error.
16600 Use char because int might match the return type of a GCC
16601 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016602#ifdef __cplusplus
16603extern "C"
16604#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016605char inflateCopy ();
16606int
16607main ()
16608{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016609return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016610 ;
16611 return 0;
16612}
16613_ACEOF
16614rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016615if { (ac_try="$ac_link"
16616case "(($ac_try" in
16617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16618 *) ac_try_echo=$ac_try;;
16619esac
16620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16621 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016622 ac_status=$?
16623 grep -v '^ *+' conftest.er1 >conftest.err
16624 rm -f conftest.er1
16625 cat conftest.err >&5
16626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016627 (exit $ac_status); } && {
16628 test -z "$ac_c_werror_flag" ||
16629 test ! -s conftest.err
16630 } && test -s conftest$ac_exeext &&
16631 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016632 ac_cv_lib_z_inflateCopy=yes
16633else
16634 echo "$as_me: failed program was:" >&5
16635sed 's/^/| /' conftest.$ac_ext >&5
16636
Martin v. Löwiseba40652007-08-30 20:10:57 +000016637 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016639
16640rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016641 conftest$ac_exeext conftest.$ac_ext
16642LIBS=$ac_check_lib_save_LIBS
16643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016644{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16645echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016646if test $ac_cv_lib_z_inflateCopy = yes; then
16647
16648cat >>confdefs.h <<\_ACEOF
16649#define HAVE_ZLIB_COPY 1
16650_ACEOF
16651
16652fi
16653
16654
Ronald Oussorenf8752642006-07-06 10:13:35 +000016655case $ac_sys_system/$ac_sys_release in
16656Darwin/*)
16657 CFLAGS="${_CUR_CFLAGS}"
16658 LDFLAGS="${_CUR_LDFLAGS}"
16659 ;;
16660esac
16661
Martin v. Löwiseba40652007-08-30 20:10:57 +000016662{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16663echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016664cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016665/* confdefs.h. */
16666_ACEOF
16667cat confdefs.h >>conftest.$ac_ext
16668cat >>conftest.$ac_ext <<_ACEOF
16669/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016670
16671#include "confdefs.h"
16672#include <netdb.h>
16673
Martin v. Löwise9416172003-05-03 10:12:45 +000016674int
16675main ()
16676{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016677void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016678 ;
16679 return 0;
16680}
16681_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016682rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016683if { (ac_try="$ac_link"
16684case "(($ac_try" in
16685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16686 *) ac_try_echo=$ac_try;;
16687esac
16688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16689 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016691 grep -v '^ *+' conftest.er1 >conftest.err
16692 rm -f conftest.er1
16693 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016695 (exit $ac_status); } && {
16696 test -z "$ac_c_werror_flag" ||
16697 test ! -s conftest.err
16698 } && test -s conftest$ac_exeext &&
16699 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016700
16701cat >>confdefs.h <<\_ACEOF
16702#define HAVE_HSTRERROR 1
16703_ACEOF
16704
Martin v. Löwiseba40652007-08-30 20:10:57 +000016705 { echo "$as_me:$LINENO: result: yes" >&5
16706echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016707else
16708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016709sed 's/^/| /' conftest.$ac_ext >&5
16710
Martin v. Löwiseba40652007-08-30 20:10:57 +000016711 { echo "$as_me:$LINENO: result: no" >&5
16712echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016713
16714fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016715
16716rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016718
Martin v. Löwiseba40652007-08-30 20:10:57 +000016719{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16720echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016721cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016722/* confdefs.h. */
16723_ACEOF
16724cat confdefs.h >>conftest.$ac_ext
16725cat >>conftest.$ac_ext <<_ACEOF
16726/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016727
16728#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016729#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016730#include <sys/socket.h>
16731#include <netinet/in.h>
16732#include <arpa/inet.h>
16733
Martin v. Löwise9416172003-05-03 10:12:45 +000016734int
16735main ()
16736{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016737void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016738 ;
16739 return 0;
16740}
16741_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016742rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016743if { (ac_try="$ac_link"
16744case "(($ac_try" in
16745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16746 *) ac_try_echo=$ac_try;;
16747esac
16748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16749 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016751 grep -v '^ *+' conftest.er1 >conftest.err
16752 rm -f conftest.er1
16753 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016755 (exit $ac_status); } && {
16756 test -z "$ac_c_werror_flag" ||
16757 test ! -s conftest.err
16758 } && test -s conftest$ac_exeext &&
16759 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016760
16761cat >>confdefs.h <<\_ACEOF
16762#define HAVE_INET_ATON 1
16763_ACEOF
16764
Martin v. Löwiseba40652007-08-30 20:10:57 +000016765 { echo "$as_me:$LINENO: result: yes" >&5
16766echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016767else
16768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016769sed 's/^/| /' conftest.$ac_ext >&5
16770
Martin v. Löwiseba40652007-08-30 20:10:57 +000016771 { echo "$as_me:$LINENO: result: no" >&5
16772echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016773
16774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016775
16776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016777 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016778
Martin v. Löwiseba40652007-08-30 20:10:57 +000016779{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16780echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016782/* confdefs.h. */
16783_ACEOF
16784cat confdefs.h >>conftest.$ac_ext
16785cat >>conftest.$ac_ext <<_ACEOF
16786/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016787
16788#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016789#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016790#include <sys/socket.h>
16791#include <netinet/in.h>
16792#include <arpa/inet.h>
16793
Martin v. Löwise9416172003-05-03 10:12:45 +000016794int
16795main ()
16796{
16797void* p = inet_pton
16798 ;
16799 return 0;
16800}
16801_ACEOF
16802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016803if { (ac_try="$ac_compile"
16804case "(($ac_try" in
16805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16806 *) ac_try_echo=$ac_try;;
16807esac
16808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016811 grep -v '^ *+' conftest.er1 >conftest.err
16812 rm -f conftest.er1
16813 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016815 (exit $ac_status); } && {
16816 test -z "$ac_c_werror_flag" ||
16817 test ! -s conftest.err
16818 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016819
16820cat >>confdefs.h <<\_ACEOF
16821#define HAVE_INET_PTON 1
16822_ACEOF
16823
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824 { echo "$as_me:$LINENO: result: yes" >&5
16825echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016826else
16827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016828sed 's/^/| /' conftest.$ac_ext >&5
16829
Martin v. Löwiseba40652007-08-30 20:10:57 +000016830 { echo "$as_me:$LINENO: result: no" >&5
16831echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016832
16833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016834
16835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016836
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016837# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016838{ echo "$as_me:$LINENO: checking for setgroups" >&5
16839echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016840cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016841/* confdefs.h. */
16842_ACEOF
16843cat confdefs.h >>conftest.$ac_ext
16844cat >>conftest.$ac_ext <<_ACEOF
16845/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016846
16847#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016848#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016849#ifdef HAVE_GRP_H
16850#include <grp.h>
16851#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016852
Martin v. Löwisd5843682002-11-21 20:41:28 +000016853int
16854main ()
16855{
16856void* p = setgroups
16857 ;
16858 return 0;
16859}
16860_ACEOF
16861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016862if { (ac_try="$ac_compile"
16863case "(($ac_try" in
16864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16865 *) ac_try_echo=$ac_try;;
16866esac
16867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016870 grep -v '^ *+' conftest.er1 >conftest.err
16871 rm -f conftest.er1
16872 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016874 (exit $ac_status); } && {
16875 test -z "$ac_c_werror_flag" ||
16876 test ! -s conftest.err
16877 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016878
16879cat >>confdefs.h <<\_ACEOF
16880#define HAVE_SETGROUPS 1
16881_ACEOF
16882
Martin v. Löwiseba40652007-08-30 20:10:57 +000016883 { echo "$as_me:$LINENO: result: yes" >&5
16884echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016885else
16886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016887sed 's/^/| /' conftest.$ac_ext >&5
16888
Martin v. Löwiseba40652007-08-30 20:10:57 +000016889 { echo "$as_me:$LINENO: result: no" >&5
16890echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016891
16892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016893
16894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016895
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016896# check for openpty and forkpty
16897
Martin v. Löwis11437992002-04-12 09:54:03 +000016898
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016899for ac_func in openpty
16900do
Martin v. Löwis11437992002-04-12 09:54:03 +000016901as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016902{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16903echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16904if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016906else
Martin v. Löwis11437992002-04-12 09:54:03 +000016907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016908/* confdefs.h. */
16909_ACEOF
16910cat confdefs.h >>conftest.$ac_ext
16911cat >>conftest.$ac_ext <<_ACEOF
16912/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016913/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16914 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16915#define $ac_func innocuous_$ac_func
16916
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016917/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016918 which can conflict with char $ac_func (); below.
16919 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016920 <limits.h> exists even on freestanding compilers. */
16921
16922#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016923# include <limits.h>
16924#else
16925# include <assert.h>
16926#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016927
16928#undef $ac_func
16929
Martin v. Löwiseba40652007-08-30 20:10:57 +000016930/* Override any GCC internal prototype to avoid an error.
16931 Use char because int might match the return type of a GCC
16932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016933#ifdef __cplusplus
16934extern "C"
16935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016936char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016937/* The GNU C library defines this for functions which it implements
16938 to always fail with ENOSYS. Some functions are actually named
16939 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016940#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016941choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016942#endif
16943
Skip Montanaro6dead952003-09-25 14:50:04 +000016944int
16945main ()
16946{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016947return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016948 ;
16949 return 0;
16950}
16951_ACEOF
16952rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016953if { (ac_try="$ac_link"
16954case "(($ac_try" in
16955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16956 *) ac_try_echo=$ac_try;;
16957esac
16958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16959 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016961 grep -v '^ *+' conftest.er1 >conftest.err
16962 rm -f conftest.er1
16963 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016965 (exit $ac_status); } && {
16966 test -z "$ac_c_werror_flag" ||
16967 test ! -s conftest.err
16968 } && test -s conftest$ac_exeext &&
16969 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016970 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016971else
Martin v. Löwis11437992002-04-12 09:54:03 +000016972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016973sed 's/^/| /' conftest.$ac_ext >&5
16974
Martin v. Löwiseba40652007-08-30 20:10:57 +000016975 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016977
16978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016979 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016981ac_res=`eval echo '${'$as_ac_var'}'`
16982 { echo "$as_me:$LINENO: result: $ac_res" >&5
16983echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016984if test `eval echo '${'$as_ac_var'}'` = yes; then
16985 cat >>confdefs.h <<_ACEOF
16986#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16987_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016988
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016989else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016990 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16991echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016992if test "${ac_cv_lib_util_openpty+set}" = set; then
16993 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016994else
Martin v. Löwis11437992002-04-12 09:54:03 +000016995 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016996LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016998/* confdefs.h. */
16999_ACEOF
17000cat confdefs.h >>conftest.$ac_ext
17001cat >>conftest.$ac_ext <<_ACEOF
17002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017003
Martin v. Löwiseba40652007-08-30 20:10:57 +000017004/* Override any GCC internal prototype to avoid an error.
17005 Use char because int might match the return type of a GCC
17006 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017007#ifdef __cplusplus
17008extern "C"
17009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017010char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017011int
17012main ()
17013{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017014return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017015 ;
17016 return 0;
17017}
17018_ACEOF
17019rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017020if { (ac_try="$ac_link"
17021case "(($ac_try" in
17022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17023 *) ac_try_echo=$ac_try;;
17024esac
17025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17026 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017028 grep -v '^ *+' conftest.er1 >conftest.err
17029 rm -f conftest.er1
17030 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017032 (exit $ac_status); } && {
17033 test -z "$ac_c_werror_flag" ||
17034 test ! -s conftest.err
17035 } && test -s conftest$ac_exeext &&
17036 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017037 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017038else
Martin v. Löwis11437992002-04-12 09:54:03 +000017039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017040sed 's/^/| /' conftest.$ac_ext >&5
17041
Martin v. Löwiseba40652007-08-30 20:10:57 +000017042 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017044
17045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017046 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017047LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017049{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17050echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017051if test $ac_cv_lib_util_openpty = yes; then
17052 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017053#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017054_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017055 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017056else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017057 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17058echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017059if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17060 echo $ECHO_N "(cached) $ECHO_C" >&6
17061else
17062 ac_check_lib_save_LIBS=$LIBS
17063LIBS="-lbsd $LIBS"
17064cat >conftest.$ac_ext <<_ACEOF
17065/* confdefs.h. */
17066_ACEOF
17067cat confdefs.h >>conftest.$ac_ext
17068cat >>conftest.$ac_ext <<_ACEOF
17069/* end confdefs.h. */
17070
Martin v. Löwiseba40652007-08-30 20:10:57 +000017071/* Override any GCC internal prototype to avoid an error.
17072 Use char because int might match the return type of a GCC
17073 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017074#ifdef __cplusplus
17075extern "C"
17076#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017077char openpty ();
17078int
17079main ()
17080{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017081return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017082 ;
17083 return 0;
17084}
17085_ACEOF
17086rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017087if { (ac_try="$ac_link"
17088case "(($ac_try" in
17089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17090 *) ac_try_echo=$ac_try;;
17091esac
17092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17093 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017094 ac_status=$?
17095 grep -v '^ *+' conftest.er1 >conftest.err
17096 rm -f conftest.er1
17097 cat conftest.err >&5
17098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017099 (exit $ac_status); } && {
17100 test -z "$ac_c_werror_flag" ||
17101 test ! -s conftest.err
17102 } && test -s conftest$ac_exeext &&
17103 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017104 ac_cv_lib_bsd_openpty=yes
17105else
17106 echo "$as_me: failed program was:" >&5
17107sed 's/^/| /' conftest.$ac_ext >&5
17108
Martin v. Löwiseba40652007-08-30 20:10:57 +000017109 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017111
17112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017113 conftest$ac_exeext conftest.$ac_ext
17114LIBS=$ac_check_lib_save_LIBS
17115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017116{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17117echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017118if test $ac_cv_lib_bsd_openpty = yes; then
17119 cat >>confdefs.h <<\_ACEOF
17120#define HAVE_OPENPTY 1
17121_ACEOF
17122 LIBS="$LIBS -lbsd"
17123fi
17124
17125
17126fi
17127
Fred Drake8cef4cf2000-06-28 16:40:38 +000017128
17129fi
17130done
17131
Martin v. Löwis11437992002-04-12 09:54:03 +000017132
Fred Drake8cef4cf2000-06-28 16:40:38 +000017133for ac_func in forkpty
17134do
Martin v. Löwis11437992002-04-12 09:54:03 +000017135as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017136{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17137echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17138if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017139 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017140else
Martin v. Löwis11437992002-04-12 09:54:03 +000017141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017142/* confdefs.h. */
17143_ACEOF
17144cat confdefs.h >>conftest.$ac_ext
17145cat >>conftest.$ac_ext <<_ACEOF
17146/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017147/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17148 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17149#define $ac_func innocuous_$ac_func
17150
Fred Drake8cef4cf2000-06-28 16:40:38 +000017151/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017152 which can conflict with char $ac_func (); below.
17153 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017154 <limits.h> exists even on freestanding compilers. */
17155
17156#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017157# include <limits.h>
17158#else
17159# include <assert.h>
17160#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017161
17162#undef $ac_func
17163
Martin v. Löwiseba40652007-08-30 20:10:57 +000017164/* Override any GCC internal prototype to avoid an error.
17165 Use char because int might match the return type of a GCC
17166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017167#ifdef __cplusplus
17168extern "C"
17169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017170char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017171/* The GNU C library defines this for functions which it implements
17172 to always fail with ENOSYS. Some functions are actually named
17173 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017174#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017175choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017176#endif
17177
Skip Montanaro6dead952003-09-25 14:50:04 +000017178int
17179main ()
17180{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017181return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017182 ;
17183 return 0;
17184}
17185_ACEOF
17186rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017187if { (ac_try="$ac_link"
17188case "(($ac_try" in
17189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17190 *) ac_try_echo=$ac_try;;
17191esac
17192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17193 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017195 grep -v '^ *+' conftest.er1 >conftest.err
17196 rm -f conftest.er1
17197 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017199 (exit $ac_status); } && {
17200 test -z "$ac_c_werror_flag" ||
17201 test ! -s conftest.err
17202 } && test -s conftest$ac_exeext &&
17203 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017204 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017205else
Martin v. Löwis11437992002-04-12 09:54:03 +000017206 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017207sed 's/^/| /' conftest.$ac_ext >&5
17208
Martin v. Löwiseba40652007-08-30 20:10:57 +000017209 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017210fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017211
17212rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017213 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017215ac_res=`eval echo '${'$as_ac_var'}'`
17216 { echo "$as_me:$LINENO: result: $ac_res" >&5
17217echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017218if test `eval echo '${'$as_ac_var'}'` = yes; then
17219 cat >>confdefs.h <<_ACEOF
17220#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17221_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017222
Fred Drake8cef4cf2000-06-28 16:40:38 +000017223else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017224 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17225echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017226if test "${ac_cv_lib_util_forkpty+set}" = set; then
17227 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017228else
Martin v. Löwis11437992002-04-12 09:54:03 +000017229 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017230LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017231cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017232/* confdefs.h. */
17233_ACEOF
17234cat confdefs.h >>conftest.$ac_ext
17235cat >>conftest.$ac_ext <<_ACEOF
17236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017237
Martin v. Löwiseba40652007-08-30 20:10:57 +000017238/* Override any GCC internal prototype to avoid an error.
17239 Use char because int might match the return type of a GCC
17240 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017241#ifdef __cplusplus
17242extern "C"
17243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017244char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017245int
17246main ()
17247{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017248return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017249 ;
17250 return 0;
17251}
17252_ACEOF
17253rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017254if { (ac_try="$ac_link"
17255case "(($ac_try" in
17256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17257 *) ac_try_echo=$ac_try;;
17258esac
17259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17260 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017262 grep -v '^ *+' conftest.er1 >conftest.err
17263 rm -f conftest.er1
17264 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017266 (exit $ac_status); } && {
17267 test -z "$ac_c_werror_flag" ||
17268 test ! -s conftest.err
17269 } && test -s conftest$ac_exeext &&
17270 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017271 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017272else
Martin v. Löwis11437992002-04-12 09:54:03 +000017273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017274sed 's/^/| /' conftest.$ac_ext >&5
17275
Martin v. Löwiseba40652007-08-30 20:10:57 +000017276 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017278
17279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017281LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017283{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17284echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017285if test $ac_cv_lib_util_forkpty = yes; then
17286 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017287#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017288_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017289 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017290else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017291 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17292echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017293if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17294 echo $ECHO_N "(cached) $ECHO_C" >&6
17295else
17296 ac_check_lib_save_LIBS=$LIBS
17297LIBS="-lbsd $LIBS"
17298cat >conftest.$ac_ext <<_ACEOF
17299/* confdefs.h. */
17300_ACEOF
17301cat confdefs.h >>conftest.$ac_ext
17302cat >>conftest.$ac_ext <<_ACEOF
17303/* end confdefs.h. */
17304
Martin v. Löwiseba40652007-08-30 20:10:57 +000017305/* Override any GCC internal prototype to avoid an error.
17306 Use char because int might match the return type of a GCC
17307 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017308#ifdef __cplusplus
17309extern "C"
17310#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017311char forkpty ();
17312int
17313main ()
17314{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017315return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017316 ;
17317 return 0;
17318}
17319_ACEOF
17320rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017321if { (ac_try="$ac_link"
17322case "(($ac_try" in
17323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17324 *) ac_try_echo=$ac_try;;
17325esac
17326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17327 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017328 ac_status=$?
17329 grep -v '^ *+' conftest.er1 >conftest.err
17330 rm -f conftest.er1
17331 cat conftest.err >&5
17332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017333 (exit $ac_status); } && {
17334 test -z "$ac_c_werror_flag" ||
17335 test ! -s conftest.err
17336 } && test -s conftest$ac_exeext &&
17337 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017338 ac_cv_lib_bsd_forkpty=yes
17339else
17340 echo "$as_me: failed program was:" >&5
17341sed 's/^/| /' conftest.$ac_ext >&5
17342
Martin v. Löwiseba40652007-08-30 20:10:57 +000017343 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017345
17346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017347 conftest$ac_exeext conftest.$ac_ext
17348LIBS=$ac_check_lib_save_LIBS
17349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017350{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17351echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017352if test $ac_cv_lib_bsd_forkpty = yes; then
17353 cat >>confdefs.h <<\_ACEOF
17354#define HAVE_FORKPTY 1
17355_ACEOF
17356 LIBS="$LIBS -lbsd"
17357fi
17358
17359
17360fi
17361
Fred Drake8cef4cf2000-06-28 16:40:38 +000017362
17363fi
17364done
17365
Jack Jansendd19cf82001-12-06 22:36:17 +000017366
Brett Cannonaa5778d2008-03-18 04:09:00 +000017367# Stuff for expat.
17368
17369for ac_func in memmove
17370do
17371as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17372{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17373echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17374if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17375 echo $ECHO_N "(cached) $ECHO_C" >&6
17376else
17377 cat >conftest.$ac_ext <<_ACEOF
17378/* confdefs.h. */
17379_ACEOF
17380cat confdefs.h >>conftest.$ac_ext
17381cat >>conftest.$ac_ext <<_ACEOF
17382/* end confdefs.h. */
17383/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17384 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17385#define $ac_func innocuous_$ac_func
17386
17387/* System header to define __stub macros and hopefully few prototypes,
17388 which can conflict with char $ac_func (); below.
17389 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17390 <limits.h> exists even on freestanding compilers. */
17391
17392#ifdef __STDC__
17393# include <limits.h>
17394#else
17395# include <assert.h>
17396#endif
17397
17398#undef $ac_func
17399
17400/* Override any GCC internal prototype to avoid an error.
17401 Use char because int might match the return type of a GCC
17402 builtin and then its argument prototype would still apply. */
17403#ifdef __cplusplus
17404extern "C"
17405#endif
17406char $ac_func ();
17407/* The GNU C library defines this for functions which it implements
17408 to always fail with ENOSYS. Some functions are actually named
17409 something starting with __ and the normal name is an alias. */
17410#if defined __stub_$ac_func || defined __stub___$ac_func
17411choke me
17412#endif
17413
17414int
17415main ()
17416{
17417return $ac_func ();
17418 ;
17419 return 0;
17420}
17421_ACEOF
17422rm -f conftest.$ac_objext conftest$ac_exeext
17423if { (ac_try="$ac_link"
17424case "(($ac_try" in
17425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17426 *) ac_try_echo=$ac_try;;
17427esac
17428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17429 (eval "$ac_link") 2>conftest.er1
17430 ac_status=$?
17431 grep -v '^ *+' conftest.er1 >conftest.err
17432 rm -f conftest.er1
17433 cat conftest.err >&5
17434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17435 (exit $ac_status); } && {
17436 test -z "$ac_c_werror_flag" ||
17437 test ! -s conftest.err
17438 } && test -s conftest$ac_exeext &&
17439 $as_test_x conftest$ac_exeext; then
17440 eval "$as_ac_var=yes"
17441else
17442 echo "$as_me: failed program was:" >&5
17443sed 's/^/| /' conftest.$ac_ext >&5
17444
17445 eval "$as_ac_var=no"
17446fi
17447
17448rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17449 conftest$ac_exeext conftest.$ac_ext
17450fi
17451ac_res=`eval echo '${'$as_ac_var'}'`
17452 { echo "$as_me:$LINENO: result: $ac_res" >&5
17453echo "${ECHO_T}$ac_res" >&6; }
17454if test `eval echo '${'$as_ac_var'}'` = yes; then
17455 cat >>confdefs.h <<_ACEOF
17456#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17457_ACEOF
17458
17459fi
17460done
17461
17462
Michael W. Hudson54241132001-12-07 15:38:26 +000017463# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017464
17465
17466
17467
17468
17469
Fred Drake8cef4cf2000-06-28 16:40:38 +000017470for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17471do
Martin v. Löwis11437992002-04-12 09:54:03 +000017472as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017473{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17474echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17475if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017476 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017477else
Martin v. Löwis11437992002-04-12 09:54:03 +000017478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017479/* confdefs.h. */
17480_ACEOF
17481cat confdefs.h >>conftest.$ac_ext
17482cat >>conftest.$ac_ext <<_ACEOF
17483/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017484/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17485 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17486#define $ac_func innocuous_$ac_func
17487
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017488/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017489 which can conflict with char $ac_func (); below.
17490 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017491 <limits.h> exists even on freestanding compilers. */
17492
17493#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017494# include <limits.h>
17495#else
17496# include <assert.h>
17497#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017498
17499#undef $ac_func
17500
Martin v. Löwiseba40652007-08-30 20:10:57 +000017501/* Override any GCC internal prototype to avoid an error.
17502 Use char because int might match the return type of a GCC
17503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017504#ifdef __cplusplus
17505extern "C"
17506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017507char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017508/* The GNU C library defines this for functions which it implements
17509 to always fail with ENOSYS. Some functions are actually named
17510 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017511#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017512choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017513#endif
17514
Skip Montanaro6dead952003-09-25 14:50:04 +000017515int
17516main ()
17517{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017518return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017519 ;
17520 return 0;
17521}
17522_ACEOF
17523rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017524if { (ac_try="$ac_link"
17525case "(($ac_try" in
17526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17527 *) ac_try_echo=$ac_try;;
17528esac
17529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17530 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017532 grep -v '^ *+' conftest.er1 >conftest.err
17533 rm -f conftest.er1
17534 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017536 (exit $ac_status); } && {
17537 test -z "$ac_c_werror_flag" ||
17538 test ! -s conftest.err
17539 } && test -s conftest$ac_exeext &&
17540 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017541 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017542else
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öwiseba40652007-08-30 20:10:57 +000017546 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017548
17549rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017550 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017552ac_res=`eval echo '${'$as_ac_var'}'`
17553 { echo "$as_me:$LINENO: result: $ac_res" >&5
17554echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017555if test `eval echo '${'$as_ac_var'}'` = yes; then
17556 cat >>confdefs.h <<_ACEOF
17557#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17558_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017559
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017560fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017561done
17562
Michael W. Hudson54241132001-12-07 15:38:26 +000017563
Martin v. Löwis11437992002-04-12 09:54:03 +000017564
17565
17566
Brett Cannonaa5778d2008-03-18 04:09:00 +000017567for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017568do
Martin v. Löwis11437992002-04-12 09:54:03 +000017569as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017570{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17571echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17572if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017573 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017574else
Martin v. Löwis11437992002-04-12 09:54:03 +000017575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017576/* confdefs.h. */
17577_ACEOF
17578cat confdefs.h >>conftest.$ac_ext
17579cat >>conftest.$ac_ext <<_ACEOF
17580/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017581/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17582 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17583#define $ac_func innocuous_$ac_func
17584
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017585/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017586 which can conflict with char $ac_func (); below.
17587 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017588 <limits.h> exists even on freestanding compilers. */
17589
17590#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017591# include <limits.h>
17592#else
17593# include <assert.h>
17594#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017595
17596#undef $ac_func
17597
Martin v. Löwiseba40652007-08-30 20:10:57 +000017598/* Override any GCC internal prototype to avoid an error.
17599 Use char because int might match the return type of a GCC
17600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017601#ifdef __cplusplus
17602extern "C"
17603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017604char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017605/* The GNU C library defines this for functions which it implements
17606 to always fail with ENOSYS. Some functions are actually named
17607 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017608#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017609choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017610#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017611
Skip Montanaro6dead952003-09-25 14:50:04 +000017612int
17613main ()
17614{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017615return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017616 ;
17617 return 0;
17618}
17619_ACEOF
17620rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017621if { (ac_try="$ac_link"
17622case "(($ac_try" in
17623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17624 *) ac_try_echo=$ac_try;;
17625esac
17626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17627 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017629 grep -v '^ *+' conftest.er1 >conftest.err
17630 rm -f conftest.er1
17631 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017633 (exit $ac_status); } && {
17634 test -z "$ac_c_werror_flag" ||
17635 test ! -s conftest.err
17636 } && test -s conftest$ac_exeext &&
17637 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017638 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017639else
Martin v. Löwis11437992002-04-12 09:54:03 +000017640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017641sed 's/^/| /' conftest.$ac_ext >&5
17642
Martin v. Löwiseba40652007-08-30 20:10:57 +000017643 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017645
17646rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017647 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017649ac_res=`eval echo '${'$as_ac_var'}'`
17650 { echo "$as_me:$LINENO: result: $ac_res" >&5
17651echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017652if test `eval echo '${'$as_ac_var'}'` = yes; then
17653 cat >>confdefs.h <<_ACEOF
17654#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17655_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017656
Martin v. Löwis1142de32002-03-29 16:28:31 +000017657else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017658 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017659 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017660 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17661 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017662esac
17663
Martin v. Löwis1142de32002-03-29 16:28:31 +000017664fi
17665done
17666
17667
Martin v. Löwis11437992002-04-12 09:54:03 +000017668
Martin v. Löwis1142de32002-03-29 16:28:31 +000017669for ac_func in getpgrp
17670do
Martin v. Löwis11437992002-04-12 09:54:03 +000017671as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017672{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17673echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17674if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017675 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017676else
Martin v. Löwis11437992002-04-12 09:54:03 +000017677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017678/* confdefs.h. */
17679_ACEOF
17680cat confdefs.h >>conftest.$ac_ext
17681cat >>conftest.$ac_ext <<_ACEOF
17682/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017683/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17684 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17685#define $ac_func innocuous_$ac_func
17686
Martin v. Löwis1142de32002-03-29 16:28:31 +000017687/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017688 which can conflict with char $ac_func (); below.
17689 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017690 <limits.h> exists even on freestanding compilers. */
17691
17692#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017693# include <limits.h>
17694#else
17695# include <assert.h>
17696#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017697
17698#undef $ac_func
17699
Martin v. Löwiseba40652007-08-30 20:10:57 +000017700/* Override any GCC internal prototype to avoid an error.
17701 Use char because int might match the return type of a GCC
17702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017703#ifdef __cplusplus
17704extern "C"
17705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017706char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017707/* The GNU C library defines this for functions which it implements
17708 to always fail with ENOSYS. Some functions are actually named
17709 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017710#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017711choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017712#endif
17713
Skip Montanaro6dead952003-09-25 14:50:04 +000017714int
17715main ()
17716{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017717return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017718 ;
17719 return 0;
17720}
17721_ACEOF
17722rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017723if { (ac_try="$ac_link"
17724case "(($ac_try" in
17725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17726 *) ac_try_echo=$ac_try;;
17727esac
17728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17729 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017731 grep -v '^ *+' conftest.er1 >conftest.err
17732 rm -f conftest.er1
17733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017735 (exit $ac_status); } && {
17736 test -z "$ac_c_werror_flag" ||
17737 test ! -s conftest.err
17738 } && test -s conftest$ac_exeext &&
17739 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017740 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017741else
Martin v. Löwis11437992002-04-12 09:54:03 +000017742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017743sed 's/^/| /' conftest.$ac_ext >&5
17744
Martin v. Löwiseba40652007-08-30 20:10:57 +000017745 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017747
17748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017749 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017751ac_res=`eval echo '${'$as_ac_var'}'`
17752 { echo "$as_me:$LINENO: result: $ac_res" >&5
17753echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017754if test `eval echo '${'$as_ac_var'}'` = yes; then
17755 cat >>confdefs.h <<_ACEOF
17756#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17757_ACEOF
17758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017759/* confdefs.h. */
17760_ACEOF
17761cat confdefs.h >>conftest.$ac_ext
17762cat >>conftest.$ac_ext <<_ACEOF
17763/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017764#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017765int
17766main ()
17767{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017768getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017769 ;
17770 return 0;
17771}
17772_ACEOF
17773rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017774if { (ac_try="$ac_compile"
17775case "(($ac_try" in
17776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17777 *) ac_try_echo=$ac_try;;
17778esac
17779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017782 grep -v '^ *+' conftest.er1 >conftest.err
17783 rm -f conftest.er1
17784 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017786 (exit $ac_status); } && {
17787 test -z "$ac_c_werror_flag" ||
17788 test ! -s conftest.err
17789 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017790
17791cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017792#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017793_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017794
Martin v. Löwis11437992002-04-12 09:54:03 +000017795
Guido van Rossumf78abae1997-01-21 22:02:36 +000017796else
Martin v. Löwis11437992002-04-12 09:54:03 +000017797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017798sed 's/^/| /' conftest.$ac_ext >&5
17799
Martin v. Löwiseba40652007-08-30 20:10:57 +000017800
Guido van Rossum627b2d71993-12-24 10:39:16 +000017801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017802
17803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017804
Guido van Rossum627b2d71993-12-24 10:39:16 +000017805fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017806done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017807
Jack Jansen150753c2003-03-29 22:07:47 +000017808
17809for ac_func in setpgrp
17810do
17811as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017812{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17813echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17814if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017815 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017816else
Martin v. Löwis11437992002-04-12 09:54:03 +000017817 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017818/* confdefs.h. */
17819_ACEOF
17820cat confdefs.h >>conftest.$ac_ext
17821cat >>conftest.$ac_ext <<_ACEOF
17822/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017823/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17824 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17825#define $ac_func innocuous_$ac_func
17826
Jack Jansen150753c2003-03-29 22:07:47 +000017827/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017828 which can conflict with char $ac_func (); below.
17829 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017830 <limits.h> exists even on freestanding compilers. */
17831
17832#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017833# include <limits.h>
17834#else
17835# include <assert.h>
17836#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017837
17838#undef $ac_func
17839
Martin v. Löwiseba40652007-08-30 20:10:57 +000017840/* Override any GCC internal prototype to avoid an error.
17841 Use char because int might match the return type of a GCC
17842 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017843#ifdef __cplusplus
17844extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017845#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017846char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017847/* The GNU C library defines this for functions which it implements
17848 to always fail with ENOSYS. Some functions are actually named
17849 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017850#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017851choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017852#endif
17853
Skip Montanaro6dead952003-09-25 14:50:04 +000017854int
17855main ()
17856{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017857return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017858 ;
17859 return 0;
17860}
17861_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017862rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017863if { (ac_try="$ac_link"
17864case "(($ac_try" in
17865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17866 *) ac_try_echo=$ac_try;;
17867esac
17868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17869 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017871 grep -v '^ *+' conftest.er1 >conftest.err
17872 rm -f conftest.er1
17873 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017875 (exit $ac_status); } && {
17876 test -z "$ac_c_werror_flag" ||
17877 test ! -s conftest.err
17878 } && test -s conftest$ac_exeext &&
17879 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017880 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017881else
Jack Jansen150753c2003-03-29 22:07:47 +000017882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017883sed 's/^/| /' conftest.$ac_ext >&5
17884
Martin v. Löwiseba40652007-08-30 20:10:57 +000017885 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017887
17888rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017889 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017891ac_res=`eval echo '${'$as_ac_var'}'`
17892 { echo "$as_me:$LINENO: result: $ac_res" >&5
17893echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017894if test `eval echo '${'$as_ac_var'}'` = yes; then
17895 cat >>confdefs.h <<_ACEOF
17896#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17897_ACEOF
17898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017899/* confdefs.h. */
17900_ACEOF
17901cat confdefs.h >>conftest.$ac_ext
17902cat >>conftest.$ac_ext <<_ACEOF
17903/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017904#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017905int
17906main ()
17907{
17908setpgrp(0,0);
17909 ;
17910 return 0;
17911}
17912_ACEOF
17913rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017914if { (ac_try="$ac_compile"
17915case "(($ac_try" in
17916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17917 *) ac_try_echo=$ac_try;;
17918esac
17919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17920 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017922 grep -v '^ *+' conftest.er1 >conftest.err
17923 rm -f conftest.er1
17924 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017926 (exit $ac_status); } && {
17927 test -z "$ac_c_werror_flag" ||
17928 test ! -s conftest.err
17929 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017930
17931cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017932#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017933_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017934
Jack Jansen150753c2003-03-29 22:07:47 +000017935
17936else
17937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017938sed 's/^/| /' conftest.$ac_ext >&5
17939
Martin v. Löwiseba40652007-08-30 20:10:57 +000017940
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017942
17943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017944
17945fi
17946done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017947
Martin v. Löwis11437992002-04-12 09:54:03 +000017948
Thomas Wouters3a584202000-08-05 23:28:51 +000017949for ac_func in gettimeofday
17950do
Martin v. Löwis11437992002-04-12 09:54:03 +000017951as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017952{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17953echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17954if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017956else
Martin v. Löwis11437992002-04-12 09:54:03 +000017957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017958/* confdefs.h. */
17959_ACEOF
17960cat confdefs.h >>conftest.$ac_ext
17961cat >>conftest.$ac_ext <<_ACEOF
17962/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017963/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17964 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17965#define $ac_func innocuous_$ac_func
17966
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017967/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017968 which can conflict with char $ac_func (); below.
17969 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017970 <limits.h> exists even on freestanding compilers. */
17971
17972#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017973# include <limits.h>
17974#else
17975# include <assert.h>
17976#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017977
17978#undef $ac_func
17979
Martin v. Löwiseba40652007-08-30 20:10:57 +000017980/* Override any GCC internal prototype to avoid an error.
17981 Use char because int might match the return type of a GCC
17982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017983#ifdef __cplusplus
17984extern "C"
17985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017986char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017987/* The GNU C library defines this for functions which it implements
17988 to always fail with ENOSYS. Some functions are actually named
17989 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017990#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017991choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017992#endif
17993
Skip Montanaro6dead952003-09-25 14:50:04 +000017994int
17995main ()
17996{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017997return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017998 ;
17999 return 0;
18000}
18001_ACEOF
18002rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018003if { (ac_try="$ac_link"
18004case "(($ac_try" in
18005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18006 *) ac_try_echo=$ac_try;;
18007esac
18008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18009 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018011 grep -v '^ *+' conftest.er1 >conftest.err
18012 rm -f conftest.er1
18013 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018015 (exit $ac_status); } && {
18016 test -z "$ac_c_werror_flag" ||
18017 test ! -s conftest.err
18018 } && test -s conftest$ac_exeext &&
18019 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018020 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018021else
Martin v. Löwis11437992002-04-12 09:54:03 +000018022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018023sed 's/^/| /' conftest.$ac_ext >&5
18024
Martin v. Löwiseba40652007-08-30 20:10:57 +000018025 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018027
18028rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018029 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018031ac_res=`eval echo '${'$as_ac_var'}'`
18032 { echo "$as_me:$LINENO: result: $ac_res" >&5
18033echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018034if test `eval echo '${'$as_ac_var'}'` = yes; then
18035 cat >>confdefs.h <<_ACEOF
18036#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18037_ACEOF
18038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018039/* confdefs.h. */
18040_ACEOF
18041cat confdefs.h >>conftest.$ac_ext
18042cat >>conftest.$ac_ext <<_ACEOF
18043/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018044#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018045int
18046main ()
18047{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018048gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018049 ;
18050 return 0;
18051}
18052_ACEOF
18053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018054if { (ac_try="$ac_compile"
18055case "(($ac_try" in
18056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18057 *) ac_try_echo=$ac_try;;
18058esac
18059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018062 grep -v '^ *+' conftest.er1 >conftest.err
18063 rm -f conftest.er1
18064 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018066 (exit $ac_status); } && {
18067 test -z "$ac_c_werror_flag" ||
18068 test ! -s conftest.err
18069 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018070 :
18071else
Martin v. Löwis11437992002-04-12 09:54:03 +000018072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018073sed 's/^/| /' conftest.$ac_ext >&5
18074
Martin v. Löwis11437992002-04-12 09:54:03 +000018075
18076cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018077#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018078_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018079
Martin v. Löwis11437992002-04-12 09:54:03 +000018080
Guido van Rossum627b2d71993-12-24 10:39:16 +000018081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018082
18083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018084
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018085fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018086done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018087
Michael W. Hudson54241132001-12-07 15:38:26 +000018088
Martin v. Löwiseba40652007-08-30 20:10:57 +000018089{ echo "$as_me:$LINENO: checking for major" >&5
18090echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018092/* confdefs.h. */
18093_ACEOF
18094cat confdefs.h >>conftest.$ac_ext
18095cat >>conftest.$ac_ext <<_ACEOF
18096/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018097
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018098#if defined(MAJOR_IN_MKDEV)
18099#include <sys/mkdev.h>
18100#elif defined(MAJOR_IN_SYSMACROS)
18101#include <sys/sysmacros.h>
18102#else
18103#include <sys/types.h>
18104#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018105
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018106int
18107main ()
18108{
18109
18110 makedev(major(0),minor(0));
18111
18112 ;
18113 return 0;
18114}
18115_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018116rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018117if { (ac_try="$ac_link"
18118case "(($ac_try" in
18119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18120 *) ac_try_echo=$ac_try;;
18121esac
18122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18123 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018125 grep -v '^ *+' conftest.er1 >conftest.err
18126 rm -f conftest.er1
18127 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018129 (exit $ac_status); } && {
18130 test -z "$ac_c_werror_flag" ||
18131 test ! -s conftest.err
18132 } && test -s conftest$ac_exeext &&
18133 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018134
18135
18136cat >>confdefs.h <<\_ACEOF
18137#define HAVE_DEVICE_MACROS 1
18138_ACEOF
18139
Martin v. Löwiseba40652007-08-30 20:10:57 +000018140 { echo "$as_me:$LINENO: result: yes" >&5
18141echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018142
18143else
18144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018145sed 's/^/| /' conftest.$ac_ext >&5
18146
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018147
Martin v. Löwiseba40652007-08-30 20:10:57 +000018148 { echo "$as_me:$LINENO: result: no" >&5
18149echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018150
18151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018152
18153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018154 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018155
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018156# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018157# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018158{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18159echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018160cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018161/* confdefs.h. */
18162_ACEOF
18163cat confdefs.h >>conftest.$ac_ext
18164cat >>conftest.$ac_ext <<_ACEOF
18165/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018166
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018167#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018168#include <sys/socket.h>
18169#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018170#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018171
Martin v. Löwis11437992002-04-12 09:54:03 +000018172int
18173main ()
18174{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018175
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018176getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018177
Martin v. Löwis11437992002-04-12 09:54:03 +000018178 ;
18179 return 0;
18180}
18181_ACEOF
18182rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018183if { (ac_try="$ac_link"
18184case "(($ac_try" in
18185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18186 *) ac_try_echo=$ac_try;;
18187esac
18188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18189 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018191 grep -v '^ *+' conftest.er1 >conftest.err
18192 rm -f conftest.er1
18193 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018195 (exit $ac_status); } && {
18196 test -z "$ac_c_werror_flag" ||
18197 test ! -s conftest.err
18198 } && test -s conftest$ac_exeext &&
18199 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018200
Martin v. Löwiseba40652007-08-30 20:10:57 +000018201{ echo "$as_me:$LINENO: result: yes" >&5
18202echo "${ECHO_T}yes" >&6; }
18203{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18204echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018205if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018206 { echo "$as_me:$LINENO: result: buggy" >&5
18207echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018208buggygetaddrinfo=yes
18209else
Martin v. Löwis11437992002-04-12 09:54:03 +000018210 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018211/* confdefs.h. */
18212_ACEOF
18213cat confdefs.h >>conftest.$ac_ext
18214cat >>conftest.$ac_ext <<_ACEOF
18215/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018216
18217#include <sys/types.h>
18218#include <netdb.h>
18219#include <string.h>
18220#include <sys/socket.h>
18221#include <netinet/in.h>
18222
18223main()
18224{
18225 int passive, gaierr, inet4 = 0, inet6 = 0;
18226 struct addrinfo hints, *ai, *aitop;
18227 char straddr[INET6_ADDRSTRLEN], strport[16];
18228
18229 for (passive = 0; passive <= 1; passive++) {
18230 memset(&hints, 0, sizeof(hints));
18231 hints.ai_family = AF_UNSPEC;
18232 hints.ai_flags = passive ? AI_PASSIVE : 0;
18233 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018234 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018235 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18236 (void)gai_strerror(gaierr);
18237 goto bad;
18238 }
18239 for (ai = aitop; ai; ai = ai->ai_next) {
18240 if (ai->ai_addr == NULL ||
18241 ai->ai_addrlen == 0 ||
18242 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18243 straddr, sizeof(straddr), strport, sizeof(strport),
18244 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18245 goto bad;
18246 }
18247 switch (ai->ai_family) {
18248 case AF_INET:
18249 if (strcmp(strport, "54321") != 0) {
18250 goto bad;
18251 }
18252 if (passive) {
18253 if (strcmp(straddr, "0.0.0.0") != 0) {
18254 goto bad;
18255 }
18256 } else {
18257 if (strcmp(straddr, "127.0.0.1") != 0) {
18258 goto bad;
18259 }
18260 }
18261 inet4++;
18262 break;
18263 case AF_INET6:
18264 if (strcmp(strport, "54321") != 0) {
18265 goto bad;
18266 }
18267 if (passive) {
18268 if (strcmp(straddr, "::") != 0) {
18269 goto bad;
18270 }
18271 } else {
18272 if (strcmp(straddr, "::1") != 0) {
18273 goto bad;
18274 }
18275 }
18276 inet6++;
18277 break;
18278 case AF_UNSPEC:
18279 goto bad;
18280 break;
18281 default:
18282 /* another family support? */
18283 break;
18284 }
18285 }
18286 }
18287
18288 if (!(inet4 == 0 || inet4 == 2))
18289 goto bad;
18290 if (!(inet6 == 0 || inet6 == 2))
18291 goto bad;
18292
18293 if (aitop)
18294 freeaddrinfo(aitop);
18295 exit(0);
18296
18297 bad:
18298 if (aitop)
18299 freeaddrinfo(aitop);
18300 exit(1);
18301}
18302
Martin v. Löwis11437992002-04-12 09:54:03 +000018303_ACEOF
18304rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018305if { (ac_try="$ac_link"
18306case "(($ac_try" in
18307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18308 *) ac_try_echo=$ac_try;;
18309esac
18310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18311 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018312 ac_status=$?
18313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18314 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018315 { (case "(($ac_try" in
18316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18317 *) ac_try_echo=$ac_try;;
18318esac
18319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18320 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018321 ac_status=$?
18322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18323 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018324 { echo "$as_me:$LINENO: result: good" >&5
18325echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018326buggygetaddrinfo=no
18327else
Martin v. Löwis11437992002-04-12 09:54:03 +000018328 echo "$as_me: program exited with status $ac_status" >&5
18329echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018330sed 's/^/| /' conftest.$ac_ext >&5
18331
Martin v. Löwis11437992002-04-12 09:54:03 +000018332( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018333{ echo "$as_me:$LINENO: result: buggy" >&5
18334echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018335buggygetaddrinfo=yes
18336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018337rm -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 +000018338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018339
18340
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018341else
Martin v. Löwis11437992002-04-12 09:54:03 +000018342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018343sed 's/^/| /' conftest.$ac_ext >&5
18344
Martin v. Löwis11437992002-04-12 09:54:03 +000018345
Martin v. Löwiseba40652007-08-30 20:10:57 +000018346{ echo "$as_me:$LINENO: result: no" >&5
18347echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018348buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018349
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018351
18352rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018353 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018354
18355if test "$buggygetaddrinfo" = "yes"; then
18356 if test "$ipv6" = "yes"; then
18357 echo 'Fatal: You must get working getaddrinfo() function.'
18358 echo ' or you can specify "--disable-ipv6"'.
18359 exit 1
18360 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018361else
Martin v. Löwis11437992002-04-12 09:54:03 +000018362
18363cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018364#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018365_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018366
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018368
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018369for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018370do
Martin v. Löwis11437992002-04-12 09:54:03 +000018371as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018372{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18373echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18374if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018375 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018376else
Martin v. Löwis11437992002-04-12 09:54:03 +000018377 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018378/* confdefs.h. */
18379_ACEOF
18380cat confdefs.h >>conftest.$ac_ext
18381cat >>conftest.$ac_ext <<_ACEOF
18382/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018383/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18384 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18385#define $ac_func innocuous_$ac_func
18386
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018387/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018388 which can conflict with char $ac_func (); below.
18389 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018390 <limits.h> exists even on freestanding compilers. */
18391
18392#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018393# include <limits.h>
18394#else
18395# include <assert.h>
18396#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018397
18398#undef $ac_func
18399
Martin v. Löwiseba40652007-08-30 20:10:57 +000018400/* Override any GCC internal prototype to avoid an error.
18401 Use char because int might match the return type of a GCC
18402 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018403#ifdef __cplusplus
18404extern "C"
18405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018406char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018407/* The GNU C library defines this for functions which it implements
18408 to always fail with ENOSYS. Some functions are actually named
18409 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018410#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018411choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018412#endif
18413
Skip Montanaro6dead952003-09-25 14:50:04 +000018414int
18415main ()
18416{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018417return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018418 ;
18419 return 0;
18420}
18421_ACEOF
18422rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018423if { (ac_try="$ac_link"
18424case "(($ac_try" in
18425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18426 *) ac_try_echo=$ac_try;;
18427esac
18428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18429 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018431 grep -v '^ *+' conftest.er1 >conftest.err
18432 rm -f conftest.er1
18433 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018435 (exit $ac_status); } && {
18436 test -z "$ac_c_werror_flag" ||
18437 test ! -s conftest.err
18438 } && test -s conftest$ac_exeext &&
18439 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018440 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018441else
Martin v. Löwis11437992002-04-12 09:54:03 +000018442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018443sed 's/^/| /' conftest.$ac_ext >&5
18444
Martin v. Löwiseba40652007-08-30 20:10:57 +000018445 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018447
18448rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018449 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018451ac_res=`eval echo '${'$as_ac_var'}'`
18452 { echo "$as_me:$LINENO: result: $ac_res" >&5
18453echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018454if test `eval echo '${'$as_ac_var'}'` = yes; then
18455 cat >>confdefs.h <<_ACEOF
18456#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18457_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018458
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018459fi
18460done
18461
Michael W. Hudson54241132001-12-07 15:38:26 +000018462
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018463# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018464{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18465echo $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 +000018466if test "${ac_cv_header_time+set}" = set; then
18467 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018468else
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018470/* confdefs.h. */
18471_ACEOF
18472cat confdefs.h >>conftest.$ac_ext
18473cat >>conftest.$ac_ext <<_ACEOF
18474/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018475#include <sys/types.h>
18476#include <sys/time.h>
18477#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018478
Martin v. Löwis11437992002-04-12 09:54:03 +000018479int
18480main ()
18481{
18482if ((struct tm *) 0)
18483return 0;
18484 ;
18485 return 0;
18486}
18487_ACEOF
18488rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018489if { (ac_try="$ac_compile"
18490case "(($ac_try" in
18491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18492 *) ac_try_echo=$ac_try;;
18493esac
18494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018497 grep -v '^ *+' conftest.er1 >conftest.err
18498 rm -f conftest.er1
18499 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018501 (exit $ac_status); } && {
18502 test -z "$ac_c_werror_flag" ||
18503 test ! -s conftest.err
18504 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018505 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018506else
Martin v. Löwis11437992002-04-12 09:54:03 +000018507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018508sed 's/^/| /' conftest.$ac_ext >&5
18509
Martin v. Löwiseba40652007-08-30 20:10:57 +000018510 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018512
18513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018515{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18516echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018517if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018518
18519cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018520#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018521_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018522
18523fi
18524
Martin v. Löwiseba40652007-08-30 20:10:57 +000018525{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18526echo $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 +000018527if test "${ac_cv_struct_tm+set}" = set; then
18528 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018529else
Martin v. Löwis11437992002-04-12 09:54:03 +000018530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018531/* confdefs.h. */
18532_ACEOF
18533cat confdefs.h >>conftest.$ac_ext
18534cat >>conftest.$ac_ext <<_ACEOF
18535/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018536#include <sys/types.h>
18537#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018538
Martin v. Löwis11437992002-04-12 09:54:03 +000018539int
18540main ()
18541{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018542struct tm tm;
18543 int *p = &tm.tm_sec;
18544 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018545 ;
18546 return 0;
18547}
18548_ACEOF
18549rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018550if { (ac_try="$ac_compile"
18551case "(($ac_try" in
18552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18553 *) ac_try_echo=$ac_try;;
18554esac
18555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018558 grep -v '^ *+' conftest.er1 >conftest.err
18559 rm -f conftest.er1
18560 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018562 (exit $ac_status); } && {
18563 test -z "$ac_c_werror_flag" ||
18564 test ! -s conftest.err
18565 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018566 ac_cv_struct_tm=time.h
18567else
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018569sed 's/^/| /' conftest.$ac_ext >&5
18570
Martin v. Löwiseba40652007-08-30 20:10:57 +000018571 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018573
18574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018576{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18577echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018578if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018579
18580cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018581#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018582_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018583
18584fi
18585
Martin v. Löwiseba40652007-08-30 20:10:57 +000018586{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18587echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018588if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018590else
Martin v. Löwis11437992002-04-12 09:54:03 +000018591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018592/* confdefs.h. */
18593_ACEOF
18594cat confdefs.h >>conftest.$ac_ext
18595cat >>conftest.$ac_ext <<_ACEOF
18596/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018597#include <sys/types.h>
18598#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018599
18600
Martin v. Löwis11437992002-04-12 09:54:03 +000018601int
18602main ()
18603{
18604static struct tm ac_aggr;
18605if (ac_aggr.tm_zone)
18606return 0;
18607 ;
18608 return 0;
18609}
18610_ACEOF
18611rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018612if { (ac_try="$ac_compile"
18613case "(($ac_try" in
18614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18615 *) ac_try_echo=$ac_try;;
18616esac
18617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018620 grep -v '^ *+' conftest.er1 >conftest.err
18621 rm -f conftest.er1
18622 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018624 (exit $ac_status); } && {
18625 test -z "$ac_c_werror_flag" ||
18626 test ! -s conftest.err
18627 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018628 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018629else
Martin v. Löwis11437992002-04-12 09:54:03 +000018630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018631sed 's/^/| /' conftest.$ac_ext >&5
18632
Martin v. Löwiseba40652007-08-30 20:10:57 +000018633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018634/* confdefs.h. */
18635_ACEOF
18636cat confdefs.h >>conftest.$ac_ext
18637cat >>conftest.$ac_ext <<_ACEOF
18638/* end confdefs.h. */
18639#include <sys/types.h>
18640#include <$ac_cv_struct_tm>
18641
18642
18643int
18644main ()
18645{
18646static struct tm ac_aggr;
18647if (sizeof ac_aggr.tm_zone)
18648return 0;
18649 ;
18650 return 0;
18651}
18652_ACEOF
18653rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018654if { (ac_try="$ac_compile"
18655case "(($ac_try" in
18656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18657 *) ac_try_echo=$ac_try;;
18658esac
18659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18660 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018662 grep -v '^ *+' conftest.er1 >conftest.err
18663 rm -f conftest.er1
18664 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018666 (exit $ac_status); } && {
18667 test -z "$ac_c_werror_flag" ||
18668 test ! -s conftest.err
18669 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018670 ac_cv_member_struct_tm_tm_zone=yes
18671else
18672 echo "$as_me: failed program was:" >&5
18673sed 's/^/| /' conftest.$ac_ext >&5
18674
Martin v. Löwiseba40652007-08-30 20:10:57 +000018675 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018677
18678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018680
18681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018683{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18684echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018685if test $ac_cv_member_struct_tm_tm_zone = yes; then
18686
18687cat >>confdefs.h <<_ACEOF
18688#define HAVE_STRUCT_TM_TM_ZONE 1
18689_ACEOF
18690
18691
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018692fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018693
Martin v. Löwis11437992002-04-12 09:54:03 +000018694if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18695
18696cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018697#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018698_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018699
18700else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018701 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18702echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18703if test "${ac_cv_have_decl_tzname+set}" = set; then
18704 echo $ECHO_N "(cached) $ECHO_C" >&6
18705else
18706 cat >conftest.$ac_ext <<_ACEOF
18707/* confdefs.h. */
18708_ACEOF
18709cat confdefs.h >>conftest.$ac_ext
18710cat >>conftest.$ac_ext <<_ACEOF
18711/* end confdefs.h. */
18712#include <time.h>
18713
18714int
18715main ()
18716{
18717#ifndef tzname
18718 (void) tzname;
18719#endif
18720
18721 ;
18722 return 0;
18723}
18724_ACEOF
18725rm -f conftest.$ac_objext
18726if { (ac_try="$ac_compile"
18727case "(($ac_try" in
18728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18729 *) ac_try_echo=$ac_try;;
18730esac
18731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18732 (eval "$ac_compile") 2>conftest.er1
18733 ac_status=$?
18734 grep -v '^ *+' conftest.er1 >conftest.err
18735 rm -f conftest.er1
18736 cat conftest.err >&5
18737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18738 (exit $ac_status); } && {
18739 test -z "$ac_c_werror_flag" ||
18740 test ! -s conftest.err
18741 } && test -s conftest.$ac_objext; then
18742 ac_cv_have_decl_tzname=yes
18743else
18744 echo "$as_me: failed program was:" >&5
18745sed 's/^/| /' conftest.$ac_ext >&5
18746
18747 ac_cv_have_decl_tzname=no
18748fi
18749
18750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18751fi
18752{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18753echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18754if test $ac_cv_have_decl_tzname = yes; then
18755
18756cat >>confdefs.h <<_ACEOF
18757#define HAVE_DECL_TZNAME 1
18758_ACEOF
18759
18760
18761else
18762 cat >>confdefs.h <<_ACEOF
18763#define HAVE_DECL_TZNAME 0
18764_ACEOF
18765
18766
18767fi
18768
18769
18770 { echo "$as_me:$LINENO: checking for tzname" >&5
18771echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018772if test "${ac_cv_var_tzname+set}" = set; then
18773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018774else
Martin v. Löwis11437992002-04-12 09:54:03 +000018775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018776/* confdefs.h. */
18777_ACEOF
18778cat confdefs.h >>conftest.$ac_ext
18779cat >>conftest.$ac_ext <<_ACEOF
18780/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018781#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018782#if !HAVE_DECL_TZNAME
18783extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018785
Martin v. Löwis11437992002-04-12 09:54:03 +000018786int
18787main ()
18788{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018789return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018790 ;
18791 return 0;
18792}
18793_ACEOF
18794rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018795if { (ac_try="$ac_link"
18796case "(($ac_try" in
18797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18798 *) ac_try_echo=$ac_try;;
18799esac
18800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18801 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018803 grep -v '^ *+' conftest.er1 >conftest.err
18804 rm -f conftest.er1
18805 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018807 (exit $ac_status); } && {
18808 test -z "$ac_c_werror_flag" ||
18809 test ! -s conftest.err
18810 } && test -s conftest$ac_exeext &&
18811 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018812 ac_cv_var_tzname=yes
18813else
Martin v. Löwis11437992002-04-12 09:54:03 +000018814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018815sed 's/^/| /' conftest.$ac_ext >&5
18816
Martin v. Löwiseba40652007-08-30 20:10:57 +000018817 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018819
18820rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018821 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018823{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18824echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018825 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018826
18827cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018828#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018829_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018830
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018831 fi
18832fi
18833
Martin v. Löwiseba40652007-08-30 20:10:57 +000018834{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18835echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018836if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18837 echo $ECHO_N "(cached) $ECHO_C" >&6
18838else
18839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018840/* confdefs.h. */
18841_ACEOF
18842cat confdefs.h >>conftest.$ac_ext
18843cat >>conftest.$ac_ext <<_ACEOF
18844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018845$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018846int
18847main ()
18848{
18849static struct stat ac_aggr;
18850if (ac_aggr.st_rdev)
18851return 0;
18852 ;
18853 return 0;
18854}
18855_ACEOF
18856rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018857if { (ac_try="$ac_compile"
18858case "(($ac_try" in
18859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18860 *) ac_try_echo=$ac_try;;
18861esac
18862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018865 grep -v '^ *+' conftest.er1 >conftest.err
18866 rm -f conftest.er1
18867 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018869 (exit $ac_status); } && {
18870 test -z "$ac_c_werror_flag" ||
18871 test ! -s conftest.err
18872 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018873 ac_cv_member_struct_stat_st_rdev=yes
18874else
18875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018876sed 's/^/| /' conftest.$ac_ext >&5
18877
Martin v. Löwiseba40652007-08-30 20:10:57 +000018878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018879/* confdefs.h. */
18880_ACEOF
18881cat confdefs.h >>conftest.$ac_ext
18882cat >>conftest.$ac_ext <<_ACEOF
18883/* end confdefs.h. */
18884$ac_includes_default
18885int
18886main ()
18887{
18888static struct stat ac_aggr;
18889if (sizeof ac_aggr.st_rdev)
18890return 0;
18891 ;
18892 return 0;
18893}
18894_ACEOF
18895rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018896if { (ac_try="$ac_compile"
18897case "(($ac_try" in
18898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18899 *) ac_try_echo=$ac_try;;
18900esac
18901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18902 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018904 grep -v '^ *+' conftest.er1 >conftest.err
18905 rm -f conftest.er1
18906 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018908 (exit $ac_status); } && {
18909 test -z "$ac_c_werror_flag" ||
18910 test ! -s conftest.err
18911 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018912 ac_cv_member_struct_stat_st_rdev=yes
18913else
18914 echo "$as_me: failed program was:" >&5
18915sed 's/^/| /' conftest.$ac_ext >&5
18916
Martin v. Löwiseba40652007-08-30 20:10:57 +000018917 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018919
18920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018922
18923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018925{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18926echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018927if test $ac_cv_member_struct_stat_st_rdev = yes; then
18928
18929cat >>confdefs.h <<_ACEOF
18930#define HAVE_STRUCT_STAT_ST_RDEV 1
18931_ACEOF
18932
18933
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018934fi
18935
Martin v. Löwiseba40652007-08-30 20:10:57 +000018936{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18937echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018938if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018940else
Martin v. Löwis11437992002-04-12 09:54:03 +000018941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018942/* confdefs.h. */
18943_ACEOF
18944cat confdefs.h >>conftest.$ac_ext
18945cat >>conftest.$ac_ext <<_ACEOF
18946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018947$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018948int
18949main ()
18950{
18951static struct stat ac_aggr;
18952if (ac_aggr.st_blksize)
18953return 0;
18954 ;
18955 return 0;
18956}
18957_ACEOF
18958rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959if { (ac_try="$ac_compile"
18960case "(($ac_try" in
18961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18962 *) ac_try_echo=$ac_try;;
18963esac
18964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018967 grep -v '^ *+' conftest.er1 >conftest.err
18968 rm -f conftest.er1
18969 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018971 (exit $ac_status); } && {
18972 test -z "$ac_c_werror_flag" ||
18973 test ! -s conftest.err
18974 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018975 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018976else
Martin v. Löwis11437992002-04-12 09:54:03 +000018977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018978sed 's/^/| /' conftest.$ac_ext >&5
18979
Martin v. Löwiseba40652007-08-30 20:10:57 +000018980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018981/* confdefs.h. */
18982_ACEOF
18983cat confdefs.h >>conftest.$ac_ext
18984cat >>conftest.$ac_ext <<_ACEOF
18985/* end confdefs.h. */
18986$ac_includes_default
18987int
18988main ()
18989{
18990static struct stat ac_aggr;
18991if (sizeof ac_aggr.st_blksize)
18992return 0;
18993 ;
18994 return 0;
18995}
18996_ACEOF
18997rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018998if { (ac_try="$ac_compile"
18999case "(($ac_try" in
19000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19001 *) ac_try_echo=$ac_try;;
19002esac
19003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19004 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019006 grep -v '^ *+' conftest.er1 >conftest.err
19007 rm -f conftest.er1
19008 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019010 (exit $ac_status); } && {
19011 test -z "$ac_c_werror_flag" ||
19012 test ! -s conftest.err
19013 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019014 ac_cv_member_struct_stat_st_blksize=yes
19015else
19016 echo "$as_me: failed program was:" >&5
19017sed 's/^/| /' conftest.$ac_ext >&5
19018
Martin v. Löwiseba40652007-08-30 20:10:57 +000019019 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019021
19022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019024
19025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019027{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19028echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019029if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019030
Martin v. Löwis11437992002-04-12 09:54:03 +000019031cat >>confdefs.h <<_ACEOF
19032#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19033_ACEOF
19034
19035
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019036fi
19037
Martin v. Löwiseba40652007-08-30 20:10:57 +000019038{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19039echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019040if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19041 echo $ECHO_N "(cached) $ECHO_C" >&6
19042else
19043 cat >conftest.$ac_ext <<_ACEOF
19044/* confdefs.h. */
19045_ACEOF
19046cat confdefs.h >>conftest.$ac_ext
19047cat >>conftest.$ac_ext <<_ACEOF
19048/* end confdefs.h. */
19049$ac_includes_default
19050int
19051main ()
19052{
19053static struct stat ac_aggr;
19054if (ac_aggr.st_flags)
19055return 0;
19056 ;
19057 return 0;
19058}
19059_ACEOF
19060rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019061if { (ac_try="$ac_compile"
19062case "(($ac_try" in
19063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19064 *) ac_try_echo=$ac_try;;
19065esac
19066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19067 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019068 ac_status=$?
19069 grep -v '^ *+' conftest.er1 >conftest.err
19070 rm -f conftest.er1
19071 cat conftest.err >&5
19072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019073 (exit $ac_status); } && {
19074 test -z "$ac_c_werror_flag" ||
19075 test ! -s conftest.err
19076 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019077 ac_cv_member_struct_stat_st_flags=yes
19078else
19079 echo "$as_me: failed program was:" >&5
19080sed 's/^/| /' conftest.$ac_ext >&5
19081
Martin v. Löwiseba40652007-08-30 20:10:57 +000019082 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019083/* confdefs.h. */
19084_ACEOF
19085cat confdefs.h >>conftest.$ac_ext
19086cat >>conftest.$ac_ext <<_ACEOF
19087/* end confdefs.h. */
19088$ac_includes_default
19089int
19090main ()
19091{
19092static struct stat ac_aggr;
19093if (sizeof ac_aggr.st_flags)
19094return 0;
19095 ;
19096 return 0;
19097}
19098_ACEOF
19099rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019100if { (ac_try="$ac_compile"
19101case "(($ac_try" in
19102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19103 *) ac_try_echo=$ac_try;;
19104esac
19105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19106 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019107 ac_status=$?
19108 grep -v '^ *+' conftest.er1 >conftest.err
19109 rm -f conftest.er1
19110 cat conftest.err >&5
19111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019112 (exit $ac_status); } && {
19113 test -z "$ac_c_werror_flag" ||
19114 test ! -s conftest.err
19115 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019116 ac_cv_member_struct_stat_st_flags=yes
19117else
19118 echo "$as_me: failed program was:" >&5
19119sed 's/^/| /' conftest.$ac_ext >&5
19120
Martin v. Löwiseba40652007-08-30 20:10:57 +000019121 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019123
19124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019126
19127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019129{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19130echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019131if test $ac_cv_member_struct_stat_st_flags = yes; then
19132
19133cat >>confdefs.h <<_ACEOF
19134#define HAVE_STRUCT_STAT_ST_FLAGS 1
19135_ACEOF
19136
19137
19138fi
19139
Martin v. Löwiseba40652007-08-30 20:10:57 +000019140{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19141echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019142if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19143 echo $ECHO_N "(cached) $ECHO_C" >&6
19144else
19145 cat >conftest.$ac_ext <<_ACEOF
19146/* confdefs.h. */
19147_ACEOF
19148cat confdefs.h >>conftest.$ac_ext
19149cat >>conftest.$ac_ext <<_ACEOF
19150/* end confdefs.h. */
19151$ac_includes_default
19152int
19153main ()
19154{
19155static struct stat ac_aggr;
19156if (ac_aggr.st_gen)
19157return 0;
19158 ;
19159 return 0;
19160}
19161_ACEOF
19162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019163if { (ac_try="$ac_compile"
19164case "(($ac_try" in
19165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19166 *) ac_try_echo=$ac_try;;
19167esac
19168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019170 ac_status=$?
19171 grep -v '^ *+' conftest.er1 >conftest.err
19172 rm -f conftest.er1
19173 cat conftest.err >&5
19174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019175 (exit $ac_status); } && {
19176 test -z "$ac_c_werror_flag" ||
19177 test ! -s conftest.err
19178 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019179 ac_cv_member_struct_stat_st_gen=yes
19180else
19181 echo "$as_me: failed program was:" >&5
19182sed 's/^/| /' conftest.$ac_ext >&5
19183
Martin v. Löwiseba40652007-08-30 20:10:57 +000019184 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019185/* confdefs.h. */
19186_ACEOF
19187cat confdefs.h >>conftest.$ac_ext
19188cat >>conftest.$ac_ext <<_ACEOF
19189/* end confdefs.h. */
19190$ac_includes_default
19191int
19192main ()
19193{
19194static struct stat ac_aggr;
19195if (sizeof ac_aggr.st_gen)
19196return 0;
19197 ;
19198 return 0;
19199}
19200_ACEOF
19201rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019202if { (ac_try="$ac_compile"
19203case "(($ac_try" in
19204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19205 *) ac_try_echo=$ac_try;;
19206esac
19207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019209 ac_status=$?
19210 grep -v '^ *+' conftest.er1 >conftest.err
19211 rm -f conftest.er1
19212 cat conftest.err >&5
19213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019214 (exit $ac_status); } && {
19215 test -z "$ac_c_werror_flag" ||
19216 test ! -s conftest.err
19217 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019218 ac_cv_member_struct_stat_st_gen=yes
19219else
19220 echo "$as_me: failed program was:" >&5
19221sed 's/^/| /' conftest.$ac_ext >&5
19222
Martin v. Löwiseba40652007-08-30 20:10:57 +000019223 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019225
19226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019228
19229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019231{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19232echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019233if test $ac_cv_member_struct_stat_st_gen = yes; then
19234
19235cat >>confdefs.h <<_ACEOF
19236#define HAVE_STRUCT_STAT_ST_GEN 1
19237_ACEOF
19238
19239
19240fi
19241
Martin v. Löwiseba40652007-08-30 20:10:57 +000019242{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19243echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019244if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19245 echo $ECHO_N "(cached) $ECHO_C" >&6
19246else
19247 cat >conftest.$ac_ext <<_ACEOF
19248/* confdefs.h. */
19249_ACEOF
19250cat confdefs.h >>conftest.$ac_ext
19251cat >>conftest.$ac_ext <<_ACEOF
19252/* end confdefs.h. */
19253$ac_includes_default
19254int
19255main ()
19256{
19257static struct stat ac_aggr;
19258if (ac_aggr.st_birthtime)
19259return 0;
19260 ;
19261 return 0;
19262}
19263_ACEOF
19264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019265if { (ac_try="$ac_compile"
19266case "(($ac_try" in
19267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19268 *) ac_try_echo=$ac_try;;
19269esac
19270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019272 ac_status=$?
19273 grep -v '^ *+' conftest.er1 >conftest.err
19274 rm -f conftest.er1
19275 cat conftest.err >&5
19276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019277 (exit $ac_status); } && {
19278 test -z "$ac_c_werror_flag" ||
19279 test ! -s conftest.err
19280 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019281 ac_cv_member_struct_stat_st_birthtime=yes
19282else
19283 echo "$as_me: failed program was:" >&5
19284sed 's/^/| /' conftest.$ac_ext >&5
19285
Martin v. Löwiseba40652007-08-30 20:10:57 +000019286 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019287/* confdefs.h. */
19288_ACEOF
19289cat confdefs.h >>conftest.$ac_ext
19290cat >>conftest.$ac_ext <<_ACEOF
19291/* end confdefs.h. */
19292$ac_includes_default
19293int
19294main ()
19295{
19296static struct stat ac_aggr;
19297if (sizeof ac_aggr.st_birthtime)
19298return 0;
19299 ;
19300 return 0;
19301}
19302_ACEOF
19303rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019304if { (ac_try="$ac_compile"
19305case "(($ac_try" in
19306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19307 *) ac_try_echo=$ac_try;;
19308esac
19309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19310 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019311 ac_status=$?
19312 grep -v '^ *+' conftest.er1 >conftest.err
19313 rm -f conftest.er1
19314 cat conftest.err >&5
19315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019316 (exit $ac_status); } && {
19317 test -z "$ac_c_werror_flag" ||
19318 test ! -s conftest.err
19319 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019320 ac_cv_member_struct_stat_st_birthtime=yes
19321else
19322 echo "$as_me: failed program was:" >&5
19323sed 's/^/| /' conftest.$ac_ext >&5
19324
Martin v. Löwiseba40652007-08-30 20:10:57 +000019325 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019327
19328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019330
19331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019333{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19334echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019335if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19336
19337cat >>confdefs.h <<_ACEOF
19338#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19339_ACEOF
19340
19341
19342fi
19343
Martin v. Löwiseba40652007-08-30 20:10:57 +000019344{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19345echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019346if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19347 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019348else
Martin v. Löwis11437992002-04-12 09:54:03 +000019349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019350/* confdefs.h. */
19351_ACEOF
19352cat confdefs.h >>conftest.$ac_ext
19353cat >>conftest.$ac_ext <<_ACEOF
19354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019355$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019356int
19357main ()
19358{
19359static struct stat ac_aggr;
19360if (ac_aggr.st_blocks)
19361return 0;
19362 ;
19363 return 0;
19364}
19365_ACEOF
19366rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019367if { (ac_try="$ac_compile"
19368case "(($ac_try" in
19369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19370 *) ac_try_echo=$ac_try;;
19371esac
19372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19373 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019374 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019375 grep -v '^ *+' conftest.er1 >conftest.err
19376 rm -f conftest.er1
19377 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019379 (exit $ac_status); } && {
19380 test -z "$ac_c_werror_flag" ||
19381 test ! -s conftest.err
19382 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019383 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019384else
Martin v. Löwis11437992002-04-12 09:54:03 +000019385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019386sed 's/^/| /' conftest.$ac_ext >&5
19387
Martin v. Löwiseba40652007-08-30 20:10:57 +000019388 cat >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. */
19394$ac_includes_default
19395int
19396main ()
19397{
19398static struct stat ac_aggr;
19399if (sizeof ac_aggr.st_blocks)
19400return 0;
19401 ;
19402 return 0;
19403}
19404_ACEOF
19405rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019406if { (ac_try="$ac_compile"
19407case "(($ac_try" in
19408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19409 *) ac_try_echo=$ac_try;;
19410esac
19411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19412 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019414 grep -v '^ *+' conftest.er1 >conftest.err
19415 rm -f conftest.er1
19416 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019418 (exit $ac_status); } && {
19419 test -z "$ac_c_werror_flag" ||
19420 test ! -s conftest.err
19421 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019422 ac_cv_member_struct_stat_st_blocks=yes
19423else
19424 echo "$as_me: failed program was:" >&5
19425sed 's/^/| /' conftest.$ac_ext >&5
19426
Martin v. Löwiseba40652007-08-30 20:10:57 +000019427 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019429
19430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019432
19433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019435{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19436echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019437if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019438
Martin v. Löwis11437992002-04-12 09:54:03 +000019439cat >>confdefs.h <<_ACEOF
19440#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19441_ACEOF
19442
19443
19444cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019445#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019446_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019447
19448else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019449 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019450 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019451 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19452 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019453esac
19454
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019455fi
19456
Michael W. Hudson54241132001-12-07 15:38:26 +000019457
Martin v. Löwis11437992002-04-12 09:54:03 +000019458
Martin v. Löwiseba40652007-08-30 20:10:57 +000019459{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19460echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019461if test "${ac_cv_header_time_altzone+set}" = set; then
19462 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019463else
Martin v. Löwis11437992002-04-12 09:54:03 +000019464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019465/* confdefs.h. */
19466_ACEOF
19467cat confdefs.h >>conftest.$ac_ext
19468cat >>conftest.$ac_ext <<_ACEOF
19469/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019470#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019471int
19472main ()
19473{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019474return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019475 ;
19476 return 0;
19477}
19478_ACEOF
19479rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019480if { (ac_try="$ac_compile"
19481case "(($ac_try" in
19482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19483 *) ac_try_echo=$ac_try;;
19484esac
19485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019488 grep -v '^ *+' conftest.er1 >conftest.err
19489 rm -f conftest.er1
19490 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019492 (exit $ac_status); } && {
19493 test -z "$ac_c_werror_flag" ||
19494 test ! -s conftest.err
19495 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019496 ac_cv_header_time_altzone=yes
19497else
Martin v. Löwis11437992002-04-12 09:54:03 +000019498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019499sed 's/^/| /' conftest.$ac_ext >&5
19500
Martin v. Löwiseba40652007-08-30 20:10:57 +000019501 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019502fi
19503
Martin v. Löwiseba40652007-08-30 20:10:57 +000019504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19505fi
19506
19507{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19508echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019509if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019510
19511cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019512#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019513_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019514
19515fi
19516
Guido van Rossumda88dad1995-01-26 00:46:29 +000019517was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019518{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19519echo $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 +000019520cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019521/* confdefs.h. */
19522_ACEOF
19523cat confdefs.h >>conftest.$ac_ext
19524cat >>conftest.$ac_ext <<_ACEOF
19525/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019526
19527#include <sys/types.h>
19528#include <sys/select.h>
19529#include <sys/time.h>
19530
Martin v. Löwis11437992002-04-12 09:54:03 +000019531int
19532main ()
19533{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019534;
Martin v. Löwis11437992002-04-12 09:54:03 +000019535 ;
19536 return 0;
19537}
19538_ACEOF
19539rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019540if { (ac_try="$ac_compile"
19541case "(($ac_try" in
19542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19543 *) ac_try_echo=$ac_try;;
19544esac
19545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019548 grep -v '^ *+' conftest.er1 >conftest.err
19549 rm -f conftest.er1
19550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019552 (exit $ac_status); } && {
19553 test -z "$ac_c_werror_flag" ||
19554 test ! -s conftest.err
19555 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019556
19557
19558cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019559#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019560_ACEOF
19561
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019562 was_it_defined=yes
19563
Guido van Rossumf78abae1997-01-21 22:02:36 +000019564else
Martin v. Löwis11437992002-04-12 09:54:03 +000019565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019566sed 's/^/| /' conftest.$ac_ext >&5
19567
Brett Cannon19fab762007-06-02 03:02:29 +000019568
Martin v. Löwiseba40652007-08-30 20:10:57 +000019569fi
19570
19571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19572{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19573echo "${ECHO_T}$was_it_defined" >&6; }
19574
19575{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19576echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019577if test "${ac_cv_struct_addrinfo+set}" = set; then
19578 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019579else
Martin v. Löwis11437992002-04-12 09:54:03 +000019580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019581/* confdefs.h. */
19582_ACEOF
19583cat confdefs.h >>conftest.$ac_ext
19584cat >>conftest.$ac_ext <<_ACEOF
19585/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019586
19587# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019588int
19589main ()
19590{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019591struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019592 ;
19593 return 0;
19594}
19595_ACEOF
19596rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019597if { (ac_try="$ac_compile"
19598case "(($ac_try" in
19599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19600 *) ac_try_echo=$ac_try;;
19601esac
19602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019605 grep -v '^ *+' conftest.er1 >conftest.err
19606 rm -f conftest.er1
19607 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019609 (exit $ac_status); } && {
19610 test -z "$ac_c_werror_flag" ||
19611 test ! -s conftest.err
19612 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019613 ac_cv_struct_addrinfo=yes
19614else
Martin v. Löwis11437992002-04-12 09:54:03 +000019615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019616sed 's/^/| /' conftest.$ac_ext >&5
19617
Martin v. Löwiseba40652007-08-30 20:10:57 +000019618 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019619fi
19620
Martin v. Löwiseba40652007-08-30 20:10:57 +000019621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19622fi
19623
19624{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19625echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019626if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019627
19628cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019629#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019630_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019631
19632fi
19633
Martin v. Löwiseba40652007-08-30 20:10:57 +000019634{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19635echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019636if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19637 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019638else
Martin v. Löwis11437992002-04-12 09:54:03 +000019639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019640/* confdefs.h. */
19641_ACEOF
19642cat confdefs.h >>conftest.$ac_ext
19643cat >>conftest.$ac_ext <<_ACEOF
19644/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019645
19646# include <sys/types.h>
19647# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019648int
19649main ()
19650{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019651struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019652 ;
19653 return 0;
19654}
19655_ACEOF
19656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019657if { (ac_try="$ac_compile"
19658case "(($ac_try" in
19659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19660 *) ac_try_echo=$ac_try;;
19661esac
19662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019665 grep -v '^ *+' conftest.er1 >conftest.err
19666 rm -f conftest.er1
19667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019669 (exit $ac_status); } && {
19670 test -z "$ac_c_werror_flag" ||
19671 test ! -s conftest.err
19672 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019673 ac_cv_struct_sockaddr_storage=yes
19674else
Martin v. Löwis11437992002-04-12 09:54:03 +000019675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019676sed 's/^/| /' conftest.$ac_ext >&5
19677
Martin v. Löwiseba40652007-08-30 20:10:57 +000019678 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019679fi
19680
Martin v. Löwiseba40652007-08-30 20:10:57 +000019681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19682fi
19683
19684{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19685echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019686if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019687
19688cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019689#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019690_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019691
19692fi
19693
Guido van Rossum627b2d71993-12-24 10:39:16 +000019694# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019695
Michael W. Hudson54241132001-12-07 15:38:26 +000019696
Martin v. Löwiseba40652007-08-30 20:10:57 +000019697{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19698echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019699if test "${ac_cv_c_char_unsigned+set}" = set; then
19700 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019701else
Martin v. Löwis11437992002-04-12 09:54:03 +000019702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019703/* confdefs.h. */
19704_ACEOF
19705cat confdefs.h >>conftest.$ac_ext
19706cat >>conftest.$ac_ext <<_ACEOF
19707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019708$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019709int
19710main ()
19711{
19712static int test_array [1 - 2 * !(((char) -1) < 0)];
19713test_array [0] = 0
19714
19715 ;
19716 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019717}
Martin v. Löwis11437992002-04-12 09:54:03 +000019718_ACEOF
19719rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019720if { (ac_try="$ac_compile"
19721case "(($ac_try" in
19722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19723 *) ac_try_echo=$ac_try;;
19724esac
19725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019728 grep -v '^ *+' conftest.er1 >conftest.err
19729 rm -f conftest.er1
19730 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019732 (exit $ac_status); } && {
19733 test -z "$ac_c_werror_flag" ||
19734 test ! -s conftest.err
19735 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019736 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019737else
19738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019739sed 's/^/| /' conftest.$ac_ext >&5
19740
Martin v. Löwiseba40652007-08-30 20:10:57 +000019741 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019743
19744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019746{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19747echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019748if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019749 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019750#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019751_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019752
19753fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019754
Martin v. Löwiseba40652007-08-30 20:10:57 +000019755{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19756echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019757if test "${ac_cv_c_const+set}" = set; then
19758 echo $ECHO_N "(cached) $ECHO_C" >&6
19759else
19760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019761/* confdefs.h. */
19762_ACEOF
19763cat confdefs.h >>conftest.$ac_ext
19764cat >>conftest.$ac_ext <<_ACEOF
19765/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019766
Martin v. Löwis11437992002-04-12 09:54:03 +000019767int
19768main ()
19769{
19770/* FIXME: Include the comments suggested by Paul. */
19771#ifndef __cplusplus
19772 /* Ultrix mips cc rejects this. */
19773 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019774 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019775 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019776 char const *const *pcpcc;
19777 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019778 /* NEC SVR4.0.2 mips cc rejects this. */
19779 struct point {int x, y;};
19780 static struct point const zero = {0,0};
19781 /* AIX XL C 1.02.0.0 rejects this.
19782 It does not let you subtract one const X* pointer from another in
19783 an arm of an if-expression whose if-part is not a constant
19784 expression */
19785 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019786 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019787 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019788 ++pcpcc;
19789 ppc = (char**) pcpcc;
19790 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019791 { /* SCO 3.2v4 cc rejects this. */
19792 char *t;
19793 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019794
Martin v. Löwis11437992002-04-12 09:54:03 +000019795 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019796 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019797 }
19798 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19799 int x[] = {25, 17};
19800 const int *foo = &x[0];
19801 ++foo;
19802 }
19803 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19804 typedef const int *iptr;
19805 iptr p = 0;
19806 ++p;
19807 }
19808 { /* AIX XL C 1.02.0.0 rejects this saying
19809 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19810 struct s { int j; const int *ap[3]; };
19811 struct s *b; b->j = 5;
19812 }
19813 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19814 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019815 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019816 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019817 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019818#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019819
Martin v. Löwis11437992002-04-12 09:54:03 +000019820 ;
19821 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019822}
Martin v. Löwis11437992002-04-12 09:54:03 +000019823_ACEOF
19824rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019825if { (ac_try="$ac_compile"
19826case "(($ac_try" in
19827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19828 *) ac_try_echo=$ac_try;;
19829esac
19830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019833 grep -v '^ *+' conftest.er1 >conftest.err
19834 rm -f conftest.er1
19835 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019837 (exit $ac_status); } && {
19838 test -z "$ac_c_werror_flag" ||
19839 test ! -s conftest.err
19840 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019841 ac_cv_c_const=yes
19842else
Martin v. Löwis11437992002-04-12 09:54:03 +000019843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019844sed 's/^/| /' conftest.$ac_ext >&5
19845
Martin v. Löwiseba40652007-08-30 20:10:57 +000019846 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019848
19849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019851{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19852echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019853if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019854
19855cat >>confdefs.h <<\_ACEOF
19856#define const
19857_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019858
19859fi
19860
Michael W. Hudson54241132001-12-07 15:38:26 +000019861
Guido van Rossumda88dad1995-01-26 00:46:29 +000019862works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019863{ echo "$as_me:$LINENO: checking for working volatile" >&5
19864echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019865cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019866/* confdefs.h. */
19867_ACEOF
19868cat confdefs.h >>conftest.$ac_ext
19869cat >>conftest.$ac_ext <<_ACEOF
19870/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019871
Martin v. Löwis11437992002-04-12 09:54:03 +000019872int
19873main ()
19874{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019875volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019876 ;
19877 return 0;
19878}
19879_ACEOF
19880rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019881if { (ac_try="$ac_compile"
19882case "(($ac_try" in
19883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19884 *) ac_try_echo=$ac_try;;
19885esac
19886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019889 grep -v '^ *+' conftest.er1 >conftest.err
19890 rm -f conftest.er1
19891 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019893 (exit $ac_status); } && {
19894 test -z "$ac_c_werror_flag" ||
19895 test ! -s conftest.err
19896 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019897 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019898else
Martin v. Löwis11437992002-04-12 09:54:03 +000019899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019900sed 's/^/| /' conftest.$ac_ext >&5
19901
Martin v. Löwis11437992002-04-12 09:54:03 +000019902
19903cat >>confdefs.h <<\_ACEOF
19904#define volatile
19905_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019906
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019907
Guido van Rossum627b2d71993-12-24 10:39:16 +000019908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019909
19910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19911{ echo "$as_me:$LINENO: result: $works" >&5
19912echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019913
Guido van Rossumda88dad1995-01-26 00:46:29 +000019914works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019915{ echo "$as_me:$LINENO: checking for working signed char" >&5
19916echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019918/* confdefs.h. */
19919_ACEOF
19920cat confdefs.h >>conftest.$ac_ext
19921cat >>conftest.$ac_ext <<_ACEOF
19922/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019923
Martin v. Löwis11437992002-04-12 09:54:03 +000019924int
19925main ()
19926{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019927signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019928 ;
19929 return 0;
19930}
19931_ACEOF
19932rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019933if { (ac_try="$ac_compile"
19934case "(($ac_try" in
19935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19936 *) ac_try_echo=$ac_try;;
19937esac
19938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19939 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019941 grep -v '^ *+' conftest.er1 >conftest.err
19942 rm -f conftest.er1
19943 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019945 (exit $ac_status); } && {
19946 test -z "$ac_c_werror_flag" ||
19947 test ! -s conftest.err
19948 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019949 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019950else
Martin v. Löwis11437992002-04-12 09:54:03 +000019951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019952sed 's/^/| /' conftest.$ac_ext >&5
19953
Martin v. Löwis11437992002-04-12 09:54:03 +000019954
19955cat >>confdefs.h <<\_ACEOF
19956#define signed
19957_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019958
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019959
Guido van Rossum7f43da71994-08-01 12:15:30 +000019960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019961
19962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19963{ echo "$as_me:$LINENO: result: $works" >&5
19964echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019965
Guido van Rossumda88dad1995-01-26 00:46:29 +000019966have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019967{ echo "$as_me:$LINENO: checking for prototypes" >&5
19968echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019970/* confdefs.h. */
19971_ACEOF
19972cat confdefs.h >>conftest.$ac_ext
19973cat >>conftest.$ac_ext <<_ACEOF
19974/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019975int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019976int
19977main ()
19978{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019979return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019980 ;
19981 return 0;
19982}
19983_ACEOF
19984rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019985if { (ac_try="$ac_compile"
19986case "(($ac_try" in
19987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19988 *) ac_try_echo=$ac_try;;
19989esac
19990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019993 grep -v '^ *+' conftest.er1 >conftest.err
19994 rm -f conftest.er1
19995 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019997 (exit $ac_status); } && {
19998 test -z "$ac_c_werror_flag" ||
19999 test ! -s conftest.err
20000 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020001
20002
20003cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020004#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020005_ACEOF
20006
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020007 have_prototypes=yes
20008
Guido van Rossumf78abae1997-01-21 22:02:36 +000020009else
Martin v. Löwis11437992002-04-12 09:54:03 +000020010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020011sed 's/^/| /' conftest.$ac_ext >&5
20012
Martin v. Löwiseba40652007-08-30 20:10:57 +000020013
Guido van Rossum7f43da71994-08-01 12:15:30 +000020014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020015
20016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20017{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20018echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020019
Guido van Rossumda88dad1995-01-26 00:46:29 +000020020works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020021{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20022echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020024/* confdefs.h. */
20025_ACEOF
20026cat confdefs.h >>conftest.$ac_ext
20027cat >>conftest.$ac_ext <<_ACEOF
20028/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020029
20030#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020031int foo(int x, ...) {
20032 va_list va;
20033 va_start(va, x);
20034 va_arg(va, int);
20035 va_arg(va, char *);
20036 va_arg(va, double);
20037 return 0;
20038}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020039
Martin v. Löwis11437992002-04-12 09:54:03 +000020040int
20041main ()
20042{
Guido van Rossum90eea071996-08-30 20:58:57 +000020043return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020044 ;
20045 return 0;
20046}
20047_ACEOF
20048rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020049if { (ac_try="$ac_compile"
20050case "(($ac_try" in
20051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20052 *) ac_try_echo=$ac_try;;
20053esac
20054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20055 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020057 grep -v '^ *+' conftest.er1 >conftest.err
20058 rm -f conftest.er1
20059 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020061 (exit $ac_status); } && {
20062 test -z "$ac_c_werror_flag" ||
20063 test ! -s conftest.err
20064 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020065
20066
20067cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020068#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020069_ACEOF
20070
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020071 works=yes
20072
Guido van Rossumf78abae1997-01-21 22:02:36 +000020073else
Martin v. Löwis11437992002-04-12 09:54:03 +000020074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020075sed 's/^/| /' conftest.$ac_ext >&5
20076
Martin v. Löwiseba40652007-08-30 20:10:57 +000020077
Guido van Rossum627b2d71993-12-24 10:39:16 +000020078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020079
20080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20081{ echo "$as_me:$LINENO: result: $works" >&5
20082echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020083
Martin v. Löwisd6320502004-08-12 13:45:08 +000020084# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020085{ echo "$as_me:$LINENO: checking for socketpair" >&5
20086echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020087cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020088/* confdefs.h. */
20089_ACEOF
20090cat confdefs.h >>conftest.$ac_ext
20091cat >>conftest.$ac_ext <<_ACEOF
20092/* end confdefs.h. */
20093
20094#include <sys/types.h>
20095#include <sys/socket.h>
20096
20097int
20098main ()
20099{
20100void *x=socketpair
20101 ;
20102 return 0;
20103}
20104_ACEOF
20105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020106if { (ac_try="$ac_compile"
20107case "(($ac_try" in
20108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20109 *) ac_try_echo=$ac_try;;
20110esac
20111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020114 grep -v '^ *+' conftest.er1 >conftest.err
20115 rm -f conftest.er1
20116 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020118 (exit $ac_status); } && {
20119 test -z "$ac_c_werror_flag" ||
20120 test ! -s conftest.err
20121 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020122
20123cat >>confdefs.h <<\_ACEOF
20124#define HAVE_SOCKETPAIR 1
20125_ACEOF
20126
Martin v. Löwiseba40652007-08-30 20:10:57 +000020127 { echo "$as_me:$LINENO: result: yes" >&5
20128echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020129else
20130 echo "$as_me: failed program was:" >&5
20131sed 's/^/| /' conftest.$ac_ext >&5
20132
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133 { echo "$as_me:$LINENO: result: no" >&5
20134echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020135
20136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020137
20138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020139
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020140# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020141{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20142echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020144/* confdefs.h. */
20145_ACEOF
20146cat confdefs.h >>conftest.$ac_ext
20147cat >>conftest.$ac_ext <<_ACEOF
20148/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020149#include <sys/types.h>
20150#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020151int
20152main ()
20153{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020154struct sockaddr x;
20155x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020156 ;
20157 return 0;
20158}
20159_ACEOF
20160rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020161if { (ac_try="$ac_compile"
20162case "(($ac_try" in
20163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20164 *) ac_try_echo=$ac_try;;
20165esac
20166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20167 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020169 grep -v '^ *+' conftest.er1 >conftest.err
20170 rm -f conftest.er1
20171 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020173 (exit $ac_status); } && {
20174 test -z "$ac_c_werror_flag" ||
20175 test ! -s conftest.err
20176 } && test -s conftest.$ac_objext; then
20177 { echo "$as_me:$LINENO: result: yes" >&5
20178echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020179
20180cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020181#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020182_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020183
20184else
Martin v. Löwis11437992002-04-12 09:54:03 +000020185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020186sed 's/^/| /' conftest.$ac_ext >&5
20187
Martin v. Löwiseba40652007-08-30 20:10:57 +000020188 { echo "$as_me:$LINENO: result: no" >&5
20189echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020191
20192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020193
Guido van Rossumda88dad1995-01-26 00:46:29 +000020194va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020195{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20196echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020197cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020198/* confdefs.h. */
20199_ACEOF
20200cat confdefs.h >>conftest.$ac_ext
20201cat >>conftest.$ac_ext <<_ACEOF
20202/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020203
20204#ifdef HAVE_STDARG_PROTOTYPES
20205#include <stdarg.h>
20206#else
20207#include <varargs.h>
20208#endif
20209
Martin v. Löwis11437992002-04-12 09:54:03 +000020210int
20211main ()
20212{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020213va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020214 ;
20215 return 0;
20216}
20217_ACEOF
20218rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020219if { (ac_try="$ac_compile"
20220case "(($ac_try" in
20221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20222 *) ac_try_echo=$ac_try;;
20223esac
20224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020227 grep -v '^ *+' conftest.er1 >conftest.err
20228 rm -f conftest.er1
20229 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020231 (exit $ac_status); } && {
20232 test -z "$ac_c_werror_flag" ||
20233 test ! -s conftest.err
20234 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020235 :
20236else
Martin v. Löwis11437992002-04-12 09:54:03 +000020237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020238sed 's/^/| /' conftest.$ac_ext >&5
20239
Martin v. Löwis11437992002-04-12 09:54:03 +000020240
20241
20242cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020243#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020244_ACEOF
20245
Guido van Rossumda88dad1995-01-26 00:46:29 +000020246 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020247
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020249
20250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20251{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20252echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020253
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020254# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020255
20256
20257
Martin v. Löwiseba40652007-08-30 20:10:57 +000020258{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20259echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020260if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20261 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020262else
Martin v. Löwis11437992002-04-12 09:54:03 +000020263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020264/* confdefs.h. */
20265_ACEOF
20266cat confdefs.h >>conftest.$ac_ext
20267cat >>conftest.$ac_ext <<_ACEOF
20268/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020269/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20270 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20271#define gethostbyname_r innocuous_gethostbyname_r
20272
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020273/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020274 which can conflict with char gethostbyname_r (); below.
20275 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020276 <limits.h> exists even on freestanding compilers. */
20277
20278#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020279# include <limits.h>
20280#else
20281# include <assert.h>
20282#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020283
20284#undef gethostbyname_r
20285
Martin v. Löwiseba40652007-08-30 20:10:57 +000020286/* Override any GCC internal prototype to avoid an error.
20287 Use char because int might match the return type of a GCC
20288 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020289#ifdef __cplusplus
20290extern "C"
20291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020292char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020293/* The GNU C library defines this for functions which it implements
20294 to always fail with ENOSYS. Some functions are actually named
20295 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020296#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020297choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020298#endif
20299
Skip Montanaro6dead952003-09-25 14:50:04 +000020300int
20301main ()
20302{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020303return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020304 ;
20305 return 0;
20306}
20307_ACEOF
20308rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020309if { (ac_try="$ac_link"
20310case "(($ac_try" in
20311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20312 *) ac_try_echo=$ac_try;;
20313esac
20314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20315 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020317 grep -v '^ *+' conftest.er1 >conftest.err
20318 rm -f conftest.er1
20319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020321 (exit $ac_status); } && {
20322 test -z "$ac_c_werror_flag" ||
20323 test ! -s conftest.err
20324 } && test -s conftest$ac_exeext &&
20325 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020326 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020327else
Martin v. Löwis11437992002-04-12 09:54:03 +000020328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020329sed 's/^/| /' conftest.$ac_ext >&5
20330
Martin v. Löwiseba40652007-08-30 20:10:57 +000020331 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020333
20334rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020335 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020337{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20338echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020339if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020340
Martin v. Löwis11437992002-04-12 09:54:03 +000020341 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020342#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020343_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020344
Martin v. Löwiseba40652007-08-30 20:10:57 +000020345 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20346echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020347 OLD_CFLAGS=$CFLAGS
20348 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020350/* confdefs.h. */
20351_ACEOF
20352cat confdefs.h >>conftest.$ac_ext
20353cat >>conftest.$ac_ext <<_ACEOF
20354/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020355
20356# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020357
Martin v. Löwis11437992002-04-12 09:54:03 +000020358int
20359main ()
20360{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020361
20362 char *name;
20363 struct hostent *he, *res;
20364 char buffer[2048];
20365 int buflen = 2048;
20366 int h_errnop;
20367
20368 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020369
20370 ;
20371 return 0;
20372}
20373_ACEOF
20374rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020375if { (ac_try="$ac_compile"
20376case "(($ac_try" in
20377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20378 *) ac_try_echo=$ac_try;;
20379esac
20380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20381 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020383 grep -v '^ *+' conftest.er1 >conftest.err
20384 rm -f conftest.er1
20385 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020387 (exit $ac_status); } && {
20388 test -z "$ac_c_werror_flag" ||
20389 test ! -s conftest.err
20390 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020391
20392 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020393#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020394_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020395
Martin v. Löwis11437992002-04-12 09:54:03 +000020396
20397cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020398#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020399_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020400
Martin v. Löwiseba40652007-08-30 20:10:57 +000020401 { echo "$as_me:$LINENO: result: yes" >&5
20402echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020403
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020404else
Martin v. Löwis11437992002-04-12 09:54:03 +000020405 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020406sed 's/^/| /' conftest.$ac_ext >&5
20407
Martin v. Löwis11437992002-04-12 09:54:03 +000020408
Martin v. Löwiseba40652007-08-30 20:10:57 +000020409 { echo "$as_me:$LINENO: result: no" >&5
20410echo "${ECHO_T}no" >&6; }
20411 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20412echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020414/* confdefs.h. */
20415_ACEOF
20416cat confdefs.h >>conftest.$ac_ext
20417cat >>conftest.$ac_ext <<_ACEOF
20418/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020419
20420# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020421
Martin v. Löwis11437992002-04-12 09:54:03 +000020422int
20423main ()
20424{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020425
20426 char *name;
20427 struct hostent *he;
20428 char buffer[2048];
20429 int buflen = 2048;
20430 int h_errnop;
20431
20432 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020433
20434 ;
20435 return 0;
20436}
20437_ACEOF
20438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439if { (ac_try="$ac_compile"
20440case "(($ac_try" in
20441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20442 *) ac_try_echo=$ac_try;;
20443esac
20444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020447 grep -v '^ *+' conftest.er1 >conftest.err
20448 rm -f conftest.er1
20449 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020451 (exit $ac_status); } && {
20452 test -z "$ac_c_werror_flag" ||
20453 test ! -s conftest.err
20454 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020455
20456 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020457#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020458_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020459
Martin v. Löwis11437992002-04-12 09:54:03 +000020460
20461cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020462#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020463_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020464
Martin v. Löwiseba40652007-08-30 20:10:57 +000020465 { echo "$as_me:$LINENO: result: yes" >&5
20466echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020468else
Martin v. Löwis11437992002-04-12 09:54:03 +000020469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020470sed 's/^/| /' conftest.$ac_ext >&5
20471
Martin v. Löwis11437992002-04-12 09:54:03 +000020472
Martin v. Löwiseba40652007-08-30 20:10:57 +000020473 { echo "$as_me:$LINENO: result: no" >&5
20474echo "${ECHO_T}no" >&6; }
20475 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20476echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020478/* confdefs.h. */
20479_ACEOF
20480cat confdefs.h >>conftest.$ac_ext
20481cat >>conftest.$ac_ext <<_ACEOF
20482/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020483
20484# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020485
Martin v. Löwis11437992002-04-12 09:54:03 +000020486int
20487main ()
20488{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020489
20490 char *name;
20491 struct hostent *he;
20492 struct hostent_data data;
20493
20494 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020495
20496 ;
20497 return 0;
20498}
20499_ACEOF
20500rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020501if { (ac_try="$ac_compile"
20502case "(($ac_try" in
20503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20504 *) ac_try_echo=$ac_try;;
20505esac
20506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020509 grep -v '^ *+' conftest.er1 >conftest.err
20510 rm -f conftest.er1
20511 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020513 (exit $ac_status); } && {
20514 test -z "$ac_c_werror_flag" ||
20515 test ! -s conftest.err
20516 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020517
20518 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020519#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020520_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020521
Martin v. Löwis11437992002-04-12 09:54:03 +000020522
20523cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020524#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020525_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020526
Martin v. Löwiseba40652007-08-30 20:10:57 +000020527 { echo "$as_me:$LINENO: result: yes" >&5
20528echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020529
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020530else
Martin v. Löwis11437992002-04-12 09:54:03 +000020531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020532sed 's/^/| /' conftest.$ac_ext >&5
20533
Martin v. Löwis11437992002-04-12 09:54:03 +000020534
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535 { echo "$as_me:$LINENO: result: no" >&5
20536echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020537
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020539
20540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020541
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020543
20544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020545
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020547
20548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020549 CFLAGS=$OLD_CFLAGS
20550
20551else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020552
Martin v. Löwis11437992002-04-12 09:54:03 +000020553
20554for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020555do
Martin v. Löwis11437992002-04-12 09:54:03 +000020556as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020557{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20558echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20559if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020560 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020561else
Martin v. Löwis11437992002-04-12 09:54:03 +000020562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020563/* confdefs.h. */
20564_ACEOF
20565cat confdefs.h >>conftest.$ac_ext
20566cat >>conftest.$ac_ext <<_ACEOF
20567/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020568/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20569 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20570#define $ac_func innocuous_$ac_func
20571
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020572/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020573 which can conflict with char $ac_func (); below.
20574 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020575 <limits.h> exists even on freestanding compilers. */
20576
20577#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020578# include <limits.h>
20579#else
20580# include <assert.h>
20581#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020582
20583#undef $ac_func
20584
Martin v. Löwiseba40652007-08-30 20:10:57 +000020585/* Override any GCC internal prototype to avoid an error.
20586 Use char because int might match the return type of a GCC
20587 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020588#ifdef __cplusplus
20589extern "C"
20590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020591char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020592/* The GNU C library defines this for functions which it implements
20593 to always fail with ENOSYS. Some functions are actually named
20594 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020595#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020596choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020597#endif
20598
Skip Montanaro6dead952003-09-25 14:50:04 +000020599int
20600main ()
20601{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020602return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020603 ;
20604 return 0;
20605}
20606_ACEOF
20607rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020608if { (ac_try="$ac_link"
20609case "(($ac_try" in
20610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20611 *) ac_try_echo=$ac_try;;
20612esac
20613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20614 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020616 grep -v '^ *+' conftest.er1 >conftest.err
20617 rm -f conftest.er1
20618 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020620 (exit $ac_status); } && {
20621 test -z "$ac_c_werror_flag" ||
20622 test ! -s conftest.err
20623 } && test -s conftest$ac_exeext &&
20624 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020625 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020626else
Martin v. Löwis11437992002-04-12 09:54:03 +000020627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020628sed 's/^/| /' conftest.$ac_ext >&5
20629
Martin v. Löwiseba40652007-08-30 20:10:57 +000020630 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020632
20633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020634 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020636ac_res=`eval echo '${'$as_ac_var'}'`
20637 { echo "$as_me:$LINENO: result: $ac_res" >&5
20638echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020639if test `eval echo '${'$as_ac_var'}'` = yes; then
20640 cat >>confdefs.h <<_ACEOF
20641#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20642_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020643
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020644fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020645done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020646
Michael W. Hudson54241132001-12-07 15:38:26 +000020647
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020648fi
20649
Michael W. Hudson54241132001-12-07 15:38:26 +000020650
20651
20652
20653
20654
20655
Guido van Rossum627b2d71993-12-24 10:39:16 +000020656# checks for system services
20657# (none yet)
20658
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020659# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020660{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20661echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020662if test "${ac_cv_func___fpu_control+set}" = set; then
20663 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020664else
Martin v. Löwis11437992002-04-12 09:54:03 +000020665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020666/* confdefs.h. */
20667_ACEOF
20668cat confdefs.h >>conftest.$ac_ext
20669cat >>conftest.$ac_ext <<_ACEOF
20670/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020671/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20672 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20673#define __fpu_control innocuous___fpu_control
20674
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020675/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020676 which can conflict with char __fpu_control (); below.
20677 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020678 <limits.h> exists even on freestanding compilers. */
20679
20680#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020681# include <limits.h>
20682#else
20683# include <assert.h>
20684#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020685
20686#undef __fpu_control
20687
Martin v. Löwiseba40652007-08-30 20:10:57 +000020688/* Override any GCC internal prototype to avoid an error.
20689 Use char because int might match the return type of a GCC
20690 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020691#ifdef __cplusplus
20692extern "C"
20693#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020694char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020695/* The GNU C library defines this for functions which it implements
20696 to always fail with ENOSYS. Some functions are actually named
20697 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020698#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020699choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020700#endif
20701
Skip Montanaro6dead952003-09-25 14:50:04 +000020702int
20703main ()
20704{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020705return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020706 ;
20707 return 0;
20708}
20709_ACEOF
20710rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020711if { (ac_try="$ac_link"
20712case "(($ac_try" in
20713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20714 *) ac_try_echo=$ac_try;;
20715esac
20716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20717 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020719 grep -v '^ *+' conftest.er1 >conftest.err
20720 rm -f conftest.er1
20721 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020723 (exit $ac_status); } && {
20724 test -z "$ac_c_werror_flag" ||
20725 test ! -s conftest.err
20726 } && test -s conftest$ac_exeext &&
20727 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020728 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020729else
Martin v. Löwis11437992002-04-12 09:54:03 +000020730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020731sed 's/^/| /' conftest.$ac_ext >&5
20732
Martin v. Löwiseba40652007-08-30 20:10:57 +000020733 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020735
20736rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020737 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020739{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20740echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020741if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020742 :
20743else
Martin v. Löwis11437992002-04-12 09:54:03 +000020744
Martin v. Löwiseba40652007-08-30 20:10:57 +000020745{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20746echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020747if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20748 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020749else
Martin v. Löwis11437992002-04-12 09:54:03 +000020750 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020751LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020752cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020753/* confdefs.h. */
20754_ACEOF
20755cat confdefs.h >>conftest.$ac_ext
20756cat >>conftest.$ac_ext <<_ACEOF
20757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020758
Martin v. Löwiseba40652007-08-30 20:10:57 +000020759/* Override any GCC internal prototype to avoid an error.
20760 Use char because int might match the return type of a GCC
20761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020762#ifdef __cplusplus
20763extern "C"
20764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020765char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020766int
20767main ()
20768{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020769return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020770 ;
20771 return 0;
20772}
20773_ACEOF
20774rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020775if { (ac_try="$ac_link"
20776case "(($ac_try" in
20777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20778 *) ac_try_echo=$ac_try;;
20779esac
20780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20781 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020783 grep -v '^ *+' conftest.er1 >conftest.err
20784 rm -f conftest.er1
20785 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020787 (exit $ac_status); } && {
20788 test -z "$ac_c_werror_flag" ||
20789 test ! -s conftest.err
20790 } && test -s conftest$ac_exeext &&
20791 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020792 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020793else
Martin v. Löwis11437992002-04-12 09:54:03 +000020794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020795sed 's/^/| /' conftest.$ac_ext >&5
20796
Martin v. Löwiseba40652007-08-30 20:10:57 +000020797 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020799
20800rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020801 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020802LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020804{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20805echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020806if test $ac_cv_lib_ieee___fpu_control = yes; then
20807 cat >>confdefs.h <<_ACEOF
20808#define HAVE_LIBIEEE 1
20809_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020810
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020811 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020812
Guido van Rossum627b2d71993-12-24 10:39:16 +000020813fi
20814
Michael W. Hudson54241132001-12-07 15:38:26 +000020815
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020816fi
20817
Michael W. Hudson54241132001-12-07 15:38:26 +000020818
Guido van Rossum7f253911997-05-09 02:42:48 +000020819# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020820{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20821echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020822
Martin v. Löwiseba40652007-08-30 20:10:57 +000020823# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020824if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020825 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020826if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020827then
20828
20829cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020830#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020831_ACEOF
20832
Martin v. Löwiseba40652007-08-30 20:10:57 +000020833 { echo "$as_me:$LINENO: result: yes" >&5
20834echo "${ECHO_T}yes" >&6; }
20835else { echo "$as_me:$LINENO: result: no" >&5
20836echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020837fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020838else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020839 { echo "$as_me:$LINENO: result: no" >&5
20840echo "${ECHO_T}no" >&6; }
20841fi
20842
Guido van Rossum7f253911997-05-09 02:42:48 +000020843
Guido van Rossum7f43da71994-08-01 12:15:30 +000020844# check for --with-libm=...
20845
Guido van Rossum563e7081996-09-10 18:20:48 +000020846case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020847Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020848BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020849*) LIBM=-lm
20850esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020851{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20852echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020853
Martin v. Löwiseba40652007-08-30 20:10:57 +000020854# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020855if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020856 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020857if test "$withval" = no
20858then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020859 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20860echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020861elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020862then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020863 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20864echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020865else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20866echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20867 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020868fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020869else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020870 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20871echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20872fi
20873
Guido van Rossum7f43da71994-08-01 12:15:30 +000020874
20875# check for --with-libc=...
20876
Martin v. Löwiseba40652007-08-30 20:10:57 +000020877{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20878echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020879
Martin v. Löwiseba40652007-08-30 20:10:57 +000020880# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020881if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020882 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020883if test "$withval" = no
20884then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020885 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20886echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020887elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020888then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020889 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20890echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020891else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20892echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20893 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020894fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020895else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020896 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20897echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20898fi
20899
Guido van Rossum7f43da71994-08-01 12:15:30 +000020900
Christian Heimes0a8143f2007-12-18 23:22:54 +000020901# ************************************
20902# * Check for mathematical functions *
20903# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000020904
Mark Dickinson7a3d8642008-04-22 00:54:27 +000020905LIBS_SAVE=$LIBS
20906LIBS="$LIBS $LIBM"
20907
Mark Dickinson265d7382008-04-21 22:32:24 +000020908# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
20909# -0. on some architectures.
20910{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
20911echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
20912if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
20913 echo $ECHO_N "(cached) $ECHO_C" >&6
20914else
20915
20916if test "$cross_compiling" = yes; then
20917 ac_cv_tanh_preserves_zero_sign=no
20918else
20919 cat >conftest.$ac_ext <<_ACEOF
20920/* confdefs.h. */
20921_ACEOF
20922cat confdefs.h >>conftest.$ac_ext
20923cat >>conftest.$ac_ext <<_ACEOF
20924/* end confdefs.h. */
20925
20926#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000020927#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000020928int main() {
20929 /* return 0 if either negative zeros don't exist
20930 on this platform or if negative zeros exist
20931 and tanh(-0.) == -0. */
20932 if (atan2(0., -1.) == atan2(-0., -1.) ||
20933 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
20934 else exit(1);
20935}
20936
20937_ACEOF
20938rm -f conftest$ac_exeext
20939if { (ac_try="$ac_link"
20940case "(($ac_try" in
20941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20942 *) ac_try_echo=$ac_try;;
20943esac
20944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20945 (eval "$ac_link") 2>&5
20946 ac_status=$?
20947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20948 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20949 { (case "(($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_try") 2>&5
20955 ac_status=$?
20956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20957 (exit $ac_status); }; }; then
20958 ac_cv_tanh_preserves_zero_sign=yes
20959else
20960 echo "$as_me: program exited with status $ac_status" >&5
20961echo "$as_me: failed program was:" >&5
20962sed 's/^/| /' conftest.$ac_ext >&5
20963
20964( exit $ac_status )
20965ac_cv_tanh_preserves_zero_sign=no
20966fi
20967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20968fi
20969
20970
20971fi
20972
20973{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
20974echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
20975if test "$ac_cv_tanh_preserves_zero_sign" = yes
20976then
20977
20978cat >>confdefs.h <<\_ACEOF
20979#define TANH_PRESERVES_ZERO_SIGN 1
20980_ACEOF
20981
20982fi
20983
Martin v. Löwis11437992002-04-12 09:54:03 +000020984
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020985for ac_func in hypot
20986do
Martin v. Löwis11437992002-04-12 09:54:03 +000020987as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020988{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20989echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20990if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020991 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020992else
Martin v. Löwis11437992002-04-12 09:54:03 +000020993 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öwis4ddc78a2006-01-29 09:53:44 +000020999/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21000 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21001#define $ac_func innocuous_$ac_func
21002
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021003/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021004 which can conflict with char $ac_func (); below.
21005 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021006 <limits.h> exists even on freestanding compilers. */
21007
21008#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021009# include <limits.h>
21010#else
21011# include <assert.h>
21012#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021013
21014#undef $ac_func
21015
Martin v. Löwiseba40652007-08-30 20:10:57 +000021016/* Override any GCC internal prototype to avoid an error.
21017 Use char because int might match the return type of a GCC
21018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021019#ifdef __cplusplus
21020extern "C"
21021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021022char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021023/* The GNU C library defines this for functions which it implements
21024 to always fail with ENOSYS. Some functions are actually named
21025 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021026#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021027choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021028#endif
21029
Skip Montanaro6dead952003-09-25 14:50:04 +000021030int
21031main ()
21032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021033return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021034 ;
21035 return 0;
21036}
21037_ACEOF
21038rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021039if { (ac_try="$ac_link"
21040case "(($ac_try" in
21041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21042 *) ac_try_echo=$ac_try;;
21043esac
21044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21045 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021047 grep -v '^ *+' conftest.er1 >conftest.err
21048 rm -f conftest.er1
21049 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021051 (exit $ac_status); } && {
21052 test -z "$ac_c_werror_flag" ||
21053 test ! -s conftest.err
21054 } && test -s conftest$ac_exeext &&
21055 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021056 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021057else
Martin v. Löwis11437992002-04-12 09:54:03 +000021058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021059sed 's/^/| /' conftest.$ac_ext >&5
21060
Martin v. Löwiseba40652007-08-30 20:10:57 +000021061 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021063
21064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021065 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021067ac_res=`eval echo '${'$as_ac_var'}'`
21068 { echo "$as_me:$LINENO: result: $ac_res" >&5
21069echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021070if test `eval echo '${'$as_ac_var'}'` = yes; then
21071 cat >>confdefs.h <<_ACEOF
21072#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21073_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021074
Michael W. Hudson54241132001-12-07 15:38:26 +000021075else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021076 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021077 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021078 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21079 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021080esac
21081
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021082fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021083done
21084
Michael W. Hudson54241132001-12-07 15:38:26 +000021085
Christian Heimes0a8143f2007-12-18 23:22:54 +000021086
21087
21088
21089
21090
Christian Heimes48723512008-01-20 14:28:28 +000021091
21092
21093
21094
21095
21096for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021097do
21098as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21099{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21100echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21101if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21102 echo $ECHO_N "(cached) $ECHO_C" >&6
21103else
21104 cat >conftest.$ac_ext <<_ACEOF
21105/* confdefs.h. */
21106_ACEOF
21107cat confdefs.h >>conftest.$ac_ext
21108cat >>conftest.$ac_ext <<_ACEOF
21109/* end confdefs.h. */
21110/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21111 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21112#define $ac_func innocuous_$ac_func
21113
21114/* System header to define __stub macros and hopefully few prototypes,
21115 which can conflict with char $ac_func (); below.
21116 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21117 <limits.h> exists even on freestanding compilers. */
21118
21119#ifdef __STDC__
21120# include <limits.h>
21121#else
21122# include <assert.h>
21123#endif
21124
21125#undef $ac_func
21126
21127/* Override any GCC internal prototype to avoid an error.
21128 Use char because int might match the return type of a GCC
21129 builtin and then its argument prototype would still apply. */
21130#ifdef __cplusplus
21131extern "C"
21132#endif
21133char $ac_func ();
21134/* The GNU C library defines this for functions which it implements
21135 to always fail with ENOSYS. Some functions are actually named
21136 something starting with __ and the normal name is an alias. */
21137#if defined __stub_$ac_func || defined __stub___$ac_func
21138choke me
21139#endif
21140
21141int
21142main ()
21143{
21144return $ac_func ();
21145 ;
21146 return 0;
21147}
21148_ACEOF
21149rm -f conftest.$ac_objext conftest$ac_exeext
21150if { (ac_try="$ac_link"
21151case "(($ac_try" in
21152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21153 *) ac_try_echo=$ac_try;;
21154esac
21155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21156 (eval "$ac_link") 2>conftest.er1
21157 ac_status=$?
21158 grep -v '^ *+' conftest.er1 >conftest.err
21159 rm -f conftest.er1
21160 cat conftest.err >&5
21161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21162 (exit $ac_status); } && {
21163 test -z "$ac_c_werror_flag" ||
21164 test ! -s conftest.err
21165 } && test -s conftest$ac_exeext &&
21166 $as_test_x conftest$ac_exeext; then
21167 eval "$as_ac_var=yes"
21168else
21169 echo "$as_me: failed program was:" >&5
21170sed 's/^/| /' conftest.$ac_ext >&5
21171
21172 eval "$as_ac_var=no"
21173fi
21174
21175rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21176 conftest$ac_exeext conftest.$ac_ext
21177fi
21178ac_res=`eval echo '${'$as_ac_var'}'`
21179 { echo "$as_me:$LINENO: result: $ac_res" >&5
21180echo "${ECHO_T}$ac_res" >&6; }
21181if test `eval echo '${'$as_ac_var'}'` = yes; then
21182 cat >>confdefs.h <<_ACEOF
21183#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21184_ACEOF
21185
21186fi
21187done
21188
21189
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021190LIBS=$LIBS_SAVE
21191
Guido van Rossumef2255b2000-03-10 22:30:29 +000021192# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021193if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021194 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21195echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021196if test "${ac_cv_header_wchar_h+set}" = set; then
21197 echo $ECHO_N "(cached) $ECHO_C" >&6
21198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021199{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21200echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021201else
Martin v. Löwis11437992002-04-12 09:54:03 +000021202 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021203{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21204echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021205cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021206/* confdefs.h. */
21207_ACEOF
21208cat confdefs.h >>conftest.$ac_ext
21209cat >>conftest.$ac_ext <<_ACEOF
21210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021211$ac_includes_default
21212#include <wchar.h>
21213_ACEOF
21214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021215if { (ac_try="$ac_compile"
21216case "(($ac_try" in
21217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21218 *) ac_try_echo=$ac_try;;
21219esac
21220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021223 grep -v '^ *+' conftest.er1 >conftest.err
21224 rm -f conftest.er1
21225 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021227 (exit $ac_status); } && {
21228 test -z "$ac_c_werror_flag" ||
21229 test ! -s conftest.err
21230 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021231 ac_header_compiler=yes
21232else
21233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021234sed 's/^/| /' conftest.$ac_ext >&5
21235
Martin v. Löwiseba40652007-08-30 20:10:57 +000021236 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021238
21239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21240{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21241echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021242
21243# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021244{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21245echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021247/* confdefs.h. */
21248_ACEOF
21249cat confdefs.h >>conftest.$ac_ext
21250cat >>conftest.$ac_ext <<_ACEOF
21251/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021252#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021253_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021254if { (ac_try="$ac_cpp conftest.$ac_ext"
21255case "(($ac_try" in
21256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21257 *) ac_try_echo=$ac_try;;
21258esac
21259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21260 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021261 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021262 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021263 rm -f conftest.er1
21264 cat conftest.err >&5
21265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021266 (exit $ac_status); } >/dev/null && {
21267 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21268 test ! -s conftest.err
21269 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021270 ac_header_preproc=yes
21271else
21272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021273sed 's/^/| /' conftest.$ac_ext >&5
21274
Martin v. Löwis11437992002-04-12 09:54:03 +000021275 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021277
Martin v. Löwis11437992002-04-12 09:54:03 +000021278rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021279{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21280echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021281
21282# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021283case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21284 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021285 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21286echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021287 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21288echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21289 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021290 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021291 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021292 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21293echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021294 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21295echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21296 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21297echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21298 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21299echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021300 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21301echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021302 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21303echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021304 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021305## ------------------------------------------------ ##
21306## Report this to http://www.python.org/python-bugs ##
21307## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021308_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021309 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021310 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021311esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021312{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21313echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021314if test "${ac_cv_header_wchar_h+set}" = set; then
21315 echo $ECHO_N "(cached) $ECHO_C" >&6
21316else
21317 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021319{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21320echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021321
21322fi
21323if test $ac_cv_header_wchar_h = yes; then
21324
21325
21326cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021327#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021328_ACEOF
21329
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021330 wchar_h="yes"
21331
Guido van Rossumef2255b2000-03-10 22:30:29 +000021332else
Martin v. Löwis11437992002-04-12 09:54:03 +000021333 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021334
21335fi
21336
Michael W. Hudson54241132001-12-07 15:38:26 +000021337
Martin v. Löwis11437992002-04-12 09:54:03 +000021338
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021339# determine wchar_t size
21340if test "$wchar_h" = yes
21341then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021342 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21343echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021344if test "${ac_cv_type_wchar_t+set}" = set; then
21345 echo $ECHO_N "(cached) $ECHO_C" >&6
21346else
21347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021348/* confdefs.h. */
21349_ACEOF
21350cat confdefs.h >>conftest.$ac_ext
21351cat >>conftest.$ac_ext <<_ACEOF
21352/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021353#include <wchar.h>
21354
Martin v. Löwiseba40652007-08-30 20:10:57 +000021355typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021356int
21357main ()
21358{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021359if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021360 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021361if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021362 return 0;
21363 ;
21364 return 0;
21365}
21366_ACEOF
21367rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021368if { (ac_try="$ac_compile"
21369case "(($ac_try" in
21370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21371 *) ac_try_echo=$ac_try;;
21372esac
21373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21374 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021376 grep -v '^ *+' conftest.er1 >conftest.err
21377 rm -f conftest.er1
21378 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021380 (exit $ac_status); } && {
21381 test -z "$ac_c_werror_flag" ||
21382 test ! -s conftest.err
21383 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021384 ac_cv_type_wchar_t=yes
21385else
21386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021387sed 's/^/| /' conftest.$ac_ext >&5
21388
Martin v. Löwiseba40652007-08-30 20:10:57 +000021389 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021390fi
Brett Cannon19fab762007-06-02 03:02:29 +000021391
Martin v. Löwiseba40652007-08-30 20:10:57 +000021392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21393fi
21394{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21395echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21396
21397# The cast to long int works around a bug in the HP C Compiler
21398# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21399# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21400# This bug is HP SR number 8606223364.
21401{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21402echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021403if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21404 echo $ECHO_N "(cached) $ECHO_C" >&6
21405else
Martin v. Löwis11437992002-04-12 09:54:03 +000021406 if test "$cross_compiling" = yes; then
21407 # Depending upon the size, compute the lo and hi bounds.
21408cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021409/* confdefs.h. */
21410_ACEOF
21411cat confdefs.h >>conftest.$ac_ext
21412cat >>conftest.$ac_ext <<_ACEOF
21413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021414#include <wchar.h>
21415
Martin v. Löwiseba40652007-08-30 20:10:57 +000021416 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021417int
21418main ()
21419{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021420static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021421test_array [0] = 0
21422
21423 ;
21424 return 0;
21425}
21426_ACEOF
21427rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021428if { (ac_try="$ac_compile"
21429case "(($ac_try" in
21430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21431 *) ac_try_echo=$ac_try;;
21432esac
21433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021436 grep -v '^ *+' conftest.er1 >conftest.err
21437 rm -f conftest.er1
21438 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021440 (exit $ac_status); } && {
21441 test -z "$ac_c_werror_flag" ||
21442 test ! -s conftest.err
21443 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021444 ac_lo=0 ac_mid=0
21445 while :; do
21446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021447/* confdefs.h. */
21448_ACEOF
21449cat confdefs.h >>conftest.$ac_ext
21450cat >>conftest.$ac_ext <<_ACEOF
21451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021452#include <wchar.h>
21453
Martin v. Löwiseba40652007-08-30 20:10:57 +000021454 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021455int
21456main ()
21457{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021458static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021459test_array [0] = 0
21460
21461 ;
21462 return 0;
21463}
21464_ACEOF
21465rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021466if { (ac_try="$ac_compile"
21467case "(($ac_try" in
21468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21469 *) ac_try_echo=$ac_try;;
21470esac
21471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021474 grep -v '^ *+' conftest.er1 >conftest.err
21475 rm -f conftest.er1
21476 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021478 (exit $ac_status); } && {
21479 test -z "$ac_c_werror_flag" ||
21480 test ! -s conftest.err
21481 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021482 ac_hi=$ac_mid; break
21483else
21484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021485sed 's/^/| /' conftest.$ac_ext >&5
21486
Martin v. Löwiseba40652007-08-30 20:10:57 +000021487 ac_lo=`expr $ac_mid + 1`
21488 if test $ac_lo -le $ac_mid; then
21489 ac_lo= ac_hi=
21490 break
21491 fi
21492 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021494
21495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021496 done
21497else
21498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021499sed 's/^/| /' conftest.$ac_ext >&5
21500
Martin v. Löwiseba40652007-08-30 20:10:57 +000021501 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021502/* confdefs.h. */
21503_ACEOF
21504cat confdefs.h >>conftest.$ac_ext
21505cat >>conftest.$ac_ext <<_ACEOF
21506/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021507#include <wchar.h>
21508
Martin v. Löwiseba40652007-08-30 20:10:57 +000021509 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021510int
21511main ()
21512{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021513static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021514test_array [0] = 0
21515
21516 ;
21517 return 0;
21518}
21519_ACEOF
21520rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021521if { (ac_try="$ac_compile"
21522case "(($ac_try" in
21523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21524 *) ac_try_echo=$ac_try;;
21525esac
21526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21527 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021529 grep -v '^ *+' conftest.er1 >conftest.err
21530 rm -f conftest.er1
21531 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021533 (exit $ac_status); } && {
21534 test -z "$ac_c_werror_flag" ||
21535 test ! -s conftest.err
21536 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021537 ac_hi=-1 ac_mid=-1
21538 while :; do
21539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021540/* confdefs.h. */
21541_ACEOF
21542cat confdefs.h >>conftest.$ac_ext
21543cat >>conftest.$ac_ext <<_ACEOF
21544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021545#include <wchar.h>
21546
Martin v. Löwiseba40652007-08-30 20:10:57 +000021547 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021548int
21549main ()
21550{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021551static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021552test_array [0] = 0
21553
21554 ;
21555 return 0;
21556}
21557_ACEOF
21558rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021559if { (ac_try="$ac_compile"
21560case "(($ac_try" in
21561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21562 *) ac_try_echo=$ac_try;;
21563esac
21564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021567 grep -v '^ *+' conftest.er1 >conftest.err
21568 rm -f conftest.er1
21569 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021571 (exit $ac_status); } && {
21572 test -z "$ac_c_werror_flag" ||
21573 test ! -s conftest.err
21574 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021575 ac_lo=$ac_mid; break
21576else
21577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021578sed 's/^/| /' conftest.$ac_ext >&5
21579
Martin v. Löwiseba40652007-08-30 20:10:57 +000021580 ac_hi=`expr '(' $ac_mid ')' - 1`
21581 if test $ac_mid -le $ac_hi; then
21582 ac_lo= ac_hi=
21583 break
21584 fi
21585 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021587
21588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021589 done
21590else
21591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021592sed 's/^/| /' conftest.$ac_ext >&5
21593
Martin v. Löwiseba40652007-08-30 20:10:57 +000021594 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021596
21597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021599
21600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021601# Binary search between lo and hi bounds.
21602while test "x$ac_lo" != "x$ac_hi"; do
21603 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21604 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021605/* confdefs.h. */
21606_ACEOF
21607cat confdefs.h >>conftest.$ac_ext
21608cat >>conftest.$ac_ext <<_ACEOF
21609/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021610#include <wchar.h>
21611
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021613int
21614main ()
21615{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021616static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021617test_array [0] = 0
21618
21619 ;
21620 return 0;
21621}
21622_ACEOF
21623rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021624if { (ac_try="$ac_compile"
21625case "(($ac_try" in
21626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21627 *) ac_try_echo=$ac_try;;
21628esac
21629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021632 grep -v '^ *+' conftest.er1 >conftest.err
21633 rm -f conftest.er1
21634 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636 (exit $ac_status); } && {
21637 test -z "$ac_c_werror_flag" ||
21638 test ! -s conftest.err
21639 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021640 ac_hi=$ac_mid
21641else
21642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021643sed 's/^/| /' conftest.$ac_ext >&5
21644
Martin v. Löwiseba40652007-08-30 20:10:57 +000021645 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021647
21648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021649done
21650case $ac_lo in
21651?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021652'') if test "$ac_cv_type_wchar_t" = yes; then
21653 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021654See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021655echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021656See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021657 { (exit 77); exit 77; }; }
21658 else
21659 ac_cv_sizeof_wchar_t=0
21660 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021661esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021662else
Martin v. Löwis11437992002-04-12 09:54:03 +000021663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021664/* confdefs.h. */
21665_ACEOF
21666cat confdefs.h >>conftest.$ac_ext
21667cat >>conftest.$ac_ext <<_ACEOF
21668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021669#include <wchar.h>
21670
Martin v. Löwiseba40652007-08-30 20:10:57 +000021671 typedef wchar_t ac__type_sizeof_;
21672static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21673static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021674#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021675#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021676int
21677main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021678{
Martin v. Löwis11437992002-04-12 09:54:03 +000021679
21680 FILE *f = fopen ("conftest.val", "w");
21681 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021682 return 1;
21683 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021684 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021685 long int i = longval ();
21686 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21687 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021688 fprintf (f, "%ld\n", i);
21689 }
21690 else
21691 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021692 unsigned long int i = ulongval ();
21693 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21694 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021695 fprintf (f, "%lu\n", i);
21696 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021697 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021698
21699 ;
21700 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021701}
Martin v. Löwis11437992002-04-12 09:54:03 +000021702_ACEOF
21703rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021704if { (ac_try="$ac_link"
21705case "(($ac_try" in
21706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21707 *) ac_try_echo=$ac_try;;
21708esac
21709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21710 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021711 ac_status=$?
21712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21713 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021714 { (case "(($ac_try" in
21715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21716 *) ac_try_echo=$ac_try;;
21717esac
21718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21719 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021720 ac_status=$?
21721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21722 (exit $ac_status); }; }; then
21723 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021724else
Martin v. Löwis11437992002-04-12 09:54:03 +000021725 echo "$as_me: program exited with status $ac_status" >&5
21726echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021727sed 's/^/| /' conftest.$ac_ext >&5
21728
Martin v. Löwis11437992002-04-12 09:54:03 +000021729( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021730if test "$ac_cv_type_wchar_t" = yes; then
21731 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021732See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021733echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021734See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021735 { (exit 77); exit 77; }; }
21736 else
21737 ac_cv_sizeof_wchar_t=0
21738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021740rm -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 +000021741fi
21742rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021744{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21745echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21746
21747
21748
Martin v. Löwis11437992002-04-12 09:54:03 +000021749cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021750#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021751_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021752
Michael W. Hudson54241132001-12-07 15:38:26 +000021753
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021754fi
21755
Martin v. Löwiseba40652007-08-30 20:10:57 +000021756{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21757echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021758have_ucs4_tcl=no
21759cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021760/* confdefs.h. */
21761_ACEOF
21762cat confdefs.h >>conftest.$ac_ext
21763cat >>conftest.$ac_ext <<_ACEOF
21764/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021765
21766#include <tcl.h>
21767#if TCL_UTF_MAX != 6
21768# error "NOT UCS4_TCL"
21769#endif
21770int
21771main ()
21772{
21773
21774 ;
21775 return 0;
21776}
21777_ACEOF
21778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021779if { (ac_try="$ac_compile"
21780case "(($ac_try" in
21781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21782 *) ac_try_echo=$ac_try;;
21783esac
21784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021787 grep -v '^ *+' conftest.er1 >conftest.err
21788 rm -f conftest.er1
21789 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021791 (exit $ac_status); } && {
21792 test -z "$ac_c_werror_flag" ||
21793 test ! -s conftest.err
21794 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021795
21796
21797cat >>confdefs.h <<\_ACEOF
21798#define HAVE_UCS4_TCL 1
21799_ACEOF
21800
21801 have_ucs4_tcl=yes
21802
21803else
21804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021805sed 's/^/| /' conftest.$ac_ext >&5
21806
Martin v. Löwiseba40652007-08-30 20:10:57 +000021807
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021809
21810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21811{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21812echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021813
Skip Montanaro6dead952003-09-25 14:50:04 +000021814# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021815if test "$wchar_h" = yes
21816then
21817 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021818 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21819echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021820 if test "${ac_cv_wchar_t_signed+set}" = set; then
21821 echo $ECHO_N "(cached) $ECHO_C" >&6
21822else
21823
21824 if test "$cross_compiling" = yes; then
21825 ac_cv_wchar_t_signed=yes
21826else
21827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021828/* confdefs.h. */
21829_ACEOF
21830cat confdefs.h >>conftest.$ac_ext
21831cat >>conftest.$ac_ext <<_ACEOF
21832/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021833
21834 #include <wchar.h>
21835 int main()
21836 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021837 /* Success: exit code 0 */
21838 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021839 }
21840
21841_ACEOF
21842rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021843if { (ac_try="$ac_link"
21844case "(($ac_try" in
21845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21846 *) ac_try_echo=$ac_try;;
21847esac
21848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21849 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021850 ac_status=$?
21851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21852 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021853 { (case "(($ac_try" in
21854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21855 *) ac_try_echo=$ac_try;;
21856esac
21857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21858 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021859 ac_status=$?
21860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21861 (exit $ac_status); }; }; then
21862 ac_cv_wchar_t_signed=yes
21863else
21864 echo "$as_me: program exited with status $ac_status" >&5
21865echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021866sed 's/^/| /' conftest.$ac_ext >&5
21867
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021868( exit $ac_status )
21869ac_cv_wchar_t_signed=no
21870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021871rm -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 +000021872fi
21873
Martin v. Löwiseba40652007-08-30 20:10:57 +000021874
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021875fi
21876
Martin v. Löwiseba40652007-08-30 20:10:57 +000021877 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21878echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21879fi
21880
21881{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21882echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21883# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021884if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021885 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021886else
21887 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021888fi
21889
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021890
21891if test $enable_unicode = yes
21892then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021893 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021894 case "$have_ucs4_tcl" in
21895 yes) enable_unicode="ucs4"
21896 ;;
21897 *) enable_unicode="ucs2"
21898 ;;
21899 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021900fi
21901
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021902
21903
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021904case "$enable_unicode" in
21905ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021906 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021907#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021908_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021909
21910 ;;
21911ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021912 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021913#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021914_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021915
21916 ;;
21917esac
21918
Michael W. Hudson54241132001-12-07 15:38:26 +000021919
Martin v. Löwis11437992002-04-12 09:54:03 +000021920
21921
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021922
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021923if test "$enable_unicode" = "no"
21924then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021925 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021926 { echo "$as_me:$LINENO: result: not used" >&5
21927echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021928else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021929 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021930
21931cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021932#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021933_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021934
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021935
21936 # wchar_t is only usable if it maps to an unsigned type
21937 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021938 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021939 then
21940 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021941
Martin v. Löwis11437992002-04-12 09:54:03 +000021942cat >>confdefs.h <<\_ACEOF
21943#define HAVE_USABLE_WCHAR_T 1
21944_ACEOF
21945
21946 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021947#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021948_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021949
21950 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21951 then
21952 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021953 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021954#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021955_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021956
21957 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21958 then
21959 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021960 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021961#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021962_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021963
21964 else
21965 PY_UNICODE_TYPE="no type found"
21966 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021967 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21968echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021969fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021970
21971# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021972{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21973echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021974if test "${ac_cv_c_bigendian+set}" = set; then
21975 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021976else
Martin v. Löwis11437992002-04-12 09:54:03 +000021977 # See if sys/param.h defines the BYTE_ORDER macro.
21978cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021979/* confdefs.h. */
21980_ACEOF
21981cat confdefs.h >>conftest.$ac_ext
21982cat >>conftest.$ac_ext <<_ACEOF
21983/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021984#include <sys/types.h>
21985#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021986
Martin v. Löwis11437992002-04-12 09:54:03 +000021987int
21988main ()
21989{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021990#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21991 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021992 bogus endian macros
21993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021994
21995 ;
21996 return 0;
21997}
21998_ACEOF
21999rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022000if { (ac_try="$ac_compile"
22001case "(($ac_try" in
22002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22003 *) ac_try_echo=$ac_try;;
22004esac
22005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022008 grep -v '^ *+' conftest.er1 >conftest.err
22009 rm -f conftest.er1
22010 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022012 (exit $ac_status); } && {
22013 test -z "$ac_c_werror_flag" ||
22014 test ! -s conftest.err
22015 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022016 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022017cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022018/* confdefs.h. */
22019_ACEOF
22020cat confdefs.h >>conftest.$ac_ext
22021cat >>conftest.$ac_ext <<_ACEOF
22022/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022023#include <sys/types.h>
22024#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022025
Martin v. Löwis11437992002-04-12 09:54:03 +000022026int
22027main ()
22028{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022029#if BYTE_ORDER != BIG_ENDIAN
22030 not big endian
22031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022032
22033 ;
22034 return 0;
22035}
22036_ACEOF
22037rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022038if { (ac_try="$ac_compile"
22039case "(($ac_try" in
22040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22041 *) ac_try_echo=$ac_try;;
22042esac
22043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022046 grep -v '^ *+' conftest.er1 >conftest.err
22047 rm -f conftest.er1
22048 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022050 (exit $ac_status); } && {
22051 test -z "$ac_c_werror_flag" ||
22052 test ! -s conftest.err
22053 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022054 ac_cv_c_bigendian=yes
22055else
Martin v. Löwis11437992002-04-12 09:54:03 +000022056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022057sed 's/^/| /' conftest.$ac_ext >&5
22058
Martin v. Löwiseba40652007-08-30 20:10:57 +000022059 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022061
22062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022063else
Martin v. Löwis11437992002-04-12 09:54:03 +000022064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022065sed 's/^/| /' conftest.$ac_ext >&5
22066
Martin v. Löwiseba40652007-08-30 20:10:57 +000022067 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022068if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022069 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022070 ac_cv_c_bigendian=unknown
22071 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022072/* confdefs.h. */
22073_ACEOF
22074cat confdefs.h >>conftest.$ac_ext
22075cat >>conftest.$ac_ext <<_ACEOF
22076/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022077short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22078short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022079void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022080short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22081short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022082void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022083int
22084main ()
22085{
22086 _ascii (); _ebcdic ();
22087 ;
22088 return 0;
22089}
22090_ACEOF
22091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022092if { (ac_try="$ac_compile"
22093case "(($ac_try" in
22094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22095 *) ac_try_echo=$ac_try;;
22096esac
22097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022100 grep -v '^ *+' conftest.er1 >conftest.err
22101 rm -f conftest.er1
22102 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022104 (exit $ac_status); } && {
22105 test -z "$ac_c_werror_flag" ||
22106 test ! -s conftest.err
22107 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022108 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022109 ac_cv_c_bigendian=yes
22110fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022111if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022112 if test "$ac_cv_c_bigendian" = unknown; then
22113 ac_cv_c_bigendian=no
22114 else
22115 # finding both strings is unlikely to happen, but who knows?
22116 ac_cv_c_bigendian=unknown
22117 fi
22118fi
22119else
22120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022121sed 's/^/| /' conftest.$ac_ext >&5
22122
Martin v. Löwiseba40652007-08-30 20:10:57 +000022123
Martin v. Löwis11437992002-04-12 09:54:03 +000022124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022125
22126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022127else
22128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022129/* confdefs.h. */
22130_ACEOF
22131cat confdefs.h >>conftest.$ac_ext
22132cat >>conftest.$ac_ext <<_ACEOF
22133/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022134$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022135int
22136main ()
22137{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022138
Guido van Rossumef2255b2000-03-10 22:30:29 +000022139 /* Are we little or big endian? From Harbison&Steele. */
22140 union
22141 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022142 long int l;
22143 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022144 } u;
22145 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022146 return u.c[sizeof (long int) - 1] == 1;
22147
22148 ;
22149 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022150}
Martin v. Löwis11437992002-04-12 09:54:03 +000022151_ACEOF
22152rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022153if { (ac_try="$ac_link"
22154case "(($ac_try" in
22155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22156 *) ac_try_echo=$ac_try;;
22157esac
22158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22159 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022160 ac_status=$?
22161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22162 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022163 { (case "(($ac_try" in
22164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22165 *) ac_try_echo=$ac_try;;
22166esac
22167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22168 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022169 ac_status=$?
22170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22171 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022172 ac_cv_c_bigendian=no
22173else
Martin v. Löwis11437992002-04-12 09:54:03 +000022174 echo "$as_me: program exited with status $ac_status" >&5
22175echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022176sed 's/^/| /' conftest.$ac_ext >&5
22177
Martin v. Löwis11437992002-04-12 09:54:03 +000022178( exit $ac_status )
22179ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022181rm -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 +000022182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022183
22184
Martin v. Löwis11437992002-04-12 09:54:03 +000022185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022186
22187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022189{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22190echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022191case $ac_cv_c_bigendian in
22192 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022193
Martin v. Löwis11437992002-04-12 09:54:03 +000022194cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022195#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022196_ACEOF
22197 ;;
22198 no)
22199 ;;
22200 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022201 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022202presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022203echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022204presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22205 { (exit 1); exit 1; }; } ;;
22206esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022207
Michael W. Hudson54241132001-12-07 15:38:26 +000022208
Ronald Oussoren988117f2006-04-29 11:31:35 +000022209
22210
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022211# Check whether right shifting a negative integer extends the sign bit
22212# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022213{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22214echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022215if test "${ac_cv_rshift_extends_sign+set}" = set; then
22216 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022217else
Martin v. Löwis11437992002-04-12 09:54:03 +000022218
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022219if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022220 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022221else
Martin v. Löwis11437992002-04-12 09:54:03 +000022222 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022223/* confdefs.h. */
22224_ACEOF
22225cat confdefs.h >>conftest.$ac_ext
22226cat >>conftest.$ac_ext <<_ACEOF
22227/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022228
22229int main()
22230{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022231 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022232}
22233
Martin v. Löwis11437992002-04-12 09:54:03 +000022234_ACEOF
22235rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022236if { (ac_try="$ac_link"
22237case "(($ac_try" in
22238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22239 *) ac_try_echo=$ac_try;;
22240esac
22241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22242 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022243 ac_status=$?
22244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22245 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022246 { (case "(($ac_try" in
22247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22248 *) ac_try_echo=$ac_try;;
22249esac
22250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22251 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022252 ac_status=$?
22253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22254 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022255 ac_cv_rshift_extends_sign=yes
22256else
Martin v. Löwis11437992002-04-12 09:54:03 +000022257 echo "$as_me: program exited with status $ac_status" >&5
22258echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022259sed 's/^/| /' conftest.$ac_ext >&5
22260
Martin v. Löwis11437992002-04-12 09:54:03 +000022261( exit $ac_status )
22262ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022264rm -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 +000022265fi
22266
Martin v. Löwiseba40652007-08-30 20:10:57 +000022267
22268fi
22269
22270{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22271echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022272if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022273then
Martin v. Löwis11437992002-04-12 09:54:03 +000022274
22275cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022276#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022277_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022278
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022279fi
22280
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022281# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022282{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22283echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022284if test "${ac_cv_have_getc_unlocked+set}" = set; then
22285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022286else
Martin v. Löwis11437992002-04-12 09:54:03 +000022287
22288cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022289/* confdefs.h. */
22290_ACEOF
22291cat confdefs.h >>conftest.$ac_ext
22292cat >>conftest.$ac_ext <<_ACEOF
22293/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022294#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022295int
22296main ()
22297{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022298
22299 FILE *f = fopen("/dev/null", "r");
22300 flockfile(f);
22301 getc_unlocked(f);
22302 funlockfile(f);
22303
Martin v. Löwis11437992002-04-12 09:54:03 +000022304 ;
22305 return 0;
22306}
22307_ACEOF
22308rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022309if { (ac_try="$ac_link"
22310case "(($ac_try" in
22311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22312 *) ac_try_echo=$ac_try;;
22313esac
22314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22315 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022317 grep -v '^ *+' conftest.er1 >conftest.err
22318 rm -f conftest.er1
22319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022321 (exit $ac_status); } && {
22322 test -z "$ac_c_werror_flag" ||
22323 test ! -s conftest.err
22324 } && test -s conftest$ac_exeext &&
22325 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022326 ac_cv_have_getc_unlocked=yes
22327else
Martin v. Löwis11437992002-04-12 09:54:03 +000022328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022329sed 's/^/| /' conftest.$ac_ext >&5
22330
Martin v. Löwiseba40652007-08-30 20:10:57 +000022331 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022333
22334rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022335 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022336fi
22337
Martin v. Löwiseba40652007-08-30 20:10:57 +000022338{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22339echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022340if test "$ac_cv_have_getc_unlocked" = yes
22341then
Martin v. Löwis11437992002-04-12 09:54:03 +000022342
22343cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022344#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022345_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022346
22347fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022348
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022349# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022350# save the value of LIBS so we don't actually link Python with readline
22351LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022352
Martin v. Löwiseba40652007-08-30 20:10:57 +000022353{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22354echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022355if test "${ac_cv_lib_readline_readline+set}" = set; then
22356 echo $ECHO_N "(cached) $ECHO_C" >&6
22357else
22358 ac_check_lib_save_LIBS=$LIBS
22359LIBS="-lreadline $LIBS"
22360cat >conftest.$ac_ext <<_ACEOF
22361/* confdefs.h. */
22362_ACEOF
22363cat confdefs.h >>conftest.$ac_ext
22364cat >>conftest.$ac_ext <<_ACEOF
22365/* end confdefs.h. */
22366
Martin v. Löwiseba40652007-08-30 20:10:57 +000022367/* Override any GCC internal prototype to avoid an error.
22368 Use char because int might match the return type of a GCC
22369 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022370#ifdef __cplusplus
22371extern "C"
22372#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022373char readline ();
22374int
22375main ()
22376{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022377return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022378 ;
22379 return 0;
22380}
22381_ACEOF
22382rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022383if { (ac_try="$ac_link"
22384case "(($ac_try" in
22385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22386 *) ac_try_echo=$ac_try;;
22387esac
22388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22389 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022390 ac_status=$?
22391 grep -v '^ *+' conftest.er1 >conftest.err
22392 rm -f conftest.er1
22393 cat conftest.err >&5
22394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022395 (exit $ac_status); } && {
22396 test -z "$ac_c_werror_flag" ||
22397 test ! -s conftest.err
22398 } && test -s conftest$ac_exeext &&
22399 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022400 ac_cv_lib_readline_readline=yes
22401else
22402 echo "$as_me: failed program was:" >&5
22403sed 's/^/| /' conftest.$ac_ext >&5
22404
Martin v. Löwiseba40652007-08-30 20:10:57 +000022405 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022407
22408rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022409 conftest$ac_exeext conftest.$ac_ext
22410LIBS=$ac_check_lib_save_LIBS
22411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022412{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22413echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022414if test $ac_cv_lib_readline_readline = yes; then
22415 cat >>confdefs.h <<_ACEOF
22416#define HAVE_LIBREADLINE 1
22417_ACEOF
22418
22419 LIBS="-lreadline $LIBS"
22420
22421fi
22422
22423if test "$ac_cv_have_readline_readline" = no
22424then
22425
Martin v. Löwiseba40652007-08-30 20:10:57 +000022426{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22427echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022428if test "${ac_cv_lib_termcap_readline+set}" = set; then
22429 echo $ECHO_N "(cached) $ECHO_C" >&6
22430else
22431 ac_check_lib_save_LIBS=$LIBS
22432LIBS="-ltermcap $LIBS"
22433cat >conftest.$ac_ext <<_ACEOF
22434/* confdefs.h. */
22435_ACEOF
22436cat confdefs.h >>conftest.$ac_ext
22437cat >>conftest.$ac_ext <<_ACEOF
22438/* end confdefs.h. */
22439
Martin v. Löwiseba40652007-08-30 20:10:57 +000022440/* Override any GCC internal prototype to avoid an error.
22441 Use char because int might match the return type of a GCC
22442 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022443#ifdef __cplusplus
22444extern "C"
22445#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022446char readline ();
22447int
22448main ()
22449{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022450return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022451 ;
22452 return 0;
22453}
22454_ACEOF
22455rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022456if { (ac_try="$ac_link"
22457case "(($ac_try" in
22458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22459 *) ac_try_echo=$ac_try;;
22460esac
22461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22462 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022463 ac_status=$?
22464 grep -v '^ *+' conftest.er1 >conftest.err
22465 rm -f conftest.er1
22466 cat conftest.err >&5
22467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022468 (exit $ac_status); } && {
22469 test -z "$ac_c_werror_flag" ||
22470 test ! -s conftest.err
22471 } && test -s conftest$ac_exeext &&
22472 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022473 ac_cv_lib_termcap_readline=yes
22474else
22475 echo "$as_me: failed program was:" >&5
22476sed 's/^/| /' conftest.$ac_ext >&5
22477
Martin v. Löwiseba40652007-08-30 20:10:57 +000022478 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022480
22481rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022482 conftest$ac_exeext conftest.$ac_ext
22483LIBS=$ac_check_lib_save_LIBS
22484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022485{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22486echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022487if test $ac_cv_lib_termcap_readline = yes; then
22488 cat >>confdefs.h <<_ACEOF
22489#define HAVE_LIBTERMCAP 1
22490_ACEOF
22491
22492 LIBS="-ltermcap $LIBS"
22493
22494fi
22495
22496fi
22497
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022498# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022499{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22500echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022501if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22502 echo $ECHO_N "(cached) $ECHO_C" >&6
22503else
22504 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022505LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022506cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022507/* confdefs.h. */
22508_ACEOF
22509cat confdefs.h >>conftest.$ac_ext
22510cat >>conftest.$ac_ext <<_ACEOF
22511/* end confdefs.h. */
22512
Martin v. Löwiseba40652007-08-30 20:10:57 +000022513/* Override any GCC internal prototype to avoid an error.
22514 Use char because int might match the return type of a GCC
22515 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022516#ifdef __cplusplus
22517extern "C"
22518#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022519char rl_callback_handler_install ();
22520int
22521main ()
22522{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022523return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022524 ;
22525 return 0;
22526}
22527_ACEOF
22528rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022529if { (ac_try="$ac_link"
22530case "(($ac_try" in
22531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22532 *) ac_try_echo=$ac_try;;
22533esac
22534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22535 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022537 grep -v '^ *+' conftest.er1 >conftest.err
22538 rm -f conftest.er1
22539 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022541 (exit $ac_status); } && {
22542 test -z "$ac_c_werror_flag" ||
22543 test ! -s conftest.err
22544 } && test -s conftest$ac_exeext &&
22545 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022546 ac_cv_lib_readline_rl_callback_handler_install=yes
22547else
22548 echo "$as_me: failed program was:" >&5
22549sed 's/^/| /' conftest.$ac_ext >&5
22550
Martin v. Löwiseba40652007-08-30 20:10:57 +000022551 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022553
22554rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022555 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022556LIBS=$ac_check_lib_save_LIBS
22557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022558{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22559echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022560if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22561
22562cat >>confdefs.h <<\_ACEOF
22563#define HAVE_RL_CALLBACK 1
22564_ACEOF
22565
22566fi
22567
22568
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022569# check for readline 2.2
22570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022571/* confdefs.h. */
22572_ACEOF
22573cat confdefs.h >>conftest.$ac_ext
22574cat >>conftest.$ac_ext <<_ACEOF
22575/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022576#include <readline/readline.h>
22577_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022578if { (ac_try="$ac_cpp conftest.$ac_ext"
22579case "(($ac_try" in
22580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22581 *) ac_try_echo=$ac_try;;
22582esac
22583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22584 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022585 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022586 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022587 rm -f conftest.er1
22588 cat conftest.err >&5
22589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022590 (exit $ac_status); } >/dev/null && {
22591 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22592 test ! -s conftest.err
22593 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022594 have_readline=yes
22595else
22596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022597sed 's/^/| /' conftest.$ac_ext >&5
22598
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022599 have_readline=no
22600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022601
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022602rm -f conftest.err conftest.$ac_ext
22603if test $have_readline = yes
22604then
22605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022606/* confdefs.h. */
22607_ACEOF
22608cat confdefs.h >>conftest.$ac_ext
22609cat >>conftest.$ac_ext <<_ACEOF
22610/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022611#include <readline/readline.h>
22612
22613_ACEOF
22614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022615 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022616
22617cat >>confdefs.h <<\_ACEOF
22618#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22619_ACEOF
22620
22621fi
22622rm -f conftest*
22623
22624fi
22625
Martin v. Löwis0daad592001-09-30 21:09:59 +000022626# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022627{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22628echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022629if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022631else
Martin v. Löwis11437992002-04-12 09:54:03 +000022632 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022633LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022635/* confdefs.h. */
22636_ACEOF
22637cat confdefs.h >>conftest.$ac_ext
22638cat >>conftest.$ac_ext <<_ACEOF
22639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022640
Martin v. Löwiseba40652007-08-30 20:10:57 +000022641/* Override any GCC internal prototype to avoid an error.
22642 Use char because int might match the return type of a GCC
22643 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022644#ifdef __cplusplus
22645extern "C"
22646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022647char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022648int
22649main ()
22650{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022651return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022652 ;
22653 return 0;
22654}
22655_ACEOF
22656rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022657if { (ac_try="$ac_link"
22658case "(($ac_try" in
22659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22660 *) ac_try_echo=$ac_try;;
22661esac
22662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22663 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022665 grep -v '^ *+' conftest.er1 >conftest.err
22666 rm -f conftest.er1
22667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022669 (exit $ac_status); } && {
22670 test -z "$ac_c_werror_flag" ||
22671 test ! -s conftest.err
22672 } && test -s conftest$ac_exeext &&
22673 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022674 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022675else
Martin v. Löwis11437992002-04-12 09:54:03 +000022676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022677sed 's/^/| /' conftest.$ac_ext >&5
22678
Martin v. Löwiseba40652007-08-30 20:10:57 +000022679 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022681
22682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022684LIBS=$ac_check_lib_save_LIBS
22685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022686{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22687echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022688if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022689
Martin v. Löwis11437992002-04-12 09:54:03 +000022690cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022691#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022692_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022693
Martin v. Löwis0daad592001-09-30 21:09:59 +000022694fi
22695
Michael W. Hudson54241132001-12-07 15:38:26 +000022696
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022697# also in 4.0
22698{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22699echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22700if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22701 echo $ECHO_N "(cached) $ECHO_C" >&6
22702else
22703 ac_check_lib_save_LIBS=$LIBS
22704LIBS="-lreadline $LIBS"
22705cat >conftest.$ac_ext <<_ACEOF
22706/* confdefs.h. */
22707_ACEOF
22708cat confdefs.h >>conftest.$ac_ext
22709cat >>conftest.$ac_ext <<_ACEOF
22710/* end confdefs.h. */
22711
22712/* Override any GCC internal prototype to avoid an error.
22713 Use char because int might match the return type of a GCC
22714 builtin and then its argument prototype would still apply. */
22715#ifdef __cplusplus
22716extern "C"
22717#endif
22718char rl_completion_display_matches_hook ();
22719int
22720main ()
22721{
22722return rl_completion_display_matches_hook ();
22723 ;
22724 return 0;
22725}
22726_ACEOF
22727rm -f conftest.$ac_objext conftest$ac_exeext
22728if { (ac_try="$ac_link"
22729case "(($ac_try" in
22730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22731 *) ac_try_echo=$ac_try;;
22732esac
22733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22734 (eval "$ac_link") 2>conftest.er1
22735 ac_status=$?
22736 grep -v '^ *+' conftest.er1 >conftest.err
22737 rm -f conftest.er1
22738 cat conftest.err >&5
22739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22740 (exit $ac_status); } && {
22741 test -z "$ac_c_werror_flag" ||
22742 test ! -s conftest.err
22743 } && test -s conftest$ac_exeext &&
22744 $as_test_x conftest$ac_exeext; then
22745 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22746else
22747 echo "$as_me: failed program was:" >&5
22748sed 's/^/| /' conftest.$ac_ext >&5
22749
22750 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22751fi
22752
22753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22754 conftest$ac_exeext conftest.$ac_ext
22755LIBS=$ac_check_lib_save_LIBS
22756fi
22757{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22758echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22759if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22760
22761cat >>confdefs.h <<\_ACEOF
22762#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22763_ACEOF
22764
22765fi
22766
22767
Martin v. Löwis0daad592001-09-30 21:09:59 +000022768# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022769{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22770echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022771if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22772 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022773else
Martin v. Löwis11437992002-04-12 09:54:03 +000022774 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022775LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022776cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022777/* confdefs.h. */
22778_ACEOF
22779cat confdefs.h >>conftest.$ac_ext
22780cat >>conftest.$ac_ext <<_ACEOF
22781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022782
Martin v. Löwiseba40652007-08-30 20:10:57 +000022783/* Override any GCC internal prototype to avoid an error.
22784 Use char because int might match the return type of a GCC
22785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022786#ifdef __cplusplus
22787extern "C"
22788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022789char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022790int
22791main ()
22792{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022793return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022794 ;
22795 return 0;
22796}
22797_ACEOF
22798rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022799if { (ac_try="$ac_link"
22800case "(($ac_try" in
22801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22802 *) ac_try_echo=$ac_try;;
22803esac
22804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22805 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022807 grep -v '^ *+' conftest.er1 >conftest.err
22808 rm -f conftest.er1
22809 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022811 (exit $ac_status); } && {
22812 test -z "$ac_c_werror_flag" ||
22813 test ! -s conftest.err
22814 } && test -s conftest$ac_exeext &&
22815 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022816 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022817else
Martin v. Löwis11437992002-04-12 09:54:03 +000022818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022819sed 's/^/| /' conftest.$ac_ext >&5
22820
Martin v. Löwiseba40652007-08-30 20:10:57 +000022821 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022823
22824rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022825 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022826LIBS=$ac_check_lib_save_LIBS
22827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022828{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22829echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022830if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022831
Martin v. Löwis11437992002-04-12 09:54:03 +000022832cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022833#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022834_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022835
Guido van Rossum353ae582001-07-10 16:45:32 +000022836fi
22837
Jack Jansendd19cf82001-12-06 22:36:17 +000022838
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022839# also in readline 4.2
22840cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022841/* confdefs.h. */
22842_ACEOF
22843cat confdefs.h >>conftest.$ac_ext
22844cat >>conftest.$ac_ext <<_ACEOF
22845/* end confdefs.h. */
22846#include <readline/readline.h>
22847_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022848if { (ac_try="$ac_cpp conftest.$ac_ext"
22849case "(($ac_try" in
22850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22851 *) ac_try_echo=$ac_try;;
22852esac
22853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22854 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022855 ac_status=$?
22856 grep -v '^ *+' conftest.er1 >conftest.err
22857 rm -f conftest.er1
22858 cat conftest.err >&5
22859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022860 (exit $ac_status); } >/dev/null && {
22861 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22862 test ! -s conftest.err
22863 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022864 have_readline=yes
22865else
22866 echo "$as_me: failed program was:" >&5
22867sed 's/^/| /' conftest.$ac_ext >&5
22868
22869 have_readline=no
22870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022871
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022872rm -f conftest.err conftest.$ac_ext
22873if test $have_readline = yes
22874then
22875 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022876/* confdefs.h. */
22877_ACEOF
22878cat confdefs.h >>conftest.$ac_ext
22879cat >>conftest.$ac_ext <<_ACEOF
22880/* end confdefs.h. */
22881#include <readline/readline.h>
22882
22883_ACEOF
22884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22885 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22886
22887cat >>confdefs.h <<\_ACEOF
22888#define HAVE_RL_CATCH_SIGNAL 1
22889_ACEOF
22890
22891fi
22892rm -f conftest*
22893
22894fi
22895
Martin v. Löwis82bca632006-02-10 20:49:30 +000022896# End of readline checks: restore LIBS
22897LIBS=$LIBS_no_readline
22898
Martin v. Löwiseba40652007-08-30 20:10:57 +000022899{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22900echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022901if test "${ac_cv_broken_nice+set}" = set; then
22902 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022903else
Martin v. Löwis11437992002-04-12 09:54:03 +000022904
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022905if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022906 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022907else
Martin v. Löwis11437992002-04-12 09:54:03 +000022908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022909/* confdefs.h. */
22910_ACEOF
22911cat confdefs.h >>conftest.$ac_ext
22912cat >>conftest.$ac_ext <<_ACEOF
22913/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022914
22915int main()
22916{
22917 int val1 = nice(1);
22918 if (val1 != -1 && val1 == nice(2))
22919 exit(0);
22920 exit(1);
22921}
22922
Martin v. Löwis11437992002-04-12 09:54:03 +000022923_ACEOF
22924rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022925if { (ac_try="$ac_link"
22926case "(($ac_try" in
22927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22928 *) ac_try_echo=$ac_try;;
22929esac
22930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22931 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022932 ac_status=$?
22933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22934 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022935 { (case "(($ac_try" in
22936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22937 *) ac_try_echo=$ac_try;;
22938esac
22939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22940 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022941 ac_status=$?
22942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22943 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022944 ac_cv_broken_nice=yes
22945else
Martin v. Löwis11437992002-04-12 09:54:03 +000022946 echo "$as_me: program exited with status $ac_status" >&5
22947echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022948sed 's/^/| /' conftest.$ac_ext >&5
22949
Martin v. Löwis11437992002-04-12 09:54:03 +000022950( exit $ac_status )
22951ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022953rm -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 +000022954fi
22955
Martin v. Löwiseba40652007-08-30 20:10:57 +000022956
22957fi
22958
22959{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22960echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022961if test "$ac_cv_broken_nice" = yes
22962then
Martin v. Löwis11437992002-04-12 09:54:03 +000022963
22964cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022965#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022966_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022967
22968fi
22969
Martin v. Löwiseba40652007-08-30 20:10:57 +000022970{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22971echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022972if test "$cross_compiling" = yes; then
22973 ac_cv_broken_poll=no
22974else
22975 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022976/* confdefs.h. */
22977_ACEOF
22978cat confdefs.h >>conftest.$ac_ext
22979cat >>conftest.$ac_ext <<_ACEOF
22980/* end confdefs.h. */
22981
22982#include <poll.h>
22983
22984int main (void)
22985 {
22986 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22987
22988 close (42);
22989
22990 int poll_test = poll (&poll_struct, 1, 0);
22991
22992 if (poll_test < 0)
22993 {
22994 exit(0);
22995 }
22996 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22997 {
22998 exit(0);
22999 }
23000 else
23001 {
23002 exit(1);
23003 }
23004 }
23005
23006_ACEOF
23007rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023008if { (ac_try="$ac_link"
23009case "(($ac_try" in
23010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23011 *) ac_try_echo=$ac_try;;
23012esac
23013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23014 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023015 ac_status=$?
23016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23017 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023018 { (case "(($ac_try" in
23019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23020 *) ac_try_echo=$ac_try;;
23021esac
23022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23023 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023024 ac_status=$?
23025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23026 (exit $ac_status); }; }; then
23027 ac_cv_broken_poll=yes
23028else
23029 echo "$as_me: program exited with status $ac_status" >&5
23030echo "$as_me: failed program was:" >&5
23031sed 's/^/| /' conftest.$ac_ext >&5
23032
23033( exit $ac_status )
23034ac_cv_broken_poll=no
23035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023036rm -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 +000023037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023038
23039
23040{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23041echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023042if test "$ac_cv_broken_poll" = yes
23043then
23044
23045cat >>confdefs.h <<\_ACEOF
23046#define HAVE_BROKEN_POLL 1
23047_ACEOF
23048
23049fi
23050
Brett Cannon43802422005-02-10 20:48:03 +000023051# 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 +000023052# (which is not required by ISO C or UNIX spec) and/or if we support
23053# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023054{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23055echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023056if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23057 echo $ECHO_N "(cached) $ECHO_C" >&6
23058else
23059 cat >conftest.$ac_ext <<_ACEOF
23060/* confdefs.h. */
23061_ACEOF
23062cat confdefs.h >>conftest.$ac_ext
23063cat >>conftest.$ac_ext <<_ACEOF
23064/* end confdefs.h. */
23065#include <sys/types.h>
23066#include <$ac_cv_struct_tm>
23067
23068
23069int
23070main ()
23071{
23072static struct tm ac_aggr;
23073if (ac_aggr.tm_zone)
23074return 0;
23075 ;
23076 return 0;
23077}
23078_ACEOF
23079rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023080if { (ac_try="$ac_compile"
23081case "(($ac_try" in
23082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23083 *) ac_try_echo=$ac_try;;
23084esac
23085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23086 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023087 ac_status=$?
23088 grep -v '^ *+' conftest.er1 >conftest.err
23089 rm -f conftest.er1
23090 cat conftest.err >&5
23091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023092 (exit $ac_status); } && {
23093 test -z "$ac_c_werror_flag" ||
23094 test ! -s conftest.err
23095 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023096 ac_cv_member_struct_tm_tm_zone=yes
23097else
23098 echo "$as_me: failed program was:" >&5
23099sed 's/^/| /' conftest.$ac_ext >&5
23100
Martin v. Löwiseba40652007-08-30 20:10:57 +000023101 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023102/* confdefs.h. */
23103_ACEOF
23104cat confdefs.h >>conftest.$ac_ext
23105cat >>conftest.$ac_ext <<_ACEOF
23106/* end confdefs.h. */
23107#include <sys/types.h>
23108#include <$ac_cv_struct_tm>
23109
23110
23111int
23112main ()
23113{
23114static struct tm ac_aggr;
23115if (sizeof ac_aggr.tm_zone)
23116return 0;
23117 ;
23118 return 0;
23119}
23120_ACEOF
23121rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023122if { (ac_try="$ac_compile"
23123case "(($ac_try" in
23124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23125 *) ac_try_echo=$ac_try;;
23126esac
23127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23128 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023129 ac_status=$?
23130 grep -v '^ *+' conftest.er1 >conftest.err
23131 rm -f conftest.er1
23132 cat conftest.err >&5
23133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023134 (exit $ac_status); } && {
23135 test -z "$ac_c_werror_flag" ||
23136 test ! -s conftest.err
23137 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023138 ac_cv_member_struct_tm_tm_zone=yes
23139else
23140 echo "$as_me: failed program was:" >&5
23141sed 's/^/| /' conftest.$ac_ext >&5
23142
Martin v. Löwiseba40652007-08-30 20:10:57 +000023143 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023145
23146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023148
23149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023151{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23152echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023153if test $ac_cv_member_struct_tm_tm_zone = yes; then
23154
23155cat >>confdefs.h <<_ACEOF
23156#define HAVE_STRUCT_TM_TM_ZONE 1
23157_ACEOF
23158
23159
23160fi
23161
23162if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23163
23164cat >>confdefs.h <<\_ACEOF
23165#define HAVE_TM_ZONE 1
23166_ACEOF
23167
23168else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023169 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23170echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23171if test "${ac_cv_have_decl_tzname+set}" = set; then
23172 echo $ECHO_N "(cached) $ECHO_C" >&6
23173else
23174 cat >conftest.$ac_ext <<_ACEOF
23175/* confdefs.h. */
23176_ACEOF
23177cat confdefs.h >>conftest.$ac_ext
23178cat >>conftest.$ac_ext <<_ACEOF
23179/* end confdefs.h. */
23180#include <time.h>
23181
23182int
23183main ()
23184{
23185#ifndef tzname
23186 (void) tzname;
23187#endif
23188
23189 ;
23190 return 0;
23191}
23192_ACEOF
23193rm -f conftest.$ac_objext
23194if { (ac_try="$ac_compile"
23195case "(($ac_try" in
23196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23197 *) ac_try_echo=$ac_try;;
23198esac
23199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23200 (eval "$ac_compile") 2>conftest.er1
23201 ac_status=$?
23202 grep -v '^ *+' conftest.er1 >conftest.err
23203 rm -f conftest.er1
23204 cat conftest.err >&5
23205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23206 (exit $ac_status); } && {
23207 test -z "$ac_c_werror_flag" ||
23208 test ! -s conftest.err
23209 } && test -s conftest.$ac_objext; then
23210 ac_cv_have_decl_tzname=yes
23211else
23212 echo "$as_me: failed program was:" >&5
23213sed 's/^/| /' conftest.$ac_ext >&5
23214
23215 ac_cv_have_decl_tzname=no
23216fi
23217
23218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23219fi
23220{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23221echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23222if test $ac_cv_have_decl_tzname = yes; then
23223
23224cat >>confdefs.h <<_ACEOF
23225#define HAVE_DECL_TZNAME 1
23226_ACEOF
23227
23228
23229else
23230 cat >>confdefs.h <<_ACEOF
23231#define HAVE_DECL_TZNAME 0
23232_ACEOF
23233
23234
23235fi
23236
23237
23238 { echo "$as_me:$LINENO: checking for tzname" >&5
23239echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023240if test "${ac_cv_var_tzname+set}" = set; then
23241 echo $ECHO_N "(cached) $ECHO_C" >&6
23242else
23243 cat >conftest.$ac_ext <<_ACEOF
23244/* confdefs.h. */
23245_ACEOF
23246cat confdefs.h >>conftest.$ac_ext
23247cat >>conftest.$ac_ext <<_ACEOF
23248/* end confdefs.h. */
23249#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023250#if !HAVE_DECL_TZNAME
23251extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023252#endif
23253
23254int
23255main ()
23256{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023257return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023258 ;
23259 return 0;
23260}
23261_ACEOF
23262rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023263if { (ac_try="$ac_link"
23264case "(($ac_try" in
23265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23266 *) ac_try_echo=$ac_try;;
23267esac
23268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23269 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023270 ac_status=$?
23271 grep -v '^ *+' conftest.er1 >conftest.err
23272 rm -f conftest.er1
23273 cat conftest.err >&5
23274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023275 (exit $ac_status); } && {
23276 test -z "$ac_c_werror_flag" ||
23277 test ! -s conftest.err
23278 } && test -s conftest$ac_exeext &&
23279 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023280 ac_cv_var_tzname=yes
23281else
23282 echo "$as_me: failed program was:" >&5
23283sed 's/^/| /' conftest.$ac_ext >&5
23284
Martin v. Löwiseba40652007-08-30 20:10:57 +000023285 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023287
23288rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023289 conftest$ac_exeext conftest.$ac_ext
23290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023291{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23292echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023293 if test $ac_cv_var_tzname = yes; then
23294
23295cat >>confdefs.h <<\_ACEOF
23296#define HAVE_TZNAME 1
23297_ACEOF
23298
23299 fi
23300fi
23301
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023302
Martin v. Löwis1d459062005-03-14 21:23:33 +000023303# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023304{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23305echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023306if test "${ac_cv_working_tzset+set}" = set; then
23307 echo $ECHO_N "(cached) $ECHO_C" >&6
23308else
23309
23310if test "$cross_compiling" = yes; then
23311 ac_cv_working_tzset=no
23312else
23313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023314/* confdefs.h. */
23315_ACEOF
23316cat confdefs.h >>conftest.$ac_ext
23317cat >>conftest.$ac_ext <<_ACEOF
23318/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023319
23320#include <stdlib.h>
23321#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023322#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023323
23324#if HAVE_TZNAME
23325extern char *tzname[];
23326#endif
23327
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023328int main()
23329{
Brett Cannon18367812003-09-19 00:59:16 +000023330 /* Note that we need to ensure that not only does tzset(3)
23331 do 'something' with localtime, but it works as documented
23332 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023333 This includes making sure that tzname is set properly if
23334 tm->tm_zone does not exist since it is the alternative way
23335 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023336
23337 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023338 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023339 */
23340
Martin v. Löwis1d459062005-03-14 21:23:33 +000023341 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023342 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23343
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023344 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023345 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023346 if (localtime(&groundhogday)->tm_hour != 0)
23347 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023348#if HAVE_TZNAME
23349 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23350 if (strcmp(tzname[0], "UTC") ||
23351 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23352 exit(1);
23353#endif
Brett Cannon18367812003-09-19 00:59:16 +000023354
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023355 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023356 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023357 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023358 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023359#if HAVE_TZNAME
23360 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23361 exit(1);
23362#endif
Brett Cannon18367812003-09-19 00:59:16 +000023363
23364 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23365 tzset();
23366 if (localtime(&groundhogday)->tm_hour != 11)
23367 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023368#if HAVE_TZNAME
23369 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23370 exit(1);
23371#endif
23372
23373#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023374 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23375 exit(1);
23376 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23377 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023378#endif
Brett Cannon18367812003-09-19 00:59:16 +000023379
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023380 exit(0);
23381}
23382
23383_ACEOF
23384rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023385if { (ac_try="$ac_link"
23386case "(($ac_try" in
23387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23388 *) ac_try_echo=$ac_try;;
23389esac
23390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23391 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023392 ac_status=$?
23393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23394 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023395 { (case "(($ac_try" in
23396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23397 *) ac_try_echo=$ac_try;;
23398esac
23399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23400 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023401 ac_status=$?
23402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23403 (exit $ac_status); }; }; then
23404 ac_cv_working_tzset=yes
23405else
23406 echo "$as_me: program exited with status $ac_status" >&5
23407echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023408sed 's/^/| /' conftest.$ac_ext >&5
23409
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023410( exit $ac_status )
23411ac_cv_working_tzset=no
23412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023413rm -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 +000023414fi
23415
Martin v. Löwiseba40652007-08-30 20:10:57 +000023416
23417fi
23418
23419{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23420echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023421if test "$ac_cv_working_tzset" = yes
23422then
23423
23424cat >>confdefs.h <<\_ACEOF
23425#define HAVE_WORKING_TZSET 1
23426_ACEOF
23427
23428fi
23429
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023430# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023431{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23432echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023433if test "${ac_cv_stat_tv_nsec+set}" = set; then
23434 echo $ECHO_N "(cached) $ECHO_C" >&6
23435else
23436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023437/* confdefs.h. */
23438_ACEOF
23439cat confdefs.h >>conftest.$ac_ext
23440cat >>conftest.$ac_ext <<_ACEOF
23441/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023442#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023443int
23444main ()
23445{
23446
23447struct stat st;
23448st.st_mtim.tv_nsec = 1;
23449
23450 ;
23451 return 0;
23452}
23453_ACEOF
23454rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023455if { (ac_try="$ac_compile"
23456case "(($ac_try" in
23457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23458 *) ac_try_echo=$ac_try;;
23459esac
23460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023463 grep -v '^ *+' conftest.er1 >conftest.err
23464 rm -f conftest.er1
23465 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023467 (exit $ac_status); } && {
23468 test -z "$ac_c_werror_flag" ||
23469 test ! -s conftest.err
23470 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023471 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023472else
23473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023474sed 's/^/| /' conftest.$ac_ext >&5
23475
Martin v. Löwiseba40652007-08-30 20:10:57 +000023476 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023477fi
23478
Martin v. Löwiseba40652007-08-30 20:10:57 +000023479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23480fi
23481
23482{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23483echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023484if test "$ac_cv_stat_tv_nsec" = yes
23485then
23486
23487cat >>confdefs.h <<\_ACEOF
23488#define HAVE_STAT_TV_NSEC 1
23489_ACEOF
23490
23491fi
23492
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023493# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023494{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23495echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023496if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23497 echo $ECHO_N "(cached) $ECHO_C" >&6
23498else
23499 cat >conftest.$ac_ext <<_ACEOF
23500/* confdefs.h. */
23501_ACEOF
23502cat confdefs.h >>conftest.$ac_ext
23503cat >>conftest.$ac_ext <<_ACEOF
23504/* end confdefs.h. */
23505#include <sys/stat.h>
23506int
23507main ()
23508{
23509
23510struct stat st;
23511st.st_mtimespec.tv_nsec = 1;
23512
23513 ;
23514 return 0;
23515}
23516_ACEOF
23517rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023518if { (ac_try="$ac_compile"
23519case "(($ac_try" in
23520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23521 *) ac_try_echo=$ac_try;;
23522esac
23523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023525 ac_status=$?
23526 grep -v '^ *+' conftest.er1 >conftest.err
23527 rm -f conftest.er1
23528 cat conftest.err >&5
23529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023530 (exit $ac_status); } && {
23531 test -z "$ac_c_werror_flag" ||
23532 test ! -s conftest.err
23533 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023534 ac_cv_stat_tv_nsec2=yes
23535else
23536 echo "$as_me: failed program was:" >&5
23537sed 's/^/| /' conftest.$ac_ext >&5
23538
Martin v. Löwiseba40652007-08-30 20:10:57 +000023539 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023540fi
23541
Martin v. Löwiseba40652007-08-30 20:10:57 +000023542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23543fi
23544
23545{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23546echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023547if test "$ac_cv_stat_tv_nsec2" = yes
23548then
23549
23550cat >>confdefs.h <<\_ACEOF
23551#define HAVE_STAT_TV_NSEC2 1
23552_ACEOF
23553
23554fi
23555
Jack Jansen666b1e72001-10-31 12:11:48 +000023556# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023557{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23558echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023559if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23560 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023561else
Martin v. Löwis11437992002-04-12 09:54:03 +000023562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023563/* confdefs.h. */
23564_ACEOF
23565cat confdefs.h >>conftest.$ac_ext
23566cat >>conftest.$ac_ext <<_ACEOF
23567/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023568#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023569int
23570main ()
23571{
Jack Jansen666b1e72001-10-31 12:11:48 +000023572
23573 int rtn;
23574 rtn = mvwdelch(0,0,0);
23575
Martin v. Löwis11437992002-04-12 09:54:03 +000023576 ;
23577 return 0;
23578}
23579_ACEOF
23580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023581if { (ac_try="$ac_compile"
23582case "(($ac_try" in
23583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23584 *) ac_try_echo=$ac_try;;
23585esac
23586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023589 grep -v '^ *+' conftest.er1 >conftest.err
23590 rm -f conftest.er1
23591 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023593 (exit $ac_status); } && {
23594 test -z "$ac_c_werror_flag" ||
23595 test ! -s conftest.err
23596 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023597 ac_cv_mvwdelch_is_expression=yes
23598else
Martin v. Löwis11437992002-04-12 09:54:03 +000023599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023600sed 's/^/| /' conftest.$ac_ext >&5
23601
Martin v. Löwiseba40652007-08-30 20:10:57 +000023602 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023603fi
23604
Martin v. Löwiseba40652007-08-30 20:10:57 +000023605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23606fi
23607
23608{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23609echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023610
23611if test "$ac_cv_mvwdelch_is_expression" = yes
23612then
Martin v. Löwis11437992002-04-12 09:54:03 +000023613
23614cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023615#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023616_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023617
23618fi
23619
Martin v. Löwiseba40652007-08-30 20:10:57 +000023620{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23621echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023622if test "${ac_cv_window_has_flags+set}" = set; then
23623 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023624else
Martin v. Löwis11437992002-04-12 09:54:03 +000023625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023626/* confdefs.h. */
23627_ACEOF
23628cat confdefs.h >>conftest.$ac_ext
23629cat >>conftest.$ac_ext <<_ACEOF
23630/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023631#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023632int
23633main ()
23634{
Jack Jansen666b1e72001-10-31 12:11:48 +000023635
23636 WINDOW *w;
23637 w->_flags = 0;
23638
Martin v. Löwis11437992002-04-12 09:54:03 +000023639 ;
23640 return 0;
23641}
23642_ACEOF
23643rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023644if { (ac_try="$ac_compile"
23645case "(($ac_try" in
23646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23647 *) ac_try_echo=$ac_try;;
23648esac
23649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23650 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023652 grep -v '^ *+' conftest.er1 >conftest.err
23653 rm -f conftest.er1
23654 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023656 (exit $ac_status); } && {
23657 test -z "$ac_c_werror_flag" ||
23658 test ! -s conftest.err
23659 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023660 ac_cv_window_has_flags=yes
23661else
Martin v. Löwis11437992002-04-12 09:54:03 +000023662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023663sed 's/^/| /' conftest.$ac_ext >&5
23664
Martin v. Löwiseba40652007-08-30 20:10:57 +000023665 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023666fi
23667
Martin v. Löwiseba40652007-08-30 20:10:57 +000023668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23669fi
23670
23671{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23672echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023673
Jack Jansen666b1e72001-10-31 12:11:48 +000023674
23675if test "$ac_cv_window_has_flags" = yes
23676then
Martin v. Löwis11437992002-04-12 09:54:03 +000023677
23678cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023679#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023680_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023681
23682fi
23683
Martin v. Löwiseba40652007-08-30 20:10:57 +000023684{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23685echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023686cat >conftest.$ac_ext <<_ACEOF
23687/* confdefs.h. */
23688_ACEOF
23689cat confdefs.h >>conftest.$ac_ext
23690cat >>conftest.$ac_ext <<_ACEOF
23691/* end confdefs.h. */
23692#include <curses.h>
23693int
23694main ()
23695{
23696void *x=is_term_resized
23697 ;
23698 return 0;
23699}
23700_ACEOF
23701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023702if { (ac_try="$ac_compile"
23703case "(($ac_try" in
23704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23705 *) ac_try_echo=$ac_try;;
23706esac
23707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23708 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023709 ac_status=$?
23710 grep -v '^ *+' conftest.er1 >conftest.err
23711 rm -f conftest.er1
23712 cat conftest.err >&5
23713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023714 (exit $ac_status); } && {
23715 test -z "$ac_c_werror_flag" ||
23716 test ! -s conftest.err
23717 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023718
23719cat >>confdefs.h <<\_ACEOF
23720#define HAVE_CURSES_IS_TERM_RESIZED 1
23721_ACEOF
23722
Martin v. Löwiseba40652007-08-30 20:10:57 +000023723 { echo "$as_me:$LINENO: result: yes" >&5
23724echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023725else
23726 echo "$as_me: failed program was:" >&5
23727sed 's/^/| /' conftest.$ac_ext >&5
23728
Martin v. Löwiseba40652007-08-30 20:10:57 +000023729 { echo "$as_me:$LINENO: result: no" >&5
23730echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023731
23732fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023733
Martin v. Löwiseba40652007-08-30 20:10:57 +000023734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23735
23736{ echo "$as_me:$LINENO: checking for resize_term" >&5
23737echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023738cat >conftest.$ac_ext <<_ACEOF
23739/* confdefs.h. */
23740_ACEOF
23741cat confdefs.h >>conftest.$ac_ext
23742cat >>conftest.$ac_ext <<_ACEOF
23743/* end confdefs.h. */
23744#include <curses.h>
23745int
23746main ()
23747{
23748void *x=resize_term
23749 ;
23750 return 0;
23751}
23752_ACEOF
23753rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023754if { (ac_try="$ac_compile"
23755case "(($ac_try" in
23756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23757 *) ac_try_echo=$ac_try;;
23758esac
23759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23760 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023761 ac_status=$?
23762 grep -v '^ *+' conftest.er1 >conftest.err
23763 rm -f conftest.er1
23764 cat conftest.err >&5
23765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023766 (exit $ac_status); } && {
23767 test -z "$ac_c_werror_flag" ||
23768 test ! -s conftest.err
23769 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023770
23771cat >>confdefs.h <<\_ACEOF
23772#define HAVE_CURSES_RESIZE_TERM 1
23773_ACEOF
23774
Martin v. Löwiseba40652007-08-30 20:10:57 +000023775 { echo "$as_me:$LINENO: result: yes" >&5
23776echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023777else
23778 echo "$as_me: failed program was:" >&5
23779sed 's/^/| /' conftest.$ac_ext >&5
23780
Martin v. Löwiseba40652007-08-30 20:10:57 +000023781 { echo "$as_me:$LINENO: result: no" >&5
23782echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023783
23784fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023785
Martin v. Löwiseba40652007-08-30 20:10:57 +000023786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23787
23788{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23789echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023790cat >conftest.$ac_ext <<_ACEOF
23791/* confdefs.h. */
23792_ACEOF
23793cat confdefs.h >>conftest.$ac_ext
23794cat >>conftest.$ac_ext <<_ACEOF
23795/* end confdefs.h. */
23796#include <curses.h>
23797int
23798main ()
23799{
23800void *x=resizeterm
23801 ;
23802 return 0;
23803}
23804_ACEOF
23805rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023806if { (ac_try="$ac_compile"
23807case "(($ac_try" in
23808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23809 *) ac_try_echo=$ac_try;;
23810esac
23811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23812 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023813 ac_status=$?
23814 grep -v '^ *+' conftest.er1 >conftest.err
23815 rm -f conftest.er1
23816 cat conftest.err >&5
23817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023818 (exit $ac_status); } && {
23819 test -z "$ac_c_werror_flag" ||
23820 test ! -s conftest.err
23821 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023822
23823cat >>confdefs.h <<\_ACEOF
23824#define HAVE_CURSES_RESIZETERM 1
23825_ACEOF
23826
Martin v. Löwiseba40652007-08-30 20:10:57 +000023827 { echo "$as_me:$LINENO: result: yes" >&5
23828echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023829else
23830 echo "$as_me: failed program was:" >&5
23831sed 's/^/| /' conftest.$ac_ext >&5
23832
Martin v. Löwiseba40652007-08-30 20:10:57 +000023833 { echo "$as_me:$LINENO: result: no" >&5
23834echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023835
23836fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023837
Martin v. Löwiseba40652007-08-30 20:10:57 +000023838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23839
23840{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23841echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023842
23843if test -r /dev/ptmx
23844then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023845 { echo "$as_me:$LINENO: result: yes" >&5
23846echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023847
23848cat >>confdefs.h <<\_ACEOF
23849#define HAVE_DEV_PTMX 1
23850_ACEOF
23851
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023852else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023853 { echo "$as_me:$LINENO: result: no" >&5
23854echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023855fi
23856
Martin v. Löwiseba40652007-08-30 20:10:57 +000023857{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23858echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023859
23860if test -r /dev/ptc
23861then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023862 { echo "$as_me:$LINENO: result: yes" >&5
23863echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023864
23865cat >>confdefs.h <<\_ACEOF
23866#define HAVE_DEV_PTC 1
23867_ACEOF
23868
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023869else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023870 { echo "$as_me:$LINENO: result: no" >&5
23871echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023872fi
23873
Martin v. Löwiseba40652007-08-30 20:10:57 +000023874{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23875echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023876if test "$cross_compiling" = yes; then
23877 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23878See \`config.log' for more details." >&5
23879echo "$as_me: error: cannot run test program while cross compiling
23880See \`config.log' for more details." >&2;}
23881 { (exit 1); exit 1; }; }
23882else
23883 cat >conftest.$ac_ext <<_ACEOF
23884/* confdefs.h. */
23885_ACEOF
23886cat confdefs.h >>conftest.$ac_ext
23887cat >>conftest.$ac_ext <<_ACEOF
23888/* end confdefs.h. */
23889#include <stdio.h>
23890#include <stddef.h>
23891#include <string.h>
23892
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023893#ifdef HAVE_SYS_TYPES_H
23894#include <sys/types.h>
23895#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023896
23897#ifdef HAVE_SSIZE_T
23898typedef ssize_t Py_ssize_t;
23899#elif SIZEOF_VOID_P == SIZEOF_LONG
23900typedef long Py_ssize_t;
23901#else
23902typedef int Py_ssize_t;
23903#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023904
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023905int main()
23906{
23907 char buffer[256];
23908
Brett Cannon09d12362006-05-11 05:11:33 +000023909 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23910 return 1;
23911
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023912 if (strcmp(buffer, "123"))
23913 return 1;
23914
23915 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23916 return 1;
23917
23918 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023919 return 1;
23920
23921 return 0;
23922}
23923_ACEOF
23924rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023925if { (ac_try="$ac_link"
23926case "(($ac_try" in
23927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23928 *) ac_try_echo=$ac_try;;
23929esac
23930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23931 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023932 ac_status=$?
23933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23934 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023935 { (case "(($ac_try" in
23936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23937 *) ac_try_echo=$ac_try;;
23938esac
23939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23940 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023941 ac_status=$?
23942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23943 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023944 { echo "$as_me:$LINENO: result: yes" >&5
23945echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023946
23947cat >>confdefs.h <<\_ACEOF
23948#define PY_FORMAT_SIZE_T "z"
23949_ACEOF
23950
23951else
23952 echo "$as_me: program exited with status $ac_status" >&5
23953echo "$as_me: failed program was:" >&5
23954sed 's/^/| /' conftest.$ac_ext >&5
23955
23956( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023957{ echo "$as_me:$LINENO: result: no" >&5
23958echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023960rm -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 +000023961fi
23962
Martin v. Löwiseba40652007-08-30 20:10:57 +000023963
23964
23965{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23966echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023967if test "${ac_cv_type_socklen_t+set}" = set; then
23968 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023969else
Martin v. Löwis11437992002-04-12 09:54:03 +000023970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023971/* confdefs.h. */
23972_ACEOF
23973cat confdefs.h >>conftest.$ac_ext
23974cat >>conftest.$ac_ext <<_ACEOF
23975/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023976
23977#ifdef HAVE_SYS_TYPES_H
23978#include <sys/types.h>
23979#endif
23980#ifdef HAVE_SYS_SOCKET_H
23981#include <sys/socket.h>
23982#endif
23983
23984
Martin v. Löwiseba40652007-08-30 20:10:57 +000023985typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023986int
23987main ()
23988{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023989if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023990 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023991if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023992 return 0;
23993 ;
23994 return 0;
23995}
23996_ACEOF
23997rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023998if { (ac_try="$ac_compile"
23999case "(($ac_try" in
24000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24001 *) ac_try_echo=$ac_try;;
24002esac
24003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024006 grep -v '^ *+' conftest.er1 >conftest.err
24007 rm -f conftest.er1
24008 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024010 (exit $ac_status); } && {
24011 test -z "$ac_c_werror_flag" ||
24012 test ! -s conftest.err
24013 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024014 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024015else
Martin v. Löwis11437992002-04-12 09:54:03 +000024016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024017sed 's/^/| /' conftest.$ac_ext >&5
24018
Martin v. Löwiseba40652007-08-30 20:10:57 +000024019 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024021
24022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024024{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24025echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024026if test $ac_cv_type_socklen_t = yes; then
24027 :
24028else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024029
Martin v. Löwis01c04012002-11-11 14:58:44 +000024030cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024031#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024032_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024033
24034fi
24035
Michael W. Hudson54241132001-12-07 15:38:26 +000024036
Michael W. Hudson54241132001-12-07 15:38:26 +000024037
24038
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024039for h in `(cd $srcdir;echo Python/thread_*.h)`
24040do
24041 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24042done
24043
Michael W. Hudson54241132001-12-07 15:38:26 +000024044
Neal Norwitzd24499d2005-12-18 21:36:39 +000024045SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024046{ echo "$as_me:$LINENO: checking for build directories" >&5
24047echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024048for dir in $SRCDIRS; do
24049 if test ! -d $dir; then
24050 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024051 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024052done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024053{ echo "$as_me:$LINENO: result: done" >&5
24054echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024055
Guido van Rossum627b2d71993-12-24 10:39:16 +000024056# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024057ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024058
Martin v. Löwis11437992002-04-12 09:54:03 +000024059cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024060# This file is a shell script that caches the results of configure
24061# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024062# scripts and configure runs, see configure's option --config-cache.
24063# It is not useful on other systems. If it contains results you don't
24064# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024065#
Martin v. Löwis11437992002-04-12 09:54:03 +000024066# config.status only pays attention to the cache file if you give it
24067# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024068#
Skip Montanaro6dead952003-09-25 14:50:04 +000024069# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024070# loading this file, other *unset* `ac_cv_foo' will be assigned the
24071# following values.
24072
24073_ACEOF
24074
Guido van Rossumf78abae1997-01-21 22:02:36 +000024075# The following way of writing the cache mishandles newlines in values,
24076# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024077# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024078# Ultrix sh set writes to stderr and can't be redirected directly,
24079# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024080(
24081 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24082 eval ac_val=\$$ac_var
24083 case $ac_val in #(
24084 *${as_nl}*)
24085 case $ac_var in #(
24086 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24087echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24088 esac
24089 case $ac_var in #(
24090 _ | IFS | as_nl) ;; #(
24091 *) $as_unset $ac_var ;;
24092 esac ;;
24093 esac
24094 done
24095
Martin v. Löwis11437992002-04-12 09:54:03 +000024096 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024097 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24098 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024099 # `set' does not quote correctly, so add quotes (double-quote
24100 # substitution turns \\\\ into \\, and sed turns \\ into \).
24101 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024102 "s/'/'\\\\''/g;
24103 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024104 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024105 *)
24106 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024107 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024108 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024109 esac |
24110 sort
24111) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024112 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024113 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024114 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024115 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024116 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24117 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024118 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24119 :end' >>confcache
24120if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24121 if test -w "$cache_file"; then
24122 test "x$cache_file" != "x/dev/null" &&
24123 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24124echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024125 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024126 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024127 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24128echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024129 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024130fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024131rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024132
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024133test "x$prefix" = xNONE && prefix=$ac_default_prefix
24134# Let make expand exec_prefix.
24135test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024136
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024137DEFS=-DHAVE_CONFIG_H
24138
Skip Montanaro6dead952003-09-25 14:50:04 +000024139ac_libobjs=
24140ac_ltlibobjs=
24141for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24142 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024143 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24144 ac_i=`echo "$ac_i" | sed "$ac_script"`
24145 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24146 # will be set to the directory where LIBOBJS objects are built.
24147 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24148 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024149done
24150LIBOBJS=$ac_libobjs
24151
24152LTLIBOBJS=$ac_ltlibobjs
24153
24154
Martin v. Löwis11437992002-04-12 09:54:03 +000024155
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024156: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024157ac_clean_files_save=$ac_clean_files
24158ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24159{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24160echo "$as_me: creating $CONFIG_STATUS" >&6;}
24161cat >$CONFIG_STATUS <<_ACEOF
24162#! $SHELL
24163# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024164# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024165# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024166# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024167
Martin v. Löwis11437992002-04-12 09:54:03 +000024168debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024169ac_cs_recheck=false
24170ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024171SHELL=\${CONFIG_SHELL-$SHELL}
24172_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024173
Martin v. Löwis11437992002-04-12 09:54:03 +000024174cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024175## --------------------- ##
24176## M4sh Initialization. ##
24177## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024178
Martin v. Löwiseba40652007-08-30 20:10:57 +000024179# Be more Bourne compatible
24180DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024181if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24182 emulate sh
24183 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024184 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24185 # is contrary to our usage. Disable this feature.
24186 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024187 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024188else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024189 case `(set -o) 2>/dev/null` in
24190 *posix*) set -o posix ;;
24191esac
24192
Martin v. Löwis11437992002-04-12 09:54:03 +000024193fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024194
Skip Montanaro6dead952003-09-25 14:50:04 +000024195
Martin v. Löwis11437992002-04-12 09:54:03 +000024196
24197
Martin v. Löwiseba40652007-08-30 20:10:57 +000024198# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024199# Avoid depending upon Character Ranges.
24200as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24201as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24202as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24203as_cr_digits='0123456789'
24204as_cr_alnum=$as_cr_Letters$as_cr_digits
24205
24206# The user is always right.
24207if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024208 echo "#! /bin/sh" >conf$$.sh
24209 echo "exit 0" >>conf$$.sh
24210 chmod +x conf$$.sh
24211 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024212 PATH_SEPARATOR=';'
24213 else
24214 PATH_SEPARATOR=:
24215 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024216 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024217fi
24218
Martin v. Löwiseba40652007-08-30 20:10:57 +000024219# Support unset when possible.
24220if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24221 as_unset=unset
24222else
24223 as_unset=false
24224fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024225
Martin v. Löwiseba40652007-08-30 20:10:57 +000024226
24227# IFS
24228# We need space, tab and new line, in precisely that order. Quoting is
24229# there to prevent editors from complaining about space-tab.
24230# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24231# splitting by setting IFS to empty value.)
24232as_nl='
24233'
24234IFS=" "" $as_nl"
24235
24236# Find who we are. Look in the path if we contain no directory separator.
24237case $0 in
24238 *[\\/]* ) as_myself=$0 ;;
24239 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024240for as_dir in $PATH
24241do
24242 IFS=$as_save_IFS
24243 test -z "$as_dir" && as_dir=.
24244 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24245done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024246IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024247
Martin v. Löwiseba40652007-08-30 20:10:57 +000024248 ;;
24249esac
24250# We did not find ourselves, most probably we were run as `sh COMMAND'
24251# in which case we are not to be found in the path.
24252if test "x$as_myself" = x; then
24253 as_myself=$0
24254fi
24255if test ! -f "$as_myself"; then
24256 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24257 { (exit 1); exit 1; }
24258fi
24259
24260# Work around bugs in pre-3.0 UWIN ksh.
24261for as_var in ENV MAIL MAILPATH
24262do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24263done
24264PS1='$ '
24265PS2='> '
24266PS4='+ '
24267
24268# NLS nuisances.
24269for as_var in \
24270 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24271 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24272 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024273do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024274 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24275 eval $as_var=C; export $as_var
24276 else
24277 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24278 fi
24279done
24280
24281# Required to use basename.
24282if expr a : '\(a\)' >/dev/null 2>&1 &&
24283 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24284 as_expr=expr
24285else
24286 as_expr=false
24287fi
24288
24289if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24290 as_basename=basename
24291else
24292 as_basename=false
24293fi
24294
24295
24296# Name of the executable.
24297as_me=`$as_basename -- "$0" ||
24298$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24299 X"$0" : 'X\(//\)$' \| \
24300 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24301echo X/"$0" |
24302 sed '/^.*\/\([^/][^/]*\)\/*$/{
24303 s//\1/
24304 q
24305 }
24306 /^X\/\(\/\/\)$/{
24307 s//\1/
24308 q
24309 }
24310 /^X\/\(\/\).*/{
24311 s//\1/
24312 q
24313 }
24314 s/.*/./; q'`
24315
24316# CDPATH.
24317$as_unset CDPATH
24318
24319
24320
Martin v. Löwis11437992002-04-12 09:54:03 +000024321 as_lineno_1=$LINENO
24322 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024323 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024324 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024325
Martin v. Löwis11437992002-04-12 09:54:03 +000024326 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24327 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024328 # line-number line after each line using $LINENO; the second 'sed'
24329 # does the real work. The second script uses 'N' to pair each
24330 # line-number line with the line containing $LINENO, and appends
24331 # trailing '-' during substitution so that $LINENO is not a special
24332 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024333 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024334 # scripts with optimization help from Paolo Bonzini. Blame Lee
24335 # E. McMahon (1931-1989) for sed's syntax. :-)
24336 sed -n '
24337 p
24338 /[$]LINENO/=
24339 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024340 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024341 s/[$]LINENO.*/&-/
24342 t lineno
24343 b
24344 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024345 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024346 :loop
24347 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024348 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024349 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024350 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024351 chmod +x "$as_me.lineno" ||
24352 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024353 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024354
Martin v. Löwis11437992002-04-12 09:54:03 +000024355 # Don't try to exec as it changes $[0], causing all sort of problems
24356 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024357 # original and so on. Autoconf is especially sensitive to this).
24358 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024359 # Exit status is that of the last command.
24360 exit
24361}
24362
24363
Martin v. Löwiseba40652007-08-30 20:10:57 +000024364if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24365 as_dirname=dirname
24366else
24367 as_dirname=false
24368fi
24369
24370ECHO_C= ECHO_N= ECHO_T=
24371case `echo -n x` in
24372-n*)
24373 case `echo 'x\c'` in
24374 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24375 *) ECHO_C='\c';;
24376 esac;;
24377*)
24378 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024379esac
24380
Martin v. Löwiseba40652007-08-30 20:10:57 +000024381if expr a : '\(a\)' >/dev/null 2>&1 &&
24382 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024383 as_expr=expr
24384else
24385 as_expr=false
24386fi
24387
24388rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024389if test -d conf$$.dir; then
24390 rm -f conf$$.dir/conf$$.file
24391else
24392 rm -f conf$$.dir
24393 mkdir conf$$.dir
24394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024395echo >conf$$.file
24396if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024397 as_ln_s='ln -s'
24398 # ... but there are two gotchas:
24399 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24400 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24401 # In both cases, we have to default to `cp -p'.
24402 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024403 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024404elif ln conf$$.file conf$$ 2>/dev/null; then
24405 as_ln_s=ln
24406else
24407 as_ln_s='cp -p'
24408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024409rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24410rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024411
Skip Montanaro6dead952003-09-25 14:50:04 +000024412if mkdir -p . 2>/dev/null; then
24413 as_mkdir_p=:
24414else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024415 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024416 as_mkdir_p=false
24417fi
24418
Martin v. Löwiseba40652007-08-30 20:10:57 +000024419if test -x / >/dev/null 2>&1; then
24420 as_test_x='test -x'
24421else
24422 if ls -dL / >/dev/null 2>&1; then
24423 as_ls_L_option=L
24424 else
24425 as_ls_L_option=
24426 fi
24427 as_test_x='
24428 eval sh -c '\''
24429 if test -d "$1"; then
24430 test -d "$1/.";
24431 else
24432 case $1 in
24433 -*)set "./$1";;
24434 esac;
24435 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24436 ???[sx]*):;;*)false;;esac;fi
24437 '\'' sh
24438 '
24439fi
24440as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024441
24442# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024443as_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 +000024444
24445# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024446as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024447
24448
Martin v. Löwis11437992002-04-12 09:54:03 +000024449exec 6>&1
24450
Martin v. Löwiseba40652007-08-30 20:10:57 +000024451# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024452# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024453# values after options handling.
24454ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024455This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024456generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024457
24458 CONFIG_FILES = $CONFIG_FILES
24459 CONFIG_HEADERS = $CONFIG_HEADERS
24460 CONFIG_LINKS = $CONFIG_LINKS
24461 CONFIG_COMMANDS = $CONFIG_COMMANDS
24462 $ $0 $@
24463
Martin v. Löwiseba40652007-08-30 20:10:57 +000024464on `(hostname || uname -n) 2>/dev/null | sed 1q`
24465"
24466
Martin v. Löwis11437992002-04-12 09:54:03 +000024467_ACEOF
24468
Martin v. Löwiseba40652007-08-30 20:10:57 +000024469cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024470# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024471config_files="$ac_config_files"
24472config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024473
Martin v. Löwiseba40652007-08-30 20:10:57 +000024474_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024475
24476cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024477ac_cs_usage="\
24478\`$as_me' instantiates files from templates according to the
24479current configuration.
24480
24481Usage: $0 [OPTIONS] [FILE]...
24482
24483 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024484 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024485 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024486 -d, --debug don't remove temporary files
24487 --recheck update $as_me by reconfiguring in the same conditions
24488 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024489 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024490 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024491 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024492
24493Configuration files:
24494$config_files
24495
24496Configuration headers:
24497$config_headers
24498
24499Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024500
Martin v. Löwiseba40652007-08-30 20:10:57 +000024501_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024502cat >>$CONFIG_STATUS <<_ACEOF
24503ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024504python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024505configured by $0, generated by GNU Autoconf 2.61,
24506 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024507
Martin v. Löwiseba40652007-08-30 20:10:57 +000024508Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024509This config.status script is free software; the Free Software Foundation
24510gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024511
24512ac_pwd='$ac_pwd'
24513srcdir='$srcdir'
24514INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024515_ACEOF
24516
24517cat >>$CONFIG_STATUS <<\_ACEOF
24518# If no file are specified by the user, then we need to provide default
24519# value. By we need to know if files were specified by the user.
24520ac_need_defaults=:
24521while test $# != 0
24522do
24523 case $1 in
24524 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024525 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24526 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024527 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024528 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024529 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024530 ac_option=$1
24531 ac_optarg=$2
24532 ac_shift=shift
24533 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024534 esac
24535
Skip Montanaro6dead952003-09-25 14:50:04 +000024536 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024537 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024538 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24539 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024540 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24541 echo "$ac_cs_version"; exit ;;
24542 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024543 debug=: ;;
24544 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024545 $ac_shift
24546 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024547 ac_need_defaults=false;;
24548 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024549 $ac_shift
24550 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024551 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024552 --he | --h)
24553 # Conflict between --help and --header
24554 { echo "$as_me: error: ambiguous option: $1
24555Try \`$0 --help' for more information." >&2
24556 { (exit 1); exit 1; }; };;
24557 --help | --hel | -h )
24558 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024559 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24560 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24561 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024562
24563 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024564 -*) { echo "$as_me: error: unrecognized option: $1
24565Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024566 { (exit 1); exit 1; }; } ;;
24567
Martin v. Löwiseba40652007-08-30 20:10:57 +000024568 *) ac_config_targets="$ac_config_targets $1"
24569 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024570
24571 esac
24572 shift
24573done
24574
Skip Montanaro6dead952003-09-25 14:50:04 +000024575ac_configure_extra_args=
24576
24577if $ac_cs_silent; then
24578 exec 6>/dev/null
24579 ac_configure_extra_args="$ac_configure_extra_args --silent"
24580fi
24581
24582_ACEOF
24583cat >>$CONFIG_STATUS <<_ACEOF
24584if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024585 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24586 CONFIG_SHELL=$SHELL
24587 export CONFIG_SHELL
24588 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024589fi
24590
Martin v. Löwis11437992002-04-12 09:54:03 +000024591_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024592cat >>$CONFIG_STATUS <<\_ACEOF
24593exec 5>>config.log
24594{
24595 echo
24596 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24597## Running $as_me. ##
24598_ASBOX
24599 echo "$ac_log"
24600} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024601
Martin v. Löwiseba40652007-08-30 20:10:57 +000024602_ACEOF
24603cat >>$CONFIG_STATUS <<_ACEOF
24604_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024605
24606cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024607
24608# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024609for ac_config_target in $ac_config_targets
24610do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024611 case $ac_config_target in
24612 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24613 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24614 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24615 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024616 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
24617 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024618 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24619 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24620
Martin v. Löwis11437992002-04-12 09:54:03 +000024621 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24622echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24623 { (exit 1); exit 1; }; };;
24624 esac
24625done
24626
Martin v. Löwiseba40652007-08-30 20:10:57 +000024627
Martin v. Löwis11437992002-04-12 09:54:03 +000024628# If the user did not use the arguments to specify the items to instantiate,
24629# then the envvar interface is used. Set only those that are not.
24630# We use the long form for the default assignment because of an extremely
24631# bizarre bug on SunOS 4.1.3.
24632if $ac_need_defaults; then
24633 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24634 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24635fi
24636
Skip Montanaro6dead952003-09-25 14:50:04 +000024637# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024638# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024639# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024640# Hook for its removal unless debugging.
24641# Note that there is a small window in which the directory will not be cleaned:
24642# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024643$debug ||
24644{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024645 tmp=
24646 trap 'exit_status=$?
24647 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24648' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024649 trap '{ (exit 1); exit 1; }' 1 2 13 15
24650}
Martin v. Löwis11437992002-04-12 09:54:03 +000024651# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024652
Martin v. Löwis11437992002-04-12 09:54:03 +000024653{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024654 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024655 test -n "$tmp" && test -d "$tmp"
24656} ||
24657{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024658 tmp=./conf$$-$RANDOM
24659 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024660} ||
24661{
Skip Montanaro6dead952003-09-25 14:50:04 +000024662 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024663 { (exit 1); exit 1; }
24664}
24665
Martin v. Löwis11437992002-04-12 09:54:03 +000024666#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024667# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024668#
24669
24670# No need to generate the scripts if there are no CONFIG_FILES.
24671# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024672if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024673
24674_ACEOF
24675
Martin v. Löwiseba40652007-08-30 20:10:57 +000024676
24677
24678ac_delim='%!_!# '
24679for ac_last_try in false false false false false :; do
24680 cat >conf$$subs.sed <<_ACEOF
24681SHELL!$SHELL$ac_delim
24682PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24683PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24684PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24685PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24686PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24687PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24688exec_prefix!$exec_prefix$ac_delim
24689prefix!$prefix$ac_delim
24690program_transform_name!$program_transform_name$ac_delim
24691bindir!$bindir$ac_delim
24692sbindir!$sbindir$ac_delim
24693libexecdir!$libexecdir$ac_delim
24694datarootdir!$datarootdir$ac_delim
24695datadir!$datadir$ac_delim
24696sysconfdir!$sysconfdir$ac_delim
24697sharedstatedir!$sharedstatedir$ac_delim
24698localstatedir!$localstatedir$ac_delim
24699includedir!$includedir$ac_delim
24700oldincludedir!$oldincludedir$ac_delim
24701docdir!$docdir$ac_delim
24702infodir!$infodir$ac_delim
24703htmldir!$htmldir$ac_delim
24704dvidir!$dvidir$ac_delim
24705pdfdir!$pdfdir$ac_delim
24706psdir!$psdir$ac_delim
24707libdir!$libdir$ac_delim
24708localedir!$localedir$ac_delim
24709mandir!$mandir$ac_delim
24710DEFS!$DEFS$ac_delim
24711ECHO_C!$ECHO_C$ac_delim
24712ECHO_N!$ECHO_N$ac_delim
24713ECHO_T!$ECHO_T$ac_delim
24714LIBS!$LIBS$ac_delim
24715build_alias!$build_alias$ac_delim
24716host_alias!$host_alias$ac_delim
24717target_alias!$target_alias$ac_delim
24718VERSION!$VERSION$ac_delim
24719SOVERSION!$SOVERSION$ac_delim
24720CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24721UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24722PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024723PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024724PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24725PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24726PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24727FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24728FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24729FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24730FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24731FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24732MACHDEP!$MACHDEP$ac_delim
24733SGI_ABI!$SGI_ABI$ac_delim
24734EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24735EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24736CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24737EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24738CC!$CC$ac_delim
24739CFLAGS!$CFLAGS$ac_delim
24740LDFLAGS!$LDFLAGS$ac_delim
24741CPPFLAGS!$CPPFLAGS$ac_delim
24742ac_ct_CC!$ac_ct_CC$ac_delim
24743EXEEXT!$EXEEXT$ac_delim
24744OBJEXT!$OBJEXT$ac_delim
24745CXX!$CXX$ac_delim
24746MAINCC!$MAINCC$ac_delim
24747CPP!$CPP$ac_delim
24748GREP!$GREP$ac_delim
24749EGREP!$EGREP$ac_delim
24750BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24751LIBRARY!$LIBRARY$ac_delim
24752LDLIBRARY!$LDLIBRARY$ac_delim
24753DLLLIBRARY!$DLLLIBRARY$ac_delim
24754BLDLIBRARY!$BLDLIBRARY$ac_delim
24755LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24756INSTSONAME!$INSTSONAME$ac_delim
24757RUNSHARED!$RUNSHARED$ac_delim
24758LINKCC!$LINKCC$ac_delim
24759RANLIB!$RANLIB$ac_delim
24760AR!$AR$ac_delim
24761SVNVERSION!$SVNVERSION$ac_delim
24762INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24763INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24764INSTALL_DATA!$INSTALL_DATA$ac_delim
24765LN!$LN$ac_delim
24766OPT!$OPT$ac_delim
24767BASECFLAGS!$BASECFLAGS$ac_delim
24768OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24769LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24770SO!$SO$ac_delim
24771LDSHARED!$LDSHARED$ac_delim
24772BLDSHARED!$BLDSHARED$ac_delim
24773CCSHARED!$CCSHARED$ac_delim
24774LINKFORSHARED!$LINKFORSHARED$ac_delim
24775CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24776SHLIBS!$SHLIBS$ac_delim
24777USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024778_ACEOF
24779
24780 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24781 break
24782 elif $ac_last_try; then
24783 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24784echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24785 { (exit 1); exit 1; }; }
24786 else
24787 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024788 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024789done
24790
24791ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24792if test -n "$ac_eof"; then
24793 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24794 ac_eof=`expr $ac_eof + 1`
24795fi
24796
24797cat >>$CONFIG_STATUS <<_ACEOF
24798cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24799/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24800_ACEOF
24801sed '
24802s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24803s/^/s,@/; s/!/@,|#_!!_#|/
24804:n
24805t n
24806s/'"$ac_delim"'$/,g/; t
24807s/$/\\/; p
24808N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24809' >>$CONFIG_STATUS <conf$$subs.sed
24810rm -f conf$$subs.sed
24811cat >>$CONFIG_STATUS <<_ACEOF
24812CEOF$ac_eof
24813_ACEOF
24814
24815
24816ac_delim='%!_!# '
24817for ac_last_try in false false false false false :; do
24818 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024819SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024820USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24821LDLAST!$LDLAST$ac_delim
24822THREADOBJ!$THREADOBJ$ac_delim
24823DLINCLDIR!$DLINCLDIR$ac_delim
24824DYNLOADFILE!$DYNLOADFILE$ac_delim
24825MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24826TRUE!$TRUE$ac_delim
24827LIBOBJS!$LIBOBJS$ac_delim
24828HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24829HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24830HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24831HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24832HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24833LIBM!$LIBM$ac_delim
24834LIBC!$LIBC$ac_delim
24835UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24836THREADHEADERS!$THREADHEADERS$ac_delim
24837SRCDIRS!$SRCDIRS$ac_delim
24838LTLIBOBJS!$LTLIBOBJS$ac_delim
24839_ACEOF
24840
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024841 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024842 break
24843 elif $ac_last_try; then
24844 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24845echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24846 { (exit 1); exit 1; }; }
24847 else
24848 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24849 fi
24850done
24851
24852ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24853if test -n "$ac_eof"; then
24854 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24855 ac_eof=`expr $ac_eof + 1`
24856fi
24857
24858cat >>$CONFIG_STATUS <<_ACEOF
24859cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24860/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24861_ACEOF
24862sed '
24863s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24864s/^/s,@/; s/!/@,|#_!!_#|/
24865:n
24866t n
24867s/'"$ac_delim"'$/,g/; t
24868s/$/\\/; p
24869N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24870' >>$CONFIG_STATUS <conf$$subs.sed
24871rm -f conf$$subs.sed
24872cat >>$CONFIG_STATUS <<_ACEOF
24873:end
24874s/|#_!!_#|//g
24875CEOF$ac_eof
24876_ACEOF
24877
24878
24879# VPATH may cause trouble with some makes, so we remove $(srcdir),
24880# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24881# trailing colons and then remove the whole line if VPATH becomes empty
24882# (actually we leave an empty line to preserve line numbers).
24883if test "x$srcdir" = x.; then
24884 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24885s/:*\$(srcdir):*/:/
24886s/:*\${srcdir}:*/:/
24887s/:*@srcdir@:*/:/
24888s/^\([^=]*=[ ]*\):*/\1/
24889s/:*$//
24890s/^[^=]*=[ ]*$//
24891}'
24892fi
24893
24894cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024895fi # test -n "$CONFIG_FILES"
24896
Martin v. Löwiseba40652007-08-30 20:10:57 +000024897
24898for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24899do
24900 case $ac_tag in
24901 :[FHLC]) ac_mode=$ac_tag; continue;;
24902 esac
24903 case $ac_mode$ac_tag in
24904 :[FHL]*:*);;
24905 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24906echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24907 { (exit 1); exit 1; }; };;
24908 :[FH]-) ac_tag=-:-;;
24909 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24910 esac
24911 ac_save_IFS=$IFS
24912 IFS=:
24913 set x $ac_tag
24914 IFS=$ac_save_IFS
24915 shift
24916 ac_file=$1
24917 shift
24918
24919 case $ac_mode in
24920 :L) ac_source=$1;;
24921 :[FH])
24922 ac_file_inputs=
24923 for ac_f
24924 do
24925 case $ac_f in
24926 -) ac_f="$tmp/stdin";;
24927 *) # Look for the file first in the build tree, then in the source tree
24928 # (if the path is not absolute). The absolute path cannot be DOS-style,
24929 # because $ac_f cannot contain `:'.
24930 test -f "$ac_f" ||
24931 case $ac_f in
24932 [\\/$]*) false;;
24933 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24934 esac ||
24935 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24936echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24937 { (exit 1); exit 1; }; };;
24938 esac
24939 ac_file_inputs="$ac_file_inputs $ac_f"
24940 done
24941
24942 # Let's still pretend it is `configure' which instantiates (i.e., don't
24943 # use $as_me), people would be surprised to read:
24944 # /* config.h. Generated by config.status. */
24945 configure_input="Generated from "`IFS=:
24946 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24947 if test x"$ac_file" != x-; then
24948 configure_input="$ac_file. $configure_input"
24949 { echo "$as_me:$LINENO: creating $ac_file" >&5
24950echo "$as_me: creating $ac_file" >&6;}
24951 fi
24952
24953 case $ac_tag in
24954 *:-:* | *:-) cat >"$tmp/stdin";;
24955 esac
24956 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024957 esac
24958
Martin v. Löwiseba40652007-08-30 20:10:57 +000024959 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024960$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024961 X"$ac_file" : 'X\(//\)[^/]' \| \
24962 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024963 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024964echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024965 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24966 s//\1/
24967 q
24968 }
24969 /^X\(\/\/\)[^/].*/{
24970 s//\1/
24971 q
24972 }
24973 /^X\(\/\/\)$/{
24974 s//\1/
24975 q
24976 }
24977 /^X\(\/\).*/{
24978 s//\1/
24979 q
24980 }
24981 s/.*/./; q'`
24982 { as_dir="$ac_dir"
24983 case $as_dir in #(
24984 -*) as_dir=./$as_dir;;
24985 esac
24986 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024987 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024988 while :; do
24989 case $as_dir in #(
24990 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24991 *) as_qdir=$as_dir;;
24992 esac
24993 as_dirs="'$as_qdir' $as_dirs"
24994 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024995$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024996 X"$as_dir" : 'X\(//\)[^/]' \| \
24997 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024998 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024999echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025000 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25001 s//\1/
25002 q
25003 }
25004 /^X\(\/\/\)[^/].*/{
25005 s//\1/
25006 q
25007 }
25008 /^X\(\/\/\)$/{
25009 s//\1/
25010 q
25011 }
25012 /^X\(\/\).*/{
25013 s//\1/
25014 q
25015 }
25016 s/.*/./; q'`
25017 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025018 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025019 test -z "$as_dirs" || eval "mkdir $as_dirs"
25020 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25021echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025022 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025023 ac_builddir=.
25024
Martin v. Löwiseba40652007-08-30 20:10:57 +000025025case "$ac_dir" in
25026.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25027*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025028 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025029 # A ".." for each directory in $ac_dir_suffix.
25030 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25031 case $ac_top_builddir_sub in
25032 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25033 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25034 esac ;;
25035esac
25036ac_abs_top_builddir=$ac_pwd
25037ac_abs_builddir=$ac_pwd$ac_dir_suffix
25038# for backward compatibility:
25039ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025040
25041case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025042 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025043 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025044 ac_top_srcdir=$ac_top_builddir_sub
25045 ac_abs_top_srcdir=$ac_pwd ;;
25046 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025047 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025048 ac_top_srcdir=$srcdir
25049 ac_abs_top_srcdir=$srcdir ;;
25050 *) # Relative name.
25051 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25052 ac_top_srcdir=$ac_top_build_prefix$srcdir
25053 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025054esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025055ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025056
Martin v. Löwis11437992002-04-12 09:54:03 +000025057
Martin v. Löwiseba40652007-08-30 20:10:57 +000025058 case $ac_mode in
25059 :F)
25060 #
25061 # CONFIG_FILE
25062 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025063
25064 case $INSTALL in
25065 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025066 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025067 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025068_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025069
25070cat >>$CONFIG_STATUS <<\_ACEOF
25071# If the template does not know about datarootdir, expand it.
25072# FIXME: This hack should be removed a few years after 2.60.
25073ac_datarootdir_hack=; ac_datarootdir_seen=
25074
25075case `sed -n '/datarootdir/ {
25076 p
25077 q
25078}
25079/@datadir@/p
25080/@docdir@/p
25081/@infodir@/p
25082/@localedir@/p
25083/@mandir@/p
25084' $ac_file_inputs` in
25085*datarootdir*) ac_datarootdir_seen=yes;;
25086*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25087 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25088echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25089_ACEOF
25090cat >>$CONFIG_STATUS <<_ACEOF
25091 ac_datarootdir_hack='
25092 s&@datadir@&$datadir&g
25093 s&@docdir@&$docdir&g
25094 s&@infodir@&$infodir&g
25095 s&@localedir@&$localedir&g
25096 s&@mandir@&$mandir&g
25097 s&\\\${datarootdir}&$datarootdir&g' ;;
25098esac
25099_ACEOF
25100
25101# Neutralize VPATH when `$srcdir' = `.'.
25102# Shell code in configure.ac might set extrasub.
25103# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025104cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025105 sed "$ac_vpsub
25106$extrasub
25107_ACEOF
25108cat >>$CONFIG_STATUS <<\_ACEOF
25109:t
25110/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025111s&@configure_input@&$configure_input&;t t
25112s&@top_builddir@&$ac_top_builddir_sub&;t t
25113s&@srcdir@&$ac_srcdir&;t t
25114s&@abs_srcdir@&$ac_abs_srcdir&;t t
25115s&@top_srcdir@&$ac_top_srcdir&;t t
25116s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25117s&@builddir@&$ac_builddir&;t t
25118s&@abs_builddir@&$ac_abs_builddir&;t t
25119s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25120s&@INSTALL@&$ac_INSTALL&;t t
25121$ac_datarootdir_hack
25122" $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 +000025123
Martin v. Löwiseba40652007-08-30 20:10:57 +000025124test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25125 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25126 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25127 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25128which seems to be undefined. Please make sure it is defined." >&5
25129echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25130which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025131
Martin v. Löwiseba40652007-08-30 20:10:57 +000025132 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025133 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025134 -) cat "$tmp/out"; rm -f "$tmp/out";;
25135 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025136 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025137 ;;
25138 :H)
25139 #
25140 # CONFIG_HEADER
25141 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025142_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025143
Martin v. Löwiseba40652007-08-30 20:10:57 +000025144# Transform confdefs.h into a sed script `conftest.defines', that
25145# substitutes the proper values into config.h.in to produce config.h.
25146rm -f conftest.defines conftest.tail
25147# First, append a space to every undef/define line, to ease matching.
25148echo 's/$/ /' >conftest.defines
25149# Then, protect against being on the right side of a sed subst, or in
25150# an unquoted here document, in config.status. If some macros were
25151# called several times there might be several #defines for the same
25152# symbol, which is useless. But do not sort them, since the last
25153# AC_DEFINE must be honored.
25154ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25155# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25156# NAME is the cpp macro being defined, VALUE is the value it is being given.
25157# PARAMS is the parameter list in the macro definition--in most cases, it's
25158# just an empty string.
25159ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25160ac_dB='\\)[ (].*,\\1define\\2'
25161ac_dC=' '
25162ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025163
Martin v. Löwiseba40652007-08-30 20:10:57 +000025164uniq confdefs.h |
25165 sed -n '
25166 t rset
25167 :rset
25168 s/^[ ]*#[ ]*define[ ][ ]*//
25169 t ok
25170 d
25171 :ok
25172 s/[\\&,]/\\&/g
25173 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25174 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25175 ' >>conftest.defines
25176
25177# Remove the space that was appended to ease matching.
25178# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025179# example, in the case of _POSIX_SOURCE, which is predefined and required
25180# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025181# (The regexp can be short, since the line contains either #define or #undef.)
25182echo 's/ $//
25183s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025184
Martin v. Löwiseba40652007-08-30 20:10:57 +000025185# Break up conftest.defines:
25186ac_max_sed_lines=50
25187
25188# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25189# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25190# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25191# et cetera.
25192ac_in='$ac_file_inputs'
25193ac_out='"$tmp/out1"'
25194ac_nxt='"$tmp/out2"'
25195
25196while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025197do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025198 # Write a here document:
25199 cat >>$CONFIG_STATUS <<_ACEOF
25200 # First, check the format of the line:
25201 cat >"\$tmp/defines.sed" <<\\CEOF
25202/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25203/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25204b
25205:def
25206_ACEOF
25207 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025208 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025209 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25210 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25211 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25212 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025213 rm -f conftest.defines
25214 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025215done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025216rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025217
Martin v. Löwiseba40652007-08-30 20:10:57 +000025218echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025219cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025220 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025221 echo "/* $configure_input */" >"$tmp/config.h"
25222 cat "$ac_result" >>"$tmp/config.h"
25223 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025224 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25225echo "$as_me: $ac_file is unchanged" >&6;}
25226 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025227 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025228 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025229 fi
25230 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025231 echo "/* $configure_input */"
25232 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025233 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025234 rm -f "$tmp/out12"
25235 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025236
Martin v. Löwiseba40652007-08-30 20:10:57 +000025237
25238 esac
25239
25240done # for ac_tag
25241
Guido van Rossum627b2d71993-12-24 10:39:16 +000025242
Martin v. Löwis11437992002-04-12 09:54:03 +000025243{ (exit 0); exit 0; }
25244_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025245chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025246ac_clean_files=$ac_clean_files_save
25247
25248
25249# configure is writing to config.log, and then calls config.status.
25250# config.status does its own redirection, appending to config.log.
25251# Unfortunately, on DOS this fails, as config.log is still kept open
25252# by configure, so config.status won't be able to write to it; its
25253# output is simply discarded. So we exec the FD to /dev/null,
25254# effectively closing config.log, so it can be properly (re)opened and
25255# appended to by config.status. When coming back to configure, we
25256# need to make the FD available again.
25257if test "$no_create" != yes; then
25258 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025259 ac_config_status_args=
25260 test "$silent" = yes &&
25261 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025262 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025263 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025264 exec 5>>config.log
25265 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25266 # would make configure fail if this is the last instruction.
25267 $ac_cs_success || { (exit 1); exit 1; }
25268fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025269
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025270
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025271echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025272if test ! -f Modules/Setup
25273then
25274 cp $srcdir/Modules/Setup.dist Modules/Setup
25275fi
25276
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025277echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025278if test ! -f Modules/Setup.local
25279then
25280 echo "# Edit this file for local setup changes" >Modules/Setup.local
25281fi
25282
25283echo "creating Makefile"
25284$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25285 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025286 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025287
25288case $ac_sys_system in
25289BeOS)
25290 { echo "$as_me:$LINENO: WARNING:
25291
25292 Support for BeOS is deprecated as of Python 2.6.
25293 See PEP 11 for the gory details.
25294 " >&5
25295echo "$as_me: WARNING:
25296
25297 Support for BeOS is deprecated as of Python 2.6.
25298 See PEP 11 for the gory details.
25299 " >&2;}
25300 ;;
25301*) ;;
25302esac
25303
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025304mv config.c Modules