blob: aa3e4d90c172c358f3690ce92e346da5e56b6cd2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Brett Cannonaa5778d2008-03-18 04:09:00 +00002# From configure.in Revision: 61436 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004# Generated by GNU Autoconf 2.61 for python 2.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Neal Norwitz9be57322006-08-18 05:39:20 +0000578PACKAGE_VERSION='2.6'
579PACKAGE_STRING='python 2.6'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660PYTHONFRAMEWORK
661PYTHONFRAMEWORKDIR
662PYTHONFRAMEWORKPREFIX
663PYTHONFRAMEWORKINSTALLDIR
664FRAMEWORKINSTALLFIRST
665FRAMEWORKINSTALLLAST
666FRAMEWORKALTINSTALLFIRST
667FRAMEWORKALTINSTALLLAST
668FRAMEWORKUNIXTOOLSPREFIX
669MACHDEP
670SGI_ABI
671EXTRAPLATDIR
672EXTRAMACHDEPPATH
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696RANLIB
697AR
698SVNVERSION
699INSTALL_PROGRAM
700INSTALL_SCRIPT
701INSTALL_DATA
702LN
703OPT
704BASECFLAGS
705OTHER_LIBTOOL_OPT
706LIBTOOL_CRUFT
707SO
708LDSHARED
709BLDSHARED
710CCSHARED
711LINKFORSHARED
712CFLAGSFORSHARED
713SHLIBS
714USE_SIGNAL_MODULE
715SIGNAL_OBJS
716USE_THREAD_MODULE
717LDLAST
718THREADOBJ
719DLINCLDIR
720DYNLOADFILE
721MACHDEP_OBJS
722TRUE
723LIBOBJS
724HAVE_GETHOSTBYNAME_R_6_ARG
725HAVE_GETHOSTBYNAME_R_5_ARG
726HAVE_GETHOSTBYNAME_R_3_ARG
727HAVE_GETHOSTBYNAME_R
728HAVE_GETHOSTBYNAME
729LIBM
730LIBC
731UNICODE_OBJS
732THREADHEADERS
733SRCDIRS
734LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000735ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000736 ac_precious_vars='build_alias
737host_alias
738target_alias
739CC
740CFLAGS
741LDFLAGS
742LIBS
743CPPFLAGS
744CPP'
745
Guido van Rossum627b2d71993-12-24 10:39:16 +0000746
Guido van Rossum7f43da71994-08-01 12:15:30 +0000747# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000748ac_init_help=
749ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# The variables have the same names as the options, with
751# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000752cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000753exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755no_recursion=
756prefix=NONE
757program_prefix=NONE
758program_suffix=NONE
759program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764x_includes=NONE
765x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000766
767# Installation directory options.
768# These are left unexpanded so users can "make install exec_prefix=/foo"
769# and all the variables that are supposed to be based on exec_prefix
770# by default will actually change.
771# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000772# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000773bindir='${exec_prefix}/bin'
774sbindir='${exec_prefix}/sbin'
775libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000776datarootdir='${prefix}/share'
777datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778sysconfdir='${prefix}/etc'
779sharedstatedir='${prefix}/com'
780localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781includedir='${prefix}/include'
782oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000783docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
784infodir='${datarootdir}/info'
785htmldir='${docdir}'
786dvidir='${docdir}'
787pdfdir='${docdir}'
788psdir='${docdir}'
789libdir='${exec_prefix}/lib'
790localedir='${datarootdir}/locale'
791mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000794ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000796do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797 # If the previous option needs an argument, assign it.
798 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 ac_prev=
801 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 case $ac_option in
805 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
806 *) ac_optarg=yes ;;
807 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809 # Accept the important Cygnus configure options, so we can diagnose typos.
810
Martin v. Löwiseba40652007-08-30 20:10:57 +0000811 case $ac_dashdash$ac_option in
812 --)
813 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815 -bindir | --bindir | --bindi | --bind | --bin | --bi)
816 ac_prev=bindir ;;
817 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000818 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819
820 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825 -cache-file | --cache-file | --cache-fil | --cache-fi \
826 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
827 ac_prev=cache_file ;;
828 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
829 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000830 cache_file=$ac_optarg ;;
831
832 --config-cache | -C)
833 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834
Martin v. Löwiseba40652007-08-30 20:10:57 +0000835 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000838 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
841 | --dataroo | --dataro | --datar)
842 ac_prev=datarootdir ;;
843 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
844 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
845 datarootdir=$ac_optarg ;;
846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000850 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
852 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
854 eval enable_$ac_feature=no ;;
855
856 -docdir | --docdir | --docdi | --doc | --do)
857 ac_prev=docdir ;;
858 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
859 docdir=$ac_optarg ;;
860
861 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
862 ac_prev=dvidir ;;
863 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
864 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
866 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000867 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000869 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
871 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
873 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
876 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
877 | --exec | --exe | --ex)
878 ac_prev=exec_prefix ;;
879 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
880 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
881 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
884 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Obsolete; use --with-gas.
886 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 -help | --help | --hel | --he | -h)
889 ac_init_help=long ;;
890 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
891 ac_init_help=recursive ;;
892 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
893 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
895 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Martin v. Löwiseba40652007-08-30 20:10:57 +0000900 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
901 ac_prev=htmldir ;;
902 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
903 | --ht=*)
904 htmldir=$ac_optarg ;;
905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 -includedir | --includedir | --includedi | --included | --include \
907 | --includ | --inclu | --incl | --inc)
908 ac_prev=includedir ;;
909 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
910 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912
913 -infodir | --infodir | --infodi | --infod | --info | --inf)
914 ac_prev=infodir ;;
915 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -libdir | --libdir | --libdi | --libd)
919 ac_prev=libdir ;;
920 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
924 | --libexe | --libex | --libe)
925 ac_prev=libexecdir ;;
926 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
927 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
Martin v. Löwiseba40652007-08-30 20:10:57 +0000930 -localedir | --localedir | --localedi | --localed | --locale)
931 ac_prev=localedir ;;
932 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
933 localedir=$ac_optarg ;;
934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 ac_prev=localstatedir ;;
938 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
942 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
943 ac_prev=mandir ;;
944 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Obsolete; use --without-fp.
949 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 no_create=yes ;;
954
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
956 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
957 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
960 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
961 | --oldin | --oldi | --old | --ol | --o)
962 ac_prev=oldincludedir ;;
963 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
964 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
965 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
969 ac_prev=prefix ;;
970 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972
973 -program-prefix | --program-prefix | --program-prefi | --program-pref \
974 | --program-pre | --program-pr | --program-p)
975 ac_prev=program_prefix ;;
976 -program-prefix=* | --program-prefix=* | --program-prefi=* \
977 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
980 -program-suffix | --program-suffix | --program-suffi | --program-suff \
981 | --program-suf | --program-su | --program-s)
982 ac_prev=program_suffix ;;
983 -program-suffix=* | --program-suffix=* | --program-suffi=* \
984 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -program-transform-name | --program-transform-name \
988 | --program-transform-nam | --program-transform-na \
989 | --program-transform-n | --program-transform- \
990 | --program-transform | --program-transfor \
991 | --program-transfo | --program-transf \
992 | --program-trans | --program-tran \
993 | --progr-tra | --program-tr | --program-t)
994 ac_prev=program_transform_name ;;
995 -program-transform-name=* | --program-transform-name=* \
996 | --program-transform-nam=* | --program-transform-na=* \
997 | --program-transform-n=* | --program-transform-=* \
998 | --program-transform=* | --program-transfor=* \
999 | --program-transfo=* | --program-transf=* \
1000 | --program-trans=* | --program-tran=* \
1001 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Martin v. Löwiseba40652007-08-30 20:10:57 +00001004 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1005 ac_prev=pdfdir ;;
1006 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1007 pdfdir=$ac_optarg ;;
1008
1009 -psdir | --psdir | --psdi | --psd | --ps)
1010 ac_prev=psdir ;;
1011 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1012 psdir=$ac_optarg ;;
1013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1015 | -silent | --silent | --silen | --sile | --sil)
1016 silent=yes ;;
1017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1019 ac_prev=sbindir ;;
1020 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1021 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1025 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1026 | --sharedst | --shareds | --shared | --share | --shar \
1027 | --sha | --sh)
1028 ac_prev=sharedstatedir ;;
1029 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1030 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1031 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1032 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 -site | --site | --sit)
1036 ac_prev=site ;;
1037 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1041 ac_prev=srcdir ;;
1042 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1046 | --syscon | --sysco | --sysc | --sys | --sy)
1047 ac_prev=sysconfdir ;;
1048 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1049 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1058 verbose=yes ;;
1059
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 -version | --version | --versio | --versi | --vers | -V)
1061 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001066 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 { echo "$as_me: error: invalid package name: $ac_package" >&2
1068 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1070 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001075 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 { echo "$as_me: error: invalid package name: $ac_package" >&2
1077 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1079 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 --x)
1082 # Obsolete; use --with-x.
1083 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1086 | --x-incl | --x-inc | --x-in | --x-i)
1087 ac_prev=x_includes ;;
1088 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1089 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1093 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1094 ac_prev=x_libraries ;;
1095 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1096 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 -*) { echo "$as_me: error: unrecognized option: $ac_option
1100Try \`$0 --help' for more information." >&2
1101 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 ;;
1103
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 *=*)
1105 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1106 # Reject names that are not valid shell variable names.
1107 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1108 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1109 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001110 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 export $ac_envvar ;;
1112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 # FIXME: should be removed in autoconf 3.0.
1115 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1116 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1117 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1118 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 ;;
1120
1121 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001122done
1123
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1126 { echo "$as_me: error: missing argument to $ac_option" >&2
1127 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128fi
1129
Martin v. Löwiseba40652007-08-30 20:10:57 +00001130# Be sure to have absolute directory names.
1131for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1132 datadir sysconfdir sharedstatedir localstatedir includedir \
1133 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1134 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001138 [\\/$]* | ?:[\\/]* ) continue;;
1139 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1142 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001143done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001144
Martin v. Löwis11437992002-04-12 09:54:03 +00001145# There might be people who depend on the old broken behavior: `$host'
1146# used to hold the argument of --host etc.
1147# FIXME: To remove some day.
1148build=$build_alias
1149host=$host_alias
1150target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152# FIXME: To remove some day.
1153if test "x$host_alias" != x; then
1154 if test "x$build_alias" = x; then
1155 cross_compiling=maybe
1156 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1157 If a cross compiler is detected then cross compile mode will be used." >&2
1158 elif test "x$build_alias" != "x$host_alias"; then
1159 cross_compiling=yes
1160 fi
1161fi
1162
1163ac_tool_prefix=
1164test -n "$host_alias" && ac_tool_prefix=$host_alias-
1165
1166test "$silent" = yes && exec 6>/dev/null
1167
Guido van Rossum627b2d71993-12-24 10:39:16 +00001168
Martin v. Löwiseba40652007-08-30 20:10:57 +00001169ac_pwd=`pwd` && test -n "$ac_pwd" &&
1170ac_ls_di=`ls -di .` &&
1171ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1172 { echo "$as_me: error: Working directory cannot be determined" >&2
1173 { (exit 1); exit 1; }; }
1174test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1175 { echo "$as_me: error: pwd does not report name of working directory" >&2
1176 { (exit 1); exit 1; }; }
1177
1178
Guido van Rossum627b2d71993-12-24 10:39:16 +00001179# Find the source files, if location was not specified.
1180if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 # Try the directory containing this script, then the parent directory.
1183 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001184$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001185 X"$0" : 'X\(//\)[^/]' \| \
1186 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001188echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001189 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1190 s//\1/
1191 q
1192 }
1193 /^X\(\/\/\)[^/].*/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)$/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\).*/{
1202 s//\1/
1203 q
1204 }
1205 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001207 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208 srcdir=..
1209 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210else
1211 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001213if test ! -r "$srcdir/$ac_unique_file"; then
1214 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1215 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1219ac_abs_confdir=`(
1220 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001221 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001222 pwd)`
1223# When building in place, set srcdir=.
1224if test "$ac_abs_confdir" = "$ac_pwd"; then
1225 srcdir=.
1226fi
1227# Remove unnecessary trailing slashes from srcdir.
1228# Double slashes in file names in object file debugging info
1229# mess up M-x gdb in Emacs.
1230case $srcdir in
1231*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1232esac
1233for ac_var in $ac_precious_vars; do
1234 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1235 eval ac_env_${ac_var}_value=\$${ac_var}
1236 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1238done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240#
1241# Report the --help message.
1242#
1243if test "$ac_init_help" = "long"; then
1244 # Omit some internal or obsolete options to make the list less imposing.
1245 # This message is too long to be a string in the A/UX 3.1 sh.
1246 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001247\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001248
1249Usage: $0 [OPTION]... [VAR=VALUE]...
1250
1251To assign environment variables (e.g., CC, CFLAGS...), specify them as
1252VAR=VALUE. See below for descriptions of some of the useful variables.
1253
1254Defaults for the options are specified in brackets.
1255
1256Configuration:
1257 -h, --help display this help and exit
1258 --help=short display options specific to this package
1259 --help=recursive display the short help of all the included packages
1260 -V, --version display version information and exit
1261 -q, --quiet, --silent do not print \`checking...' messages
1262 --cache-file=FILE cache test results in FILE [disabled]
1263 -C, --config-cache alias for \`--cache-file=config.cache'
1264 -n, --no-create do not create output files
1265 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1266
Martin v. Löwis11437992002-04-12 09:54:03 +00001267Installation directories:
1268 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001269 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001271 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272
1273By default, \`make install' will install all the files in
1274\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1275an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1276for instance \`--prefix=\$HOME'.
1277
1278For better control, use the options below.
1279
1280Fine tuning of the installation directories:
1281 --bindir=DIR user executables [EPREFIX/bin]
1282 --sbindir=DIR system admin executables [EPREFIX/sbin]
1283 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1285 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1286 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1287 --libdir=DIR object code libraries [EPREFIX/lib]
1288 --includedir=DIR C header files [PREFIX/include]
1289 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001290 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1291 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1292 --infodir=DIR info documentation [DATAROOTDIR/info]
1293 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1294 --mandir=DIR man documentation [DATAROOTDIR/man]
1295 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1296 --htmldir=DIR html documentation [DOCDIR]
1297 --dvidir=DIR dvi documentation [DOCDIR]
1298 --pdfdir=DIR pdf documentation [DOCDIR]
1299 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001300_ACEOF
1301
1302 cat <<\_ACEOF
1303_ACEOF
1304fi
1305
1306if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001307 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001308 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001310 cat <<\_ACEOF
1311
1312Optional Features:
1313 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1314 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001315 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001316 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001317 --enable-framework[=INSTALLDIR]
1318 Build (MacOSX|Darwin) framework
1319 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001320 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001321 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1322 --enable-ipv6 Enable ipv6 (with ipv4) support
1323 --disable-ipv6 Disable ipv6 support
1324 --enable-unicode[=ucs[24]]
1325 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
1327Optional Packages:
1328 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1329 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001331 --with-cxx-main=<compiler>
1332 compile main() and link python executable with C++
1333 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --with-suffix=.exe set executable suffix
1335 --with-pydebug build with Py_DEBUG defined
1336 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001337 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --with-signal-module disable/enable signal module
1339 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1340 --with(out)-threads[=DIRECTORY]
1341 disable/enable thread support
1342 --with(out)-thread[=DIRECTORY]
1343 deprecated; use --with(out)-threads
1344 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001346 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with(out)-pymalloc disable/enable specialized mallocs
1348 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-fpectl enable SIGFPE catching
1350 --with-libm=STRING math library
1351 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001352
1353Some influential environment variables:
1354 CC C compiler command
1355 CFLAGS C compiler flags
1356 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1357 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001358 LIBS libraries to pass to the linker, e.g. -l<library>
1359 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1360 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001361 CPP C preprocessor
1362
1363Use these variables to override the choices made by `configure' or to help
1364it to find libraries and programs with nonstandard names/locations.
1365
Martin v. Löwis1d459062005-03-14 21:23:33 +00001366Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001367_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001368ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001369fi
1370
1371if test "$ac_init_help" = "recursive"; then
1372 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001374 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 ac_builddir=.
1376
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377case "$ac_dir" in
1378.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1379*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381 # A ".." for each directory in $ac_dir_suffix.
1382 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1383 case $ac_top_builddir_sub in
1384 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1385 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1386 esac ;;
1387esac
1388ac_abs_top_builddir=$ac_pwd
1389ac_abs_builddir=$ac_pwd$ac_dir_suffix
1390# for backward compatibility:
1391ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001396 ac_top_srcdir=$ac_top_builddir_sub
1397 ac_abs_top_srcdir=$ac_pwd ;;
1398 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 ac_top_srcdir=$srcdir
1401 ac_abs_top_srcdir=$srcdir ;;
1402 *) # Relative name.
1403 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1404 ac_top_srcdir=$ac_top_build_prefix$srcdir
1405 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001406esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001408
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 cd "$ac_dir" || { ac_status=$?; continue; }
1410 # Check for guested configure.
1411 if test -f "$ac_srcdir/configure.gnu"; then
1412 echo &&
1413 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1414 elif test -f "$ac_srcdir/configure"; then
1415 echo &&
1416 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 else
1418 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001419 fi || ac_status=$?
1420 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 done
1422fi
1423
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001425if $ac_init_version; then
1426 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001427python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14312002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001432This configure script is free software; the Free Software Foundation
1433gives unlimited permission to copy, distribute and modify it.
1434_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001435 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001438This file contains any messages produced by compilers while
1439running configure, to aid debugging if configure makes a mistake.
1440
Neal Norwitz9be57322006-08-18 05:39:20 +00001441It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001442generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444 $ $0 $@
1445
1446_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001448{
1449cat <<_ASUNAME
1450## --------- ##
1451## Platform. ##
1452## --------- ##
1453
1454hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1455uname -m = `(uname -m) 2>/dev/null || echo unknown`
1456uname -r = `(uname -r) 2>/dev/null || echo unknown`
1457uname -s = `(uname -s) 2>/dev/null || echo unknown`
1458uname -v = `(uname -v) 2>/dev/null || echo unknown`
1459
1460/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1461/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1462
1463/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1464/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1465/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001466/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001467/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1468/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1469/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1470
1471_ASUNAME
1472
1473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1474for as_dir in $PATH
1475do
1476 IFS=$as_save_IFS
1477 test -z "$as_dir" && as_dir=.
1478 echo "PATH: $as_dir"
1479done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001480IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001481
1482} >&5
1483
1484cat >&5 <<_ACEOF
1485
1486
1487## ----------- ##
1488## Core tests. ##
1489## ----------- ##
1490
1491_ACEOF
1492
1493
1494# Keep a trace of the command line.
1495# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001496# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001497# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001498# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001500ac_configure_args0=
1501ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001502ac_must_keep_next=false
1503for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001504do
Skip Montanaro6dead952003-09-25 14:50:04 +00001505 for ac_arg
1506 do
1507 case $ac_arg in
1508 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510 | -silent | --silent | --silen | --sile | --sil)
1511 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001512 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001513 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1514 esac
1515 case $ac_pass in
1516 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1517 2)
1518 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1519 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001520 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001522 case $ac_arg in
1523 *=* | --config-cache | -C | -disable-* | --disable-* \
1524 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1525 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1526 | -with-* | --with-* | -without-* | --without-* | --x)
1527 case "$ac_configure_args0 " in
1528 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1529 esac
1530 ;;
1531 -* ) ac_must_keep_next=true ;;
1532 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001534 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 ;;
1536 esac
1537 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001538done
Skip Montanaro6dead952003-09-25 14:50:04 +00001539$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1540$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542# When interrupted or exit'd, cleanup temporary files, and complete
1543# config.log. We remove comments because anyway the quotes in there
1544# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545# WARNING: Use '\'' to represent an apostrophe within the trap.
1546# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547trap 'exit_status=$?
1548 # Save into config.log some information that might help in debugging.
1549 {
1550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001551
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 cat <<\_ASBOX
1553## ---------------- ##
1554## Cache variables. ##
1555## ---------------- ##
1556_ASBOX
1557 echo
1558 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001559(
1560 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1561 eval ac_val=\$$ac_var
1562 case $ac_val in #(
1563 *${as_nl}*)
1564 case $ac_var in #(
1565 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1566echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1567 esac
1568 case $ac_var in #(
1569 _ | IFS | as_nl) ;; #(
1570 *) $as_unset $ac_var ;;
1571 esac ;;
1572 esac
1573 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1576 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 "s/'\''/'\''\\\\'\'''\''/g;
1579 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1580 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001581 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001583 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac |
1585 sort
1586)
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001588
1589 cat <<\_ASBOX
1590## ----------------- ##
1591## Output variables. ##
1592## ----------------- ##
1593_ASBOX
1594 echo
1595 for ac_var in $ac_subst_vars
1596 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001597 eval ac_val=\$$ac_var
1598 case $ac_val in
1599 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1600 esac
1601 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001602 done | sort
1603 echo
1604
1605 if test -n "$ac_subst_files"; then
1606 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001607## ------------------- ##
1608## File substitutions. ##
1609## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_files
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
1616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1617 esac
1618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621 fi
1622
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 if test -s confdefs.h; then
1624 cat <<\_ASBOX
1625## ----------- ##
1626## confdefs.h. ##
1627## ----------- ##
1628_ASBOX
1629 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001630 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 echo
1632 fi
1633 test "$ac_signal" != 0 &&
1634 echo "$as_me: caught signal $ac_signal"
1635 echo "$as_me: exit $exit_status"
1636 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001637 rm -f core *.core core.conftest.* &&
1638 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001640' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001641for ac_signal in 1 2 13 15; do
1642 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1643done
1644ac_signal=0
1645
1646# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648
1649# Predefined preprocessor variables.
1650
1651cat >>confdefs.h <<_ACEOF
1652#define PACKAGE_NAME "$PACKAGE_NAME"
1653_ACEOF
1654
1655
1656cat >>confdefs.h <<_ACEOF
1657#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1658_ACEOF
1659
1660
1661cat >>confdefs.h <<_ACEOF
1662#define PACKAGE_VERSION "$PACKAGE_VERSION"
1663_ACEOF
1664
1665
1666cat >>confdefs.h <<_ACEOF
1667#define PACKAGE_STRING "$PACKAGE_STRING"
1668_ACEOF
1669
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1673_ACEOF
1674
1675
1676# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001678if test -n "$CONFIG_SITE"; then
1679 set x "$CONFIG_SITE"
1680elif test "x$prefix" != xNONE; then
1681 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1682else
1683 set x "$ac_default_prefix/share/config.site" \
1684 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001686shift
1687for ac_site_file
1688do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001690 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1691echo "$as_me: loading site script $ac_site_file" >&6;}
1692 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 . "$ac_site_file"
1694 fi
1695done
1696
1697if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001698 # Some versions of bash will fail to source /dev/null (special
1699 # files actually), so we avoid doing that.
1700 if test -f "$cache_file"; then
1701 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1702echo "$as_me: loading cache $cache_file" >&6;}
1703 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001704 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1705 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 esac
1707 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708else
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1710echo "$as_me: creating cache $cache_file" >&6;}
1711 >$cache_file
1712fi
1713
1714# Check that the precious variables saved in the cache have kept the same
1715# value.
1716ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001717for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1719 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001720 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1721 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $ac_old_set,$ac_new_set in
1723 set,)
1724 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1725echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1726 ac_cache_corrupted=: ;;
1727 ,set)
1728 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1729echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,);;
1732 *)
1733 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001734 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001735echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001736 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001737echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001738 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001739echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001740 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 fi;;
1742 esac
1743 # Pass precious variables to config.status.
1744 if test "$ac_new_set" = set; then
1745 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001746 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 *) ac_arg=$ac_var=$ac_new_val ;;
1748 esac
1749 case " $ac_configure_args " in
1750 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1751 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1752 esac
1753 fi
1754done
1755if $ac_cache_corrupted; then
1756 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1757echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1758 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1759echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1760 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761fi
1762
Martin v. Löwiseba40652007-08-30 20:10:57 +00001763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
Guido van Rossum7f43da71994-08-01 12:15:30 +00001787ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1791ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792
Guido van Rossum627b2d71993-12-24 10:39:16 +00001793
Michael W. Hudson54241132001-12-07 15:38:26 +00001794
Martin v. Löwiseba40652007-08-30 20:10:57 +00001795ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001796
1797
Martin v. Löwis11437992002-04-12 09:54:03 +00001798
1799
1800
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001801
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001802
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001803# We don't use PACKAGE_ variables, and they cause conflicts
1804# with other autoconf-based packages that include Python.h
1805grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1806rm confdefs.h
1807mv confdefs.h.new confdefs.h
1808
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001809
Neal Norwitz9be57322006-08-18 05:39:20 +00001810VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001811
Martin v. Löwis1142de32002-03-29 16:28:31 +00001812
1813SOVERSION=1.0
1814
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001815# The later defininition of _XOPEN_SOURCE disables certain features
1816# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1817
1818cat >>confdefs.h <<\_ACEOF
1819#define _GNU_SOURCE 1
1820_ACEOF
1821
1822
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001823# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1824# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1825# them.
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _NETBSD_SOURCE 1
1829_ACEOF
1830
1831
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define __BSD_VISIBLE 1
1838_ACEOF
1839
1840
Martin v. Löwisd6320502004-08-12 13:45:08 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define _BSD_TYPES 1
1846_ACEOF
1847
1848
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001849define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001850
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001851# Arguments passed to configure.
1852
1853CONFIG_ARGS="$ac_configure_args"
1854
Martin v. Löwiseba40652007-08-30 20:10:57 +00001855# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001856if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001857 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001858 case $enableval in
1859 yes)
1860 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1861 ;;
1862 esac
1863 case $enableval in
1864 no)
1865 UNIVERSALSDK=
1866 enable_universalsdk=
1867 ;;
1868 *)
1869 UNIVERSALSDK=$enableval
1870 ;;
1871 esac
1872
1873else
1874
1875 UNIVERSALSDK=
1876 enable_universalsdk=
1877
Martin v. Löwiseba40652007-08-30 20:10:57 +00001878fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001879
1880
Martin v. Löwiseba40652007-08-30 20:10:57 +00001881
1882# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001883if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001884 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001885 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001886 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001887 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001888 esac
1889 case $enableval in
1890 no)
1891 PYTHONFRAMEWORK=
1892 PYTHONFRAMEWORKDIR=no-framework
1893 PYTHONFRAMEWORKPREFIX=
1894 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001895 FRAMEWORKINSTALLFIRST=
1896 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001897 FRAMEWORKALTINSTALLFIRST=
1898 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001899 if test "x${prefix}" = "xNONE"; then
1900 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1901 else
1902 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1903 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001904 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001905 ;;
1906 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001907 PYTHONFRAMEWORK=Python
1908 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001909 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001910 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001911 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1912 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001913 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1914 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001915 if test "x${prefix}" = "xNONE" ; then
1916 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1917 else
1918 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1919 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001920 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001921
1922 # Add makefiles for Mac specific code to the list of output
1923 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001924 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001925
Martin v. Löwiseba40652007-08-30 20:10:57 +00001926 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001927
Martin v. Löwiseba40652007-08-30 20:10:57 +00001928 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001929
Jack Jansene578a632001-08-15 01:27:14 +00001930 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001931
Guido van Rossum563e7081996-09-10 18:20:48 +00001932else
Martin v. Löwis11437992002-04-12 09:54:03 +00001933
Jack Jansene578a632001-08-15 01:27:14 +00001934 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001935 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001936 PYTHONFRAMEWORKPREFIX=
1937 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001938 FRAMEWORKINSTALLFIRST=
1939 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001940 FRAMEWORKALTINSTALLFIRST=
1941 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001942 if test "x${prefix}" = "xNONE" ; then
1943 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1944 else
1945 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1946 fi
Jack Jansene578a632001-08-15 01:27:14 +00001947 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001948
Martin v. Löwiseba40652007-08-30 20:10:57 +00001949fi
1950
Michael W. Hudson54241132001-12-07 15:38:26 +00001951
1952
1953
1954
Jack Jansene578a632001-08-15 01:27:14 +00001955
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001956
1957
Ronald Oussoren5b787322006-06-06 19:50:24 +00001958
1959
1960
Jack Jansene578a632001-08-15 01:27:14 +00001961##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001962## AC_HELP_STRING(--with-dyld,
1963## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001964##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001965# Set name for machine-dependent library files
1966
Martin v. Löwiseba40652007-08-30 20:10:57 +00001967{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1968echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001969if test -z "$MACHDEP"
1970then
Guido van Rossum563e7081996-09-10 18:20:48 +00001971 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001972 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1973 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001974 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001975 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001976 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001977 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001978 ac_md_system=`echo $ac_sys_system |
1979 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1980 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001981 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001982 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001983
Guido van Rossum07397971997-04-29 21:49:50 +00001984 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001985 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001986 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001987 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001988 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001989 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001990 esac
1991fi
Guido van Rossum91922671997-10-09 20:24:13 +00001992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001993# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1994# disable features if it is defined, without any means to access these
1995# features as extensions. For these systems, we skip the definition of
1996# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1997# some feature, make sure there is no alternative way to access this
1998# feature. Also, when using wildcards, make sure you have verified the
1999# need for not defining _XOPEN_SOURCE on all systems matching the
2000# wildcard, and that the wildcard does not include future systems
2001# (which may remove their limitations).
2002case $ac_sys_system/$ac_sys_release in
2003 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2004 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002005 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00002006 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002007 define_xopen_source=no
2008 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2009 # also defined. This can be overridden by defining _BSD_SOURCE
2010 # As this has a different meaning on Linux, only define it on OpenBSD
2011
2012cat >>confdefs.h <<\_ACEOF
2013#define _BSD_SOURCE 1
2014_ACEOF
2015
2016 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002017 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2018 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2019 # Marc Recht
2020 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2021 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002022 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2023 # of union __?sigval. Reported by Stuart Bishop.
2024 SunOS/5.6)
2025 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002026 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2027 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002028 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002029 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002030 define_xopen_source=no;;
2031 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002032 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002033 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002034 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002035 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2036 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2037 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2038 # This should hopefully be fixed in FreeBSD 4.9
2039 FreeBSD/4.8* | Darwin/6* )
2040 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002041 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2042 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2043 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002044 AIX/4)
2045 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002046 AIX/5)
2047 if test `uname -r` -eq 1; then
2048 define_xopen_source=no
2049 fi
2050 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002051 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2052 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002053 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002054 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002055 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002056 define_xopen_source=no
2057 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002058
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002059esac
2060
2061if test $define_xopen_source = yes
2062then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002063 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2064 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002065 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2066 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002067 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002068 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002069
2070cat >>confdefs.h <<\_ACEOF
2071#define _XOPEN_SOURCE 500
2072_ACEOF
2073
2074 ;;
2075 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002076
2077cat >>confdefs.h <<\_ACEOF
2078#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002079_ACEOF
2080
Skip Montanarof0d5f792004-08-15 14:08:23 +00002081 ;;
2082 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002083
2084 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2085 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2086 # several APIs are not declared. Since this is also needed in some
2087 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002088 # except for Solaris 10, where it must not be defined,
2089 # as it implies XPG4.2
2090 case $ac_sys_system/$ac_sys_release in
2091 SunOS/5.10)
2092 ;;
2093 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002094
2095cat >>confdefs.h <<\_ACEOF
2096#define _XOPEN_SOURCE_EXTENDED 1
2097_ACEOF
2098
Martin v. Löwis7dece662005-11-26 11:38:24 +00002099 ;;
2100 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002101
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002102
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002103cat >>confdefs.h <<\_ACEOF
2104#define _POSIX_C_SOURCE 200112L
2105_ACEOF
2106
2107
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002108fi
2109
Guido van Rossum91922671997-10-09 20:24:13 +00002110#
2111# SGI compilers allow the specification of the both the ABI and the
2112# ISA on the command line. Depending on the values of these switches,
2113# different and often incompatable code will be generated.
2114#
2115# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2116# thus supply support for various ABI/ISA combinations. The MACHDEP
2117# variable is also adjusted.
2118#
2119
2120if test ! -z "$SGI_ABI"
2121then
2122 CC="cc $SGI_ABI"
2123 LDFLAGS="$SGI_ABI $LDFLAGS"
2124 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002126{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2127echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002128
Jack Jansen83f898c2002-12-30 22:23:40 +00002129# And add extra plat-mac for darwin
2130
Jack Jansen7b59b422003-03-17 15:44:10 +00002131
Martin v. Löwiseba40652007-08-30 20:10:57 +00002132{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2133echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002134if test -z "$EXTRAPLATDIR"
2135then
2136 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002137 darwin)
2138 EXTRAPLATDIR="\$(PLATMACDIRS)"
2139 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2140 ;;
2141 *)
2142 EXTRAPLATDIR=""
2143 EXTRAMACHDEPPATH=""
2144 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002145 esac
2146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002147{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2148echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002149
Jack Jansen6b08a402004-06-03 12:41:45 +00002150# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2151# it may influence the way we can build extensions, so distutils
2152# needs to check it
2153
Ronald Oussoren988117f2006-04-29 11:31:35 +00002154
Jack Jansen6b08a402004-06-03 12:41:45 +00002155CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002156EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002157
Guido van Rossum627b2d71993-12-24 10:39:16 +00002158# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002159
2160# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2161# for debug/optimization stuff. BASECFLAGS is for flags that are required
2162# just to get things to compile and link. Users are free to override OPT
2163# when running configure or make. The build should not break if they do.
2164# BASECFLAGS should generally not be messed with, however.
2165
2166# XXX shouldn't some/most/all of this code be merged with the stuff later
2167# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002168{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2169echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002170
Martin v. Löwiseba40652007-08-30 20:10:57 +00002171# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002172if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002173 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002174 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002175 no) CC=cc
2176 without_gcc=yes;;
2177 yes) CC=gcc
2178 without_gcc=no;;
2179 *) CC=$withval
2180 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002181 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002182else
Martin v. Löwis11437992002-04-12 09:54:03 +00002183
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002184 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002185 AIX*) CC=cc_r
2186 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002187 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002188 case $BE_HOST_CPU in
2189 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002190 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002191 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002192 BASECFLAGS="$BASECFLAGS -export pragma"
2193 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002194 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002195 ;;
2196 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002197 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002198 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002199 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002200 ;;
2201 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002202 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2203echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2204 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002205 ;;
2206 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002207 AR="\$(srcdir)/Modules/ar_beos"
2208 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002209 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002210 Monterey*)
2211 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002212 without_gcc=;;
2213 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002214 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002215fi
2216
2217{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2218echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002219
Guido van Rossum8b131c51995-03-09 14:10:13 +00002220# If the user switches compilers, we can't believe the cache
2221if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2222then
Martin v. Löwis11437992002-04-12 09:54:03 +00002223 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2224(it is also a good idea to do 'make clean' before compiling)" >&5
2225echo "$as_me: error: cached CC is different -- throw away $cache_file
2226(it is also a good idea to do 'make clean' before compiling)" >&2;}
2227 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002228fi
2229
Martin v. Löwis11437992002-04-12 09:54:03 +00002230ac_ext=c
2231ac_cpp='$CPP $CPPFLAGS'
2232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2234ac_compiler_gnu=$ac_cv_c_compiler_gnu
2235if test -n "$ac_tool_prefix"; then
2236 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2237set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002238{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002240if test "${ac_cv_prog_CC+set}" = set; then
2241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242else
2243 if test -n "$CC"; then
2244 ac_cv_prog_CC="$CC" # Let the user override the test.
2245else
Martin v. Löwis11437992002-04-12 09:54:03 +00002246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2247for as_dir in $PATH
2248do
2249 IFS=$as_save_IFS
2250 test -z "$as_dir" && as_dir=.
2251 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002253 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2255 break 2
2256 fi
2257done
2258done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002259IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002260
Jack Jansendd19cf82001-12-06 22:36:17 +00002261fi
2262fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002263CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002264if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002265 { echo "$as_me:$LINENO: result: $CC" >&5
2266echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002267else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002268 { echo "$as_me:$LINENO: result: no" >&5
2269echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002270fi
2271
Martin v. Löwiseba40652007-08-30 20:10:57 +00002272
Martin v. Löwis11437992002-04-12 09:54:03 +00002273fi
2274if test -z "$ac_cv_prog_CC"; then
2275 ac_ct_CC=$CC
2276 # Extract the first word of "gcc", so it can be a program name with args.
2277set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002280if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2281 echo $ECHO_N "(cached) $ECHO_C" >&6
2282else
2283 if test -n "$ac_ct_CC"; then
2284 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2285else
2286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2287for as_dir in $PATH
2288do
2289 IFS=$as_save_IFS
2290 test -z "$as_dir" && as_dir=.
2291 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002292 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002293 ac_cv_prog_ac_ct_CC="gcc"
2294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2295 break 2
2296 fi
2297done
2298done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002299IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002300
2301fi
2302fi
2303ac_ct_CC=$ac_cv_prog_ac_ct_CC
2304if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002305 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2306echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002307else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002308 { echo "$as_me:$LINENO: result: no" >&5
2309echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002310fi
2311
Martin v. Löwiseba40652007-08-30 20:10:57 +00002312 if test "x$ac_ct_CC" = x; then
2313 CC=""
2314 else
2315 case $cross_compiling:$ac_tool_warned in
2316yes:)
2317{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2318whose name does not start with the host triplet. If you think this
2319configuration is useful to you, please write to autoconf@gnu.org." >&5
2320echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2321whose name does not start with the host triplet. If you think this
2322configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2323ac_tool_warned=yes ;;
2324esac
2325 CC=$ac_ct_CC
2326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002327else
2328 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002329fi
2330
Jack Jansendd19cf82001-12-06 22:36:17 +00002331if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002332 if test -n "$ac_tool_prefix"; then
2333 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002334set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002335{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002337if test "${ac_cv_prog_CC+set}" = set; then
2338 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002339else
2340 if test -n "$CC"; then
2341 ac_cv_prog_CC="$CC" # Let the user override the test.
2342else
Martin v. Löwis11437992002-04-12 09:54:03 +00002343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2344for as_dir in $PATH
2345do
2346 IFS=$as_save_IFS
2347 test -z "$as_dir" && as_dir=.
2348 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002350 ac_cv_prog_CC="${ac_tool_prefix}cc"
2351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2352 break 2
2353 fi
2354done
2355done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002357
2358fi
2359fi
2360CC=$ac_cv_prog_CC
2361if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362 { echo "$as_me:$LINENO: result: $CC" >&5
2363echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002364else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002365 { echo "$as_me:$LINENO: result: no" >&5
2366echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002367fi
2368
Martin v. Löwiseba40652007-08-30 20:10:57 +00002369
Martin v. Löwis11437992002-04-12 09:54:03 +00002370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002371fi
2372if test -z "$CC"; then
2373 # Extract the first word of "cc", so it can be a program name with args.
2374set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002375{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002377if test "${ac_cv_prog_CC+set}" = set; then
2378 echo $ECHO_N "(cached) $ECHO_C" >&6
2379else
2380 if test -n "$CC"; then
2381 ac_cv_prog_CC="$CC" # Let the user override the test.
2382else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002383 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
2389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2392 ac_prog_rejected=yes
2393 continue
2394 fi
2395 ac_cv_prog_CC="cc"
2396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2397 break 2
2398 fi
2399done
2400done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002403if test $ac_prog_rejected = yes; then
2404 # We found a bogon in the path, so make sure we never use it.
2405 set dummy $ac_cv_prog_CC
2406 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002407 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002408 # We chose a different compiler from the bogus one.
2409 # However, it has the same basename, so the bogon will be chosen
2410 # first if we set CC to just the basename; use the full file name.
2411 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002413 fi
2414fi
2415fi
2416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002417CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002418if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419 { echo "$as_me:$LINENO: result: $CC" >&5
2420echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002421else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002422 { echo "$as_me:$LINENO: result: no" >&5
2423echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002424fi
2425
Martin v. Löwiseba40652007-08-30 20:10:57 +00002426
Martin v. Löwis11437992002-04-12 09:54:03 +00002427fi
2428if test -z "$CC"; then
2429 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 do
2432 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2433set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2435echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002436if test "${ac_cv_prog_CC+set}" = set; then
2437 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002438else
2439 if test -n "$CC"; then
2440 ac_cv_prog_CC="$CC" # Let the user override the test.
2441else
Martin v. Löwis11437992002-04-12 09:54:03 +00002442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445 IFS=$as_save_IFS
2446 test -z "$as_dir" && as_dir=.
2447 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2450 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2451 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002453done
2454done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002456
2457fi
2458fi
2459CC=$ac_cv_prog_CC
2460if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461 { echo "$as_me:$LINENO: result: $CC" >&5
2462echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464 { echo "$as_me:$LINENO: result: no" >&5
2465echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002466fi
2467
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 test -n "$CC" && break
2470 done
2471fi
2472if test -z "$CC"; then
2473 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002475do
2476 # Extract the first word of "$ac_prog", so it can be a program name with args.
2477set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2481 echo $ECHO_N "(cached) $ECHO_C" >&6
2482else
2483 if test -n "$ac_ct_CC"; then
2484 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2485else
2486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2487for as_dir in $PATH
2488do
2489 IFS=$as_save_IFS
2490 test -z "$as_dir" && as_dir=.
2491 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002492 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 ac_cv_prog_ac_ct_CC="$ac_prog"
2494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2495 break 2
2496 fi
2497done
2498done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002500
Martin v. Löwis11437992002-04-12 09:54:03 +00002501fi
2502fi
2503ac_ct_CC=$ac_cv_prog_ac_ct_CC
2504if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2506echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002510fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002511
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 test -n "$ac_ct_CC" && break
2514done
Michael W. Hudson54241132001-12-07 15:38:26 +00002515
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 if test "x$ac_ct_CC" = x; then
2517 CC=""
2518 else
2519 case $cross_compiling:$ac_tool_warned in
2520yes:)
2521{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2522whose name does not start with the host triplet. If you think this
2523configuration is useful to you, please write to autoconf@gnu.org." >&5
2524echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2525whose name does not start with the host triplet. If you think this
2526configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2527ac_tool_warned=yes ;;
2528esac
2529 CC=$ac_ct_CC
2530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002531fi
2532
2533fi
2534
2535
Skip Montanaro6dead952003-09-25 14:50:04 +00002536test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2537See \`config.log' for more details." >&5
2538echo "$as_me: error: no acceptable C compiler found in \$PATH
2539See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 { (exit 1); exit 1; }; }
2541
2542# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002544ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545{ (ac_try="$ac_compiler --version >&5"
2546case "(($ac_try" in
2547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2548 *) ac_try_echo=$ac_try;;
2549esac
2550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2551 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 ac_status=$?
2553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002555{ (ac_try="$ac_compiler -v >&5"
2556case "(($ac_try" in
2557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2558 *) ac_try_echo=$ac_try;;
2559esac
2560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2561 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 ac_status=$?
2563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2564 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565{ (ac_try="$ac_compiler -V >&5"
2566case "(($ac_try" in
2567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2568 *) ac_try_echo=$ac_try;;
2569esac
2570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2571 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); }
2575
2576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002577/* confdefs.h. */
2578_ACEOF
2579cat confdefs.h >>conftest.$ac_ext
2580cat >>conftest.$ac_ext <<_ACEOF
2581/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583int
2584main ()
2585{
2586
2587 ;
2588 return 0;
2589}
2590_ACEOF
2591ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002592ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593# Try to create an executable without -o first, disregard a.out.
2594# It will help us diagnose broken compilers, and finding out an intuition
2595# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2597echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002598ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002599#
2600# List of possible output files, starting from the most likely.
2601# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2602# only as a last resort. b.out is created by i960 compilers.
2603ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2604#
2605# The IRIX 6 linker writes into existing files which may not be
2606# executable, retaining their permissions. Remove them first so a
2607# subsequent execution test works.
2608ac_rmfiles=
2609for ac_file in $ac_files
2610do
2611 case $ac_file in
2612 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2613 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2614 esac
2615done
2616rm -f $ac_rmfiles
2617
2618if { (ac_try="$ac_link_default"
2619case "(($ac_try" in
2620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2621 *) ac_try_echo=$ac_try;;
2622esac
2623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2624 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_status=$?
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2629# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2630# in a Makefile. We should not override ac_cv_exeext if it was cached,
2631# so that the user can short-circuit this test for compilers unknown to
2632# Autoconf.
2633for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002634do
2635 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002638 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002639 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002640 # We found the default executable, but exeext='' is most
2641 # certainly right.
2642 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002643 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2645 then :; else
2646 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2647 fi
2648 # We set ac_cv_exeext here because the later test for it is not
2649 # safe: cross compilers may not add the suffix if given an `-o'
2650 # argument, so we may need to know it at that point already.
2651 # Even if this section looks crufty: it has the advantage of
2652 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002653 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002654 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002655 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 esac
2657done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658test "$ac_cv_exeext" = no && ac_cv_exeext=
2659
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002660else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002661 ac_file=''
2662fi
2663
2664{ echo "$as_me:$LINENO: result: $ac_file" >&5
2665echo "${ECHO_T}$ac_file" >&6; }
2666if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002668sed 's/^/| /' conftest.$ac_ext >&5
2669
2670{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2671See \`config.log' for more details." >&5
2672echo "$as_me: error: C compiler cannot create executables
2673See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002675fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002678
Martin v. Löwiseba40652007-08-30 20:10:57 +00002679# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002680# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002681{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2682echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002683# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2684# If not cross compiling, check that we can run a simple program.
2685if test "$cross_compiling" != yes; then
2686 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687 { (case "(($ac_try" in
2688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2689 *) ac_try_echo=$ac_try;;
2690esac
2691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2692 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 ac_status=$?
2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695 (exit $ac_status); }; }; then
2696 cross_compiling=no
2697 else
2698 if test "$cross_compiling" = maybe; then
2699 cross_compiling=yes
2700 else
2701 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002702If you meant to cross compile, use \`--host'.
2703See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002705If you meant to cross compile, use \`--host'.
2706See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 { (exit 1); exit 1; }; }
2708 fi
2709 fi
2710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002711{ echo "$as_me:$LINENO: result: yes" >&5
2712echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002713
Skip Montanaro6dead952003-09-25 14:50:04 +00002714rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002715ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002716# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002717# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002718{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2719echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2720{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2721echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002722
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2724echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2725if { (ac_try="$ac_link"
2726case "(($ac_try" in
2727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2728 *) ac_try_echo=$ac_try;;
2729esac
2730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2731 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 ac_status=$?
2733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734 (exit $ac_status); }; then
2735 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2736# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2737# work properly (i.e., refer to `conftest.exe'), while it won't with
2738# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002739for ac_file in conftest.exe conftest conftest.*; do
2740 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002742 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002744 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 * ) break;;
2746 esac
2747done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748else
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2750See \`config.log' for more details." >&5
2751echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2752See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002754fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002755
Martin v. Löwis11437992002-04-12 09:54:03 +00002756rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002757{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2758echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
2760rm -f conftest.$ac_ext
2761EXEEXT=$ac_cv_exeext
2762ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2764echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002765if test "${ac_cv_objext+set}" = set; then
2766 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002767else
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002769/* confdefs.h. */
2770_ACEOF
2771cat confdefs.h >>conftest.$ac_ext
2772cat >>conftest.$ac_ext <<_ACEOF
2773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002774
Martin v. Löwis11437992002-04-12 09:54:03 +00002775int
2776main ()
2777{
2778
2779 ;
2780 return 0;
2781}
2782_ACEOF
2783rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002784if { (ac_try="$ac_compile"
2785case "(($ac_try" in
2786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2787 *) ac_try_echo=$ac_try;;
2788esac
2789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2790 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 ac_status=$?
2792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794 for ac_file in conftest.o conftest.obj conftest.*; do
2795 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2799 break;;
2800 esac
2801done
2802else
2803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002804sed 's/^/| /' conftest.$ac_ext >&5
2805
2806{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2807See \`config.log' for more details." >&5
2808echo "$as_me: error: cannot compute suffix of object files: cannot compile
2809See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 { (exit 1); exit 1; }; }
2811fi
2812
2813rm -f conftest.$ac_cv_objext conftest.$ac_ext
2814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002815{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2816echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817OBJEXT=$ac_cv_objext
2818ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002819{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2820echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002821if test "${ac_cv_c_compiler_gnu+set}" = set; then
2822 echo $ECHO_N "(cached) $ECHO_C" >&6
2823else
2824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002825/* confdefs.h. */
2826_ACEOF
2827cat confdefs.h >>conftest.$ac_ext
2828cat >>conftest.$ac_ext <<_ACEOF
2829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002830
Martin v. Löwis11437992002-04-12 09:54:03 +00002831int
2832main ()
2833{
2834#ifndef __GNUC__
2835 choke me
2836#endif
2837
2838 ;
2839 return 0;
2840}
2841_ACEOF
2842rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002843if { (ac_try="$ac_compile"
2844case "(($ac_try" in
2845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2846 *) ac_try_echo=$ac_try;;
2847esac
2848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002851 grep -v '^ *+' conftest.er1 >conftest.err
2852 rm -f conftest.er1
2853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002855 (exit $ac_status); } && {
2856 test -z "$ac_c_werror_flag" ||
2857 test ! -s conftest.err
2858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002859 ac_compiler_gnu=yes
2860else
2861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002862sed 's/^/| /' conftest.$ac_ext >&5
2863
Martin v. Löwiseba40652007-08-30 20:10:57 +00002864 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002866
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002868ac_cv_c_compiler_gnu=$ac_compiler_gnu
2869
2870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002871{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2872echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002873GCC=`test $ac_compiler_gnu = yes && echo yes`
2874ac_test_CFLAGS=${CFLAGS+set}
2875ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002876{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2877echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002878if test "${ac_cv_prog_cc_g+set}" = set; then
2879 echo $ECHO_N "(cached) $ECHO_C" >&6
2880else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002881 ac_save_c_werror_flag=$ac_c_werror_flag
2882 ac_c_werror_flag=yes
2883 ac_cv_prog_cc_g=no
2884 CFLAGS="-g"
2885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002886/* confdefs.h. */
2887_ACEOF
2888cat confdefs.h >>conftest.$ac_ext
2889cat >>conftest.$ac_ext <<_ACEOF
2890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002891
Martin v. Löwis11437992002-04-12 09:54:03 +00002892int
2893main ()
2894{
2895
2896 ;
2897 return 0;
2898}
2899_ACEOF
2900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002901if { (ac_try="$ac_compile"
2902case "(($ac_try" in
2903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2904 *) ac_try_echo=$ac_try;;
2905esac
2906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002909 grep -v '^ *+' conftest.er1 >conftest.err
2910 rm -f conftest.er1
2911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002913 (exit $ac_status); } && {
2914 test -z "$ac_c_werror_flag" ||
2915 test ! -s conftest.err
2916 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002917 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002918else
Martin v. Löwis11437992002-04-12 09:54:03 +00002919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002920sed 's/^/| /' conftest.$ac_ext >&5
2921
Martin v. Löwiseba40652007-08-30 20:10:57 +00002922 CFLAGS=""
2923 cat >conftest.$ac_ext <<_ACEOF
2924/* confdefs.h. */
2925_ACEOF
2926cat confdefs.h >>conftest.$ac_ext
2927cat >>conftest.$ac_ext <<_ACEOF
2928/* end confdefs.h. */
2929
2930int
2931main ()
2932{
2933
2934 ;
2935 return 0;
2936}
2937_ACEOF
2938rm -f conftest.$ac_objext
2939if { (ac_try="$ac_compile"
2940case "(($ac_try" in
2941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2942 *) ac_try_echo=$ac_try;;
2943esac
2944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2945 (eval "$ac_compile") 2>conftest.er1
2946 ac_status=$?
2947 grep -v '^ *+' conftest.er1 >conftest.err
2948 rm -f conftest.er1
2949 cat conftest.err >&5
2950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951 (exit $ac_status); } && {
2952 test -z "$ac_c_werror_flag" ||
2953 test ! -s conftest.err
2954 } && test -s conftest.$ac_objext; then
2955 :
2956else
2957 echo "$as_me: failed program was:" >&5
2958sed 's/^/| /' conftest.$ac_ext >&5
2959
2960 ac_c_werror_flag=$ac_save_c_werror_flag
2961 CFLAGS="-g"
2962 cat >conftest.$ac_ext <<_ACEOF
2963/* confdefs.h. */
2964_ACEOF
2965cat confdefs.h >>conftest.$ac_ext
2966cat >>conftest.$ac_ext <<_ACEOF
2967/* end confdefs.h. */
2968
2969int
2970main ()
2971{
2972
2973 ;
2974 return 0;
2975}
2976_ACEOF
2977rm -f conftest.$ac_objext
2978if { (ac_try="$ac_compile"
2979case "(($ac_try" in
2980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2981 *) ac_try_echo=$ac_try;;
2982esac
2983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2984 (eval "$ac_compile") 2>conftest.er1
2985 ac_status=$?
2986 grep -v '^ *+' conftest.er1 >conftest.err
2987 rm -f conftest.er1
2988 cat conftest.err >&5
2989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2990 (exit $ac_status); } && {
2991 test -z "$ac_c_werror_flag" ||
2992 test ! -s conftest.err
2993 } && test -s conftest.$ac_objext; then
2994 ac_cv_prog_cc_g=yes
2995else
2996 echo "$as_me: failed program was:" >&5
2997sed 's/^/| /' conftest.$ac_ext >&5
2998
2999
Guido van Rossum627b2d71993-12-24 10:39:16 +00003000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003001
3002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003004
3005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006fi
3007
3008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3009 ac_c_werror_flag=$ac_save_c_werror_flag
3010fi
3011{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3012echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003013if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003014 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003015elif test $ac_cv_prog_cc_g = yes; then
3016 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003017 CFLAGS="-g -O2"
3018 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003019 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020 fi
3021else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003022 if test "$GCC" = yes; then
3023 CFLAGS="-O2"
3024 else
3025 CFLAGS=
3026 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003028{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3029echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3030if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003031 echo $ECHO_N "(cached) $ECHO_C" >&6
3032else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003033 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003034ac_save_CC=$CC
3035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003036/* confdefs.h. */
3037_ACEOF
3038cat confdefs.h >>conftest.$ac_ext
3039cat >>conftest.$ac_ext <<_ACEOF
3040/* end confdefs.h. */
3041#include <stdarg.h>
3042#include <stdio.h>
3043#include <sys/types.h>
3044#include <sys/stat.h>
3045/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3046struct buf { int x; };
3047FILE * (*rcsopen) (struct buf *, struct stat *, int);
3048static char *e (p, i)
3049 char **p;
3050 int i;
3051{
3052 return p[i];
3053}
3054static char *f (char * (*g) (char **, int), char **p, ...)
3055{
3056 char *s;
3057 va_list v;
3058 va_start (v,p);
3059 s = g (p, va_arg (v,int));
3060 va_end (v);
3061 return s;
3062}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003063
3064/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3065 function prototypes and stuff, but not '\xHH' hex character constants.
3066 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003068 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3069 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003070 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003071int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3072
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3074 inside strings and character constants. */
3075#define FOO(x) 'x'
3076int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3077
Skip Montanaro6dead952003-09-25 14:50:04 +00003078int test (int i, double x);
3079struct s1 {int (*f) (int a);};
3080struct s2 {int (*f) (double a);};
3081int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3082int argc;
3083char **argv;
3084int
3085main ()
3086{
3087return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3088 ;
3089 return 0;
3090}
3091_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3093 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003094do
3095 CC="$ac_save_CC $ac_arg"
3096 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003097if { (ac_try="$ac_compile"
3098case "(($ac_try" in
3099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3100 *) ac_try_echo=$ac_try;;
3101esac
3102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3103 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003105 grep -v '^ *+' conftest.er1 >conftest.err
3106 rm -f conftest.er1
3107 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003109 (exit $ac_status); } && {
3110 test -z "$ac_c_werror_flag" ||
3111 test ! -s conftest.err
3112 } && test -s conftest.$ac_objext; then
3113 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003114else
3115 echo "$as_me: failed program was:" >&5
3116sed 's/^/| /' conftest.$ac_ext >&5
3117
Martin v. Löwiseba40652007-08-30 20:10:57 +00003118
Skip Montanaro6dead952003-09-25 14:50:04 +00003119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003120
3121rm -f core conftest.err conftest.$ac_objext
3122 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003123done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003124rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003125CC=$ac_save_CC
3126
3127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128# AC_CACHE_VAL
3129case "x$ac_cv_prog_cc_c89" in
3130 x)
3131 { echo "$as_me:$LINENO: result: none needed" >&5
3132echo "${ECHO_T}none needed" >&6; } ;;
3133 xno)
3134 { echo "$as_me:$LINENO: result: unsupported" >&5
3135echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003136 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003137 CC="$CC $ac_cv_prog_cc_c89"
3138 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3139echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003140esac
3141
Skip Montanaro6dead952003-09-25 14:50:04 +00003142
Martin v. Löwis11437992002-04-12 09:54:03 +00003143ac_ext=c
3144ac_cpp='$CPP $CPPFLAGS'
3145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3147ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003149
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003150
3151
Martin v. Löwiseba40652007-08-30 20:10:57 +00003152{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3153echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003154
Martin v. Löwiseba40652007-08-30 20:10:57 +00003155# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003156if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003157 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003158
3159 case $withval in
3160 no) with_cxx_main=no
3161 MAINCC='$(CC)';;
3162 yes) with_cxx_main=yes
3163 MAINCC='$(CXX)';;
3164 *) with_cxx_main=yes
3165 MAINCC=$withval
3166 if test -z "$CXX"
3167 then
3168 CXX=$withval
3169 fi;;
3170 esac
3171else
3172
3173 with_cxx_main=no
3174 MAINCC='$(CC)'
3175
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176fi
3177
3178{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3179echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003180
3181preset_cxx="$CXX"
3182if test -z "$CXX"
3183then
3184 case "$CC" in
3185 gcc) # Extract the first word of "g++", so it can be a program name with args.
3186set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3188echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003189if test "${ac_cv_path_CXX+set}" = set; then
3190 echo $ECHO_N "(cached) $ECHO_C" >&6
3191else
3192 case $CXX in
3193 [\\/]* | ?:[\\/]*)
3194 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3195 ;;
3196 *)
3197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3198for as_dir in notfound
3199do
3200 IFS=$as_save_IFS
3201 test -z "$as_dir" && as_dir=.
3202 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003203 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003204 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3205 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3206 break 2
3207 fi
3208done
3209done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003211
3212 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3213 ;;
3214esac
3215fi
3216CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003217if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218 { echo "$as_me:$LINENO: result: $CXX" >&5
3219echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003220else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221 { echo "$as_me:$LINENO: result: no" >&5
3222echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003224
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003225 ;;
3226 cc) # Extract the first word of "c++", so it can be a program name with args.
3227set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3229echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003230if test "${ac_cv_path_CXX+set}" = set; then
3231 echo $ECHO_N "(cached) $ECHO_C" >&6
3232else
3233 case $CXX in
3234 [\\/]* | ?:[\\/]*)
3235 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3236 ;;
3237 *)
3238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239for as_dir in notfound
3240do
3241 IFS=$as_save_IFS
3242 test -z "$as_dir" && as_dir=.
3243 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003245 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3247 break 2
3248 fi
3249done
3250done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003252
3253 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3254 ;;
3255esac
3256fi
3257CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003258if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003259 { echo "$as_me:$LINENO: result: $CXX" >&5
3260echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003261else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262 { echo "$as_me:$LINENO: result: no" >&5
3263echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003265
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003266 ;;
3267 esac
3268 if test "$CXX" = "notfound"
3269 then
3270 CXX=""
3271 fi
3272fi
3273if test -z "$CXX"
3274then
3275 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3276do
3277 # Extract the first word of "$ac_prog", so it can be a program name with args.
3278set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003281if test "${ac_cv_prog_CXX+set}" = set; then
3282 echo $ECHO_N "(cached) $ECHO_C" >&6
3283else
3284 if test -n "$CXX"; then
3285 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3286else
3287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3288for as_dir in $PATH
3289do
3290 IFS=$as_save_IFS
3291 test -z "$as_dir" && as_dir=.
3292 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003294 ac_cv_prog_CXX="$ac_prog"
3295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3296 break 2
3297 fi
3298done
3299done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003300IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301
3302fi
3303fi
3304CXX=$ac_cv_prog_CXX
3305if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 { echo "$as_me:$LINENO: result: $CXX" >&5
3307echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003308else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003309 { echo "$as_me:$LINENO: result: no" >&5
3310echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003311fi
3312
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003314 test -n "$CXX" && break
3315done
3316test -n "$CXX" || CXX="notfound"
3317
3318 if test "$CXX" = "notfound"
3319 then
3320 CXX=""
3321 fi
3322fi
3323if test "$preset_cxx" != "$CXX"
3324then
3325 { echo "$as_me:$LINENO: WARNING:
3326
3327 By default, distutils will build C++ extension modules with \"$CXX\".
3328 If this is not intended, then set CXX on the configure command line.
3329 " >&5
3330echo "$as_me: WARNING:
3331
3332 By default, distutils will build C++ extension modules with \"$CXX\".
3333 If this is not intended, then set CXX on the configure command line.
3334 " >&2;}
3335fi
3336
3337
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003338# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003339
3340ac_ext=c
3341ac_cpp='$CPP $CPPFLAGS'
3342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3344ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3346echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003347# On Suns, sometimes $CPP names a directory.
3348if test -n "$CPP" && test -d "$CPP"; then
3349 CPP=
3350fi
3351if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003352 if test "${ac_cv_prog_CPP+set}" = set; then
3353 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003354else
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 # Double quotes because CPP needs to be expanded
3356 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3357 do
3358 ac_preproc_ok=false
3359for ac_c_preproc_warn_flag in '' yes
3360do
3361 # Use a header file that comes with gcc, so configuring glibc
3362 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003363 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3364 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003365 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 # not just through cpp. "Syntax error" is here to catch this case.
3367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003368/* confdefs.h. */
3369_ACEOF
3370cat confdefs.h >>conftest.$ac_ext
3371cat >>conftest.$ac_ext <<_ACEOF
3372/* end confdefs.h. */
3373#ifdef __STDC__
3374# include <limits.h>
3375#else
3376# include <assert.h>
3377#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003378 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003379_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003380if { (ac_try="$ac_cpp conftest.$ac_ext"
3381case "(($ac_try" in
3382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3383 *) ac_try_echo=$ac_try;;
3384esac
3385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3386 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003388 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003389 rm -f conftest.er1
3390 cat conftest.err >&5
3391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392 (exit $ac_status); } >/dev/null && {
3393 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3394 test ! -s conftest.err
3395 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003396 :
3397else
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003399sed 's/^/| /' conftest.$ac_ext >&5
3400
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 # Broken: fails on valid input.
3402continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003404
Martin v. Löwis11437992002-04-12 09:54:03 +00003405rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003406
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003408 # can be detected and how.
3409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003410/* confdefs.h. */
3411_ACEOF
3412cat confdefs.h >>conftest.$ac_ext
3413cat >>conftest.$ac_ext <<_ACEOF
3414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003415#include <ac_nonexistent.h>
3416_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003417if { (ac_try="$ac_cpp conftest.$ac_ext"
3418case "(($ac_try" in
3419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3420 *) ac_try_echo=$ac_try;;
3421esac
3422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3423 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003425 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 rm -f conftest.er1
3427 cat conftest.err >&5
3428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429 (exit $ac_status); } >/dev/null && {
3430 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3431 test ! -s conftest.err
3432 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 # Broken: success on invalid input.
3434continue
3435else
3436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003437sed 's/^/| /' conftest.$ac_ext >&5
3438
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # Passes both tests.
3440ac_preproc_ok=:
3441break
3442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444rm -f conftest.err conftest.$ac_ext
3445
3446done
3447# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3448rm -f conftest.err conftest.$ac_ext
3449if $ac_preproc_ok; then
3450 break
3451fi
3452
3453 done
3454 ac_cv_prog_CPP=$CPP
3455
3456fi
3457 CPP=$ac_cv_prog_CPP
3458else
3459 ac_cv_prog_CPP=$CPP
3460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003461{ echo "$as_me:$LINENO: result: $CPP" >&5
3462echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463ac_preproc_ok=false
3464for ac_c_preproc_warn_flag in '' yes
3465do
3466 # Use a header file that comes with gcc, so configuring glibc
3467 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003468 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3469 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 # On the NeXT, cc -E runs the code through the compiler's parser,
3471 # not just through cpp. "Syntax error" is here to catch this case.
3472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003473/* confdefs.h. */
3474_ACEOF
3475cat confdefs.h >>conftest.$ac_ext
3476cat >>conftest.$ac_ext <<_ACEOF
3477/* end confdefs.h. */
3478#ifdef __STDC__
3479# include <limits.h>
3480#else
3481# include <assert.h>
3482#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003483 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003484_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485if { (ac_try="$ac_cpp conftest.$ac_ext"
3486case "(($ac_try" in
3487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488 *) ac_try_echo=$ac_try;;
3489esac
3490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3491 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003493 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 rm -f conftest.er1
3495 cat conftest.err >&5
3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003497 (exit $ac_status); } >/dev/null && {
3498 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3499 test ! -s conftest.err
3500 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 :
3502else
3503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003504sed 's/^/| /' conftest.$ac_ext >&5
3505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # Broken: fails on valid input.
3507continue
3508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510rm -f conftest.err conftest.$ac_ext
3511
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 # can be detected and how.
3514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003515/* confdefs.h. */
3516_ACEOF
3517cat confdefs.h >>conftest.$ac_ext
3518cat >>conftest.$ac_ext <<_ACEOF
3519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003520#include <ac_nonexistent.h>
3521_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522if { (ac_try="$ac_cpp conftest.$ac_ext"
3523case "(($ac_try" in
3524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3525 *) ac_try_echo=$ac_try;;
3526esac
3527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3528 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003530 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 rm -f conftest.er1
3532 cat conftest.err >&5
3533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003534 (exit $ac_status); } >/dev/null && {
3535 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3536 test ! -s conftest.err
3537 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Broken: success on invalid input.
3539continue
3540else
3541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Passes both tests.
3545ac_preproc_ok=:
3546break
3547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003548
Martin v. Löwis11437992002-04-12 09:54:03 +00003549rm -f conftest.err conftest.$ac_ext
3550
3551done
3552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553rm -f conftest.err conftest.$ac_ext
3554if $ac_preproc_ok; then
3555 :
3556else
Skip Montanaro6dead952003-09-25 14:50:04 +00003557 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3558See \`config.log' for more details." >&5
3559echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3560See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 { (exit 1); exit 1; }; }
3562fi
3563
3564ac_ext=c
3565ac_cpp='$CPP $CPPFLAGS'
3566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3568ac_compiler_gnu=$ac_cv_c_compiler_gnu
3569
3570
Martin v. Löwiseba40652007-08-30 20:10:57 +00003571{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3572echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3573if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003574 echo $ECHO_N "(cached) $ECHO_C" >&6
3575else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003576 # Extract the first word of "grep ggrep" to use in msg output
3577if test -z "$GREP"; then
3578set dummy grep ggrep; ac_prog_name=$2
3579if test "${ac_cv_path_GREP+set}" = set; then
3580 echo $ECHO_N "(cached) $ECHO_C" >&6
3581else
3582 ac_path_GREP_found=false
3583# Loop through the user's path and test for each of PROGNAME-LIST
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
3589 for ac_prog in grep ggrep; do
3590 for ac_exec_ext in '' $ac_executable_extensions; do
3591 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3592 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3593 # Check for GNU ac_path_GREP and select it if it is found.
3594 # Check for GNU $ac_path_GREP
3595case `"$ac_path_GREP" --version 2>&1` in
3596*GNU*)
3597 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3598*)
3599 ac_count=0
3600 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3601 while :
3602 do
3603 cat "conftest.in" "conftest.in" >"conftest.tmp"
3604 mv "conftest.tmp" "conftest.in"
3605 cp "conftest.in" "conftest.nl"
3606 echo 'GREP' >> "conftest.nl"
3607 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3608 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3609 ac_count=`expr $ac_count + 1`
3610 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3611 # Best one so far, save it but keep looking for a better one
3612 ac_cv_path_GREP="$ac_path_GREP"
3613 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003614 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615 # 10*(2^10) chars as input seems more than enough
3616 test $ac_count -gt 10 && break
3617 done
3618 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3619esac
3620
3621
3622 $ac_path_GREP_found && break 3
3623 done
3624done
3625
3626done
3627IFS=$as_save_IFS
3628
3629
Skip Montanaro6dead952003-09-25 14:50:04 +00003630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631
3632GREP="$ac_cv_path_GREP"
3633if test -z "$GREP"; then
3634 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3635echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3636 { (exit 1); exit 1; }; }
3637fi
3638
3639else
3640 ac_cv_path_GREP=$GREP
3641fi
3642
3643
3644fi
3645{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3646echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3647 GREP="$ac_cv_path_GREP"
3648
3649
3650{ echo "$as_me:$LINENO: checking for egrep" >&5
3651echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3652if test "${ac_cv_path_EGREP+set}" = set; then
3653 echo $ECHO_N "(cached) $ECHO_C" >&6
3654else
3655 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3656 then ac_cv_path_EGREP="$GREP -E"
3657 else
3658 # Extract the first word of "egrep" to use in msg output
3659if test -z "$EGREP"; then
3660set dummy egrep; ac_prog_name=$2
3661if test "${ac_cv_path_EGREP+set}" = set; then
3662 echo $ECHO_N "(cached) $ECHO_C" >&6
3663else
3664 ac_path_EGREP_found=false
3665# Loop through the user's path and test for each of PROGNAME-LIST
3666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
3671 for ac_prog in egrep; do
3672 for ac_exec_ext in '' $ac_executable_extensions; do
3673 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3674 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3675 # Check for GNU ac_path_EGREP and select it if it is found.
3676 # Check for GNU $ac_path_EGREP
3677case `"$ac_path_EGREP" --version 2>&1` in
3678*GNU*)
3679 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3680*)
3681 ac_count=0
3682 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3683 while :
3684 do
3685 cat "conftest.in" "conftest.in" >"conftest.tmp"
3686 mv "conftest.tmp" "conftest.in"
3687 cp "conftest.in" "conftest.nl"
3688 echo 'EGREP' >> "conftest.nl"
3689 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3690 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3691 ac_count=`expr $ac_count + 1`
3692 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3693 # Best one so far, save it but keep looking for a better one
3694 ac_cv_path_EGREP="$ac_path_EGREP"
3695 ac_path_EGREP_max=$ac_count
3696 fi
3697 # 10*(2^10) chars as input seems more than enough
3698 test $ac_count -gt 10 && break
3699 done
3700 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3701esac
3702
3703
3704 $ac_path_EGREP_found && break 3
3705 done
3706done
3707
3708done
3709IFS=$as_save_IFS
3710
3711
3712fi
3713
3714EGREP="$ac_cv_path_EGREP"
3715if test -z "$EGREP"; then
3716 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3717echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3718 { (exit 1); exit 1; }; }
3719fi
3720
3721else
3722 ac_cv_path_EGREP=$EGREP
3723fi
3724
3725
3726 fi
3727fi
3728{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3729echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3730 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003731
3732
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734{ echo "$as_me:$LINENO: checking for AIX" >&5
3735echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003737/* confdefs.h. */
3738_ACEOF
3739cat confdefs.h >>conftest.$ac_ext
3740cat >>conftest.$ac_ext <<_ACEOF
3741/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003742#ifdef _AIX
3743 yes
3744#endif
3745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003748 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749 { echo "$as_me:$LINENO: result: yes" >&5
3750echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003752#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003753_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003754
3755else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003756 { echo "$as_me:$LINENO: result: no" >&5
3757echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003758fi
3759rm -f conftest*
3760
Michael W. Hudson54241132001-12-07 15:38:26 +00003761
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003762
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003763# Check for unsupported systems
3764case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003765atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003766 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3767 echo See README for details.
3768 exit 1;;
3769esac
3770
Michael W. Hudson54241132001-12-07 15:38:26 +00003771
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3773echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003774
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003776if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003778 case $withval in
3779 no) EXEEXT=;;
3780 yes) EXEEXT=.exe;;
3781 *) EXEEXT=$withval;;
3782 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783fi
3784
3785{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3786echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003787
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003788# Test whether we're running on a non-case-sensitive system, in which
3789# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003790
Martin v. Löwiseba40652007-08-30 20:10:57 +00003791{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3792echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003793if test ! -d CaseSensitiveTestDir; then
3794mkdir CaseSensitiveTestDir
3795fi
3796
3797if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003798then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003799 { echo "$as_me:$LINENO: result: yes" >&5
3800echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003801 BUILDEXEEXT=.exe
3802else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803 { echo "$as_me:$LINENO: result: no" >&5
3804echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003805 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003806fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003807rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003808
Guido van Rossumdd997f71998-10-07 19:58:26 +00003809case $MACHDEP in
3810bsdos*)
3811 case $CC in
3812 gcc) CC="$CC -D_HAVE_BSDI";;
3813 esac;;
3814esac
3815
Guido van Rossum24b1e751997-08-21 02:29:16 +00003816case $ac_sys_system in
3817hp*|HP*)
3818 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003819 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003820 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003821Monterey*)
3822 case $CC in
3823 cc) CC="$CC -Wl,-Bexport";;
3824 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003825SunOS*)
3826 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003827
3828cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003829#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003830_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003831
3832 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003833esac
3834
Michael W. Hudson54241132001-12-07 15:38:26 +00003835
3836
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3838echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003839if test -z "$LIBRARY"
3840then
3841 LIBRARY='libpython$(VERSION).a'
3842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003843{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3844echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003845
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003846# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003847# name of the library into which to insert object files). BLDLIBRARY is also
3848# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3849# is blank as the main program is not linked directly against LDLIBRARY.
3850# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3851# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3852# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3853# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003854#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003855# RUNSHARED is used to run shared python without installed libraries
3856#
3857# INSTSONAME is the name of the shared library that will be use to install
3858# on the system - some systems like version suffix, others don't
3859
3860
Michael W. Hudson54241132001-12-07 15:38:26 +00003861
3862
3863
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003864
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003865LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003866BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003867INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003868DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003869LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003870RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003871
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003872# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003873# If CXX is set, and if it is needed to link a main function that was
3874# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3875# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003876# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003877# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003878
Martin v. Löwiseba40652007-08-30 20:10:57 +00003879{ echo "$as_me:$LINENO: checking LINKCC" >&5
3880echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003881if test -z "$LINKCC"
3882then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003883 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003884 case $ac_sys_system in
3885 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003886 exp_extra="\"\""
3887 if test $ac_sys_release -ge 5 -o \
3888 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3889 exp_extra="."
3890 fi
3891 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003892 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003893 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003894 esac
3895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3897echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003898
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3900echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3901# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003902if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003903 enableval=$enable_shared;
3904fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003905
Martin v. Löwis1142de32002-03-29 16:28:31 +00003906
3907if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003908then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003909 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003910 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003911 enable_shared="yes";;
3912 *)
3913 enable_shared="no";;
3914 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003916{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3917echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003918
Martin v. Löwiseba40652007-08-30 20:10:57 +00003919{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3920echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3921# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003922if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003924 CC="$CC -pg"
3925 if test "$cross_compiling" = yes; then
3926 ac_enable_profiling="no"
3927else
3928 cat >conftest.$ac_ext <<_ACEOF
3929/* confdefs.h. */
3930_ACEOF
3931cat confdefs.h >>conftest.$ac_ext
3932cat >>conftest.$ac_ext <<_ACEOF
3933/* end confdefs.h. */
3934int main() { return 0; }
3935_ACEOF
3936rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003937if { (ac_try="$ac_link"
3938case "(($ac_try" in
3939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3940 *) ac_try_echo=$ac_try;;
3941esac
3942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3943 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003947 { (case "(($ac_try" in
3948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3949 *) ac_try_echo=$ac_try;;
3950esac
3951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3952 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003953 ac_status=$?
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955 (exit $ac_status); }; }; then
3956 ac_enable_profiling="yes"
3957else
3958 echo "$as_me: program exited with status $ac_status" >&5
3959echo "$as_me: failed program was:" >&5
3960sed 's/^/| /' conftest.$ac_ext >&5
3961
3962( exit $ac_status )
3963ac_enable_profiling="no"
3964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003967
3968
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003969 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003970fi
3971
3972{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3973echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003974
3975case "$ac_enable_profiling" in
3976 "yes")
3977 BASECFLAGS="-pg $BASECFLAGS"
3978 LDFLAGS="-pg $LDFLAGS"
3979 ;;
3980esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003981
Martin v. Löwiseba40652007-08-30 20:10:57 +00003982{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3983echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00003984
Guido van Rossumb8552162001-09-05 14:58:11 +00003985# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3986# library that we build, but we do not want to link against it (we
3987# will find it with a -framework option). For this reason there is an
3988# extra variable BLDLIBRARY against which Python and the extension
3989# modules are linked, BLDLIBRARY. This is normally the same as
3990# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003991if test "$enable_framework"
3992then
3993 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003994 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003995 BLDLIBRARY=''
3996else
3997 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003998fi
Jack Jansene578a632001-08-15 01:27:14 +00003999
Martin v. Löwis1142de32002-03-29 16:28:31 +00004000# Other platforms follow
4001if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004002
4003cat >>confdefs.h <<\_ACEOF
4004#define Py_ENABLE_SHARED 1
4005_ACEOF
4006
Martin v. Löwis1142de32002-03-29 16:28:31 +00004007 case $ac_sys_system in
4008 BeOS*)
4009 LDLIBRARY='libpython$(VERSION).so'
4010 ;;
4011 CYGWIN*)
4012 LDLIBRARY='libpython$(VERSION).dll.a'
4013 DLLLIBRARY='libpython$(VERSION).dll'
4014 ;;
4015 SunOS*)
4016 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004017 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004018 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004019 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004020 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004021 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004022 LDLIBRARY='libpython$(VERSION).so'
4023 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004024 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004025 case $ac_sys_system in
4026 FreeBSD*)
4027 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4028 ;;
4029 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004030 INSTSONAME="$LDLIBRARY".$SOVERSION
4031 ;;
4032 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004033 case `uname -m` in
4034 ia64)
4035 LDLIBRARY='libpython$(VERSION).so'
4036 ;;
4037 *)
4038 LDLIBRARY='libpython$(VERSION).sl'
4039 ;;
4040 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004041 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004042 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004043 ;;
4044 OSF*)
4045 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004046 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004047 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004048 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004049 atheos*)
4050 LDLIBRARY='libpython$(VERSION).so'
4051 BLDLIBRARY='-L. -lpython$(VERSION)'
4052 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4053 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004054 esac
Jason Tishler30765592003-09-04 11:04:06 +00004055else # shared is disabled
4056 case $ac_sys_system in
4057 CYGWIN*)
4058 BLDLIBRARY='$(LIBRARY)'
4059 LDLIBRARY='libpython$(VERSION).dll.a'
4060 ;;
4061 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004062fi
4063
Martin v. Löwiseba40652007-08-30 20:10:57 +00004064{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4065echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004066
Martin v. Löwis11437992002-04-12 09:54:03 +00004067if test -n "$ac_tool_prefix"; then
4068 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4069set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004070{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4071echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004072if test "${ac_cv_prog_RANLIB+set}" = set; then
4073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074else
4075 if test -n "$RANLIB"; then
4076 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4077else
Martin v. Löwis11437992002-04-12 09:54:03 +00004078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4079for as_dir in $PATH
4080do
4081 IFS=$as_save_IFS
4082 test -z "$as_dir" && as_dir=.
4083 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4086 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4087 break 2
4088 fi
4089done
4090done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004091IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004092
Guido van Rossum627b2d71993-12-24 10:39:16 +00004093fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004095RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004097 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4098echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004100 { echo "$as_me:$LINENO: result: no" >&5
4101echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004102fi
4103
Martin v. Löwiseba40652007-08-30 20:10:57 +00004104
Martin v. Löwis11437992002-04-12 09:54:03 +00004105fi
4106if test -z "$ac_cv_prog_RANLIB"; then
4107 ac_ct_RANLIB=$RANLIB
4108 # Extract the first word of "ranlib", so it can be a program name with args.
4109set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004110{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4111echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004112if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4113 echo $ECHO_N "(cached) $ECHO_C" >&6
4114else
4115 if test -n "$ac_ct_RANLIB"; then
4116 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4117else
4118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4119for as_dir in $PATH
4120do
4121 IFS=$as_save_IFS
4122 test -z "$as_dir" && as_dir=.
4123 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 ac_cv_prog_ac_ct_RANLIB="ranlib"
4126 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4127 break 2
4128 fi
4129done
4130done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004131IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004132
Martin v. Löwis11437992002-04-12 09:54:03 +00004133fi
4134fi
4135ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4136if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4138echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004139else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004140 { echo "$as_me:$LINENO: result: no" >&5
4141echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004142fi
4143
Martin v. Löwiseba40652007-08-30 20:10:57 +00004144 if test "x$ac_ct_RANLIB" = x; then
4145 RANLIB=":"
4146 else
4147 case $cross_compiling:$ac_tool_warned in
4148yes:)
4149{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4150whose name does not start with the host triplet. If you think this
4151configuration is useful to you, please write to autoconf@gnu.org." >&5
4152echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4153whose name does not start with the host triplet. If you think this
4154configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4155ac_tool_warned=yes ;;
4156esac
4157 RANLIB=$ac_ct_RANLIB
4158 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159else
4160 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004162
4163
Guido van Rossum7f43da71994-08-01 12:15:30 +00004164for ac_prog in ar aal
4165do
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4169echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004170if test "${ac_cv_prog_AR+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else
4173 if test -n "$AR"; then
4174 ac_cv_prog_AR="$AR" # Let the user override the test.
4175else
Martin v. Löwis11437992002-04-12 09:54:03 +00004176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177for as_dir in $PATH
4178do
4179 IFS=$as_save_IFS
4180 test -z "$as_dir" && as_dir=.
4181 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 ac_cv_prog_AR="$ac_prog"
4184 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4185 break 2
4186 fi
4187done
4188done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004190
Guido van Rossum7f43da71994-08-01 12:15:30 +00004191fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004193AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195 { echo "$as_me:$LINENO: result: $AR" >&5
4196echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004198 { echo "$as_me:$LINENO: result: no" >&5
4199echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004201
Martin v. Löwiseba40652007-08-30 20:10:57 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004204done
4205test -n "$AR" || AR="ar"
4206
Michael W. Hudson54241132001-12-07 15:38:26 +00004207
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004208
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004209# Extract the first word of "svnversion", so it can be a program name with args.
4210set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004211{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004213if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4214 echo $ECHO_N "(cached) $ECHO_C" >&6
4215else
4216 if test -n "$SVNVERSION"; then
4217 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4218else
4219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220for as_dir in $PATH
4221do
4222 IFS=$as_save_IFS
4223 test -z "$as_dir" && as_dir=.
4224 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004226 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004227 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4228 break 2
4229 fi
4230done
4231done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004232IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004233
Martin v. Löwisff600232006-04-03 19:12:32 +00004234 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004235fi
4236fi
4237SVNVERSION=$ac_cv_prog_SVNVERSION
4238if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4240echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004241else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242 { echo "$as_me:$LINENO: result: no" >&5
4243echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004244fi
4245
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004247if test $SVNVERSION = found
4248then
4249 SVNVERSION="svnversion \$(srcdir)"
4250else
4251 SVNVERSION="echo exported"
4252fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004253
Neil Schemenauera42c8272001-03-31 00:01:55 +00004254case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004255bsdos*|hp*|HP*)
4256 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004257 if test -z "$INSTALL"
4258 then
4259 INSTALL="${srcdir}/install-sh -c"
4260 fi
4261esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004262ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004263for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4264 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004265 ac_aux_dir=$ac_dir
4266 ac_install_sh="$ac_aux_dir/install-sh -c"
4267 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004268 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004269 ac_aux_dir=$ac_dir
4270 ac_install_sh="$ac_aux_dir/install.sh -c"
4271 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 ac_aux_dir=$ac_dir
4274 ac_install_sh="$ac_aux_dir/shtool install -c"
4275 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004276 fi
4277done
4278if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4280echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283
4284# These three variables are undocumented and unsupported,
4285# and are intended to be withdrawn in a future Autoconf release.
4286# They can cause serious problems if a builder's source tree is in a directory
4287# whose full name contains unusual characters.
4288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4291
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004292
4293# Find a good install program. We prefer a C program (faster),
4294# so one script is as good as another. But avoid the broken or
4295# incompatible versions:
4296# SysV /etc/install, /usr/sbin/install
4297# SunOS /usr/etc/install
4298# IRIX /sbin/install
4299# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004300# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004305# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4307echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004308if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004309if test "${ac_cv_path_install+set}" = set; then
4310 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004311else
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4313for as_dir in $PATH
4314do
4315 IFS=$as_save_IFS
4316 test -z "$as_dir" && as_dir=.
4317 # Account for people who put trailing slashes in PATH elements.
4318case $as_dir/ in
4319 ./ | .// | /cC/* | \
4320 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004322 /usr/ucb/* ) ;;
4323 *)
4324 # OSF1 and SCO ODT 3.0 have their own names for install.
4325 # Don't use installbsd from OSF since it installs stuff as root
4326 # by default.
4327 for ac_prog in ginstall scoinst install; do
4328 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004329 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00004330 if test $ac_prog = install &&
4331 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4332 # AIX install. It has an incompatible calling convention.
4333 :
4334 elif test $ac_prog = install &&
4335 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4336 # program-specific install script used by HP pwplus--don't use.
4337 :
4338 else
4339 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4340 break 3
4341 fi
4342 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004343 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 done
4345 ;;
4346esac
4347done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004348IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004349
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004350
4351fi
4352 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004353 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004354 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004355 # As a last resort, use the slow shell script. Don't cache a
4356 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004357 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004358 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360 fi
4361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004362{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4363echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004364
4365# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4366# It thinks the first close brace ends the variable substitution.
4367test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4368
Martin v. Löwis11437992002-04-12 09:54:03 +00004369test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004370
4371test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4372
Michael W. Hudson54241132001-12-07 15:38:26 +00004373
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004374# Not every filesystem supports hard links
4375
4376if test -z "$LN" ; then
4377 case $ac_sys_system in
4378 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004379 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004380 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004381 *) LN=ln;;
4382 esac
4383fi
4384
Fred Drake109d9862001-07-11 06:27:56 +00004385# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4387echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004388
Martin v. Löwiseba40652007-08-30 20:10:57 +00004389# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004390if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004392if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004393then
4394
4395cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004396#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004397_ACEOF
4398
Martin v. Löwiseba40652007-08-30 20:10:57 +00004399 { echo "$as_me:$LINENO: result: yes" >&5
4400echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004401 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402else { echo "$as_me:$LINENO: result: no" >&5
4403echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004404fi
4405else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004406 { echo "$as_me:$LINENO: result: no" >&5
4407echo "${ECHO_T}no" >&6; }
4408fi
4409
Fred Drake109d9862001-07-11 06:27:56 +00004410
Skip Montanarodecc6a42003-01-01 20:07:49 +00004411# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4412# merged with this chunk of code?
4413
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004414# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004415# ------------------------
4416# (The following bit of code is complicated enough - please keep things
4417# indented properly. Just pretend you're editing Python code. ;-)
4418
4419# There are two parallel sets of case statements below, one that checks to
4420# see if OPT was set and one that does BASECFLAGS setting based upon
4421# compiler and platform. BASECFLAGS tweaks need to be made even if the
4422# user set OPT.
4423
4424# tweak OPT based on compiler and platform, only if the user didn't set
4425# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004426
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004427if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004428then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004429 case $GCC in
4430 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004431 if test "$CC" != 'g++' ; then
4432 STRICT_PROTO="-Wstrict-prototypes"
4433 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004434 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4435 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4436 WRAP="-fwrapv"
4437 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004438 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004439 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004440 if test "$Py_DEBUG" = 'true' ; then
4441 # Optimization messes up debuggers, so turn it off for
4442 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004443 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004444 else
Thomas Hellere5529592007-12-13 21:20:29 +00004445 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004446 fi
4447 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004448 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004449 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004450 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004451 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004452 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004453 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4454 ;;
4455 esac
Fred Drake109d9862001-07-11 06:27:56 +00004456 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004457
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004458 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004459 OPT="-O"
4460 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004461 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004462
4463 # The current (beta) Monterey compiler dies with optimizations
4464 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004465 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004466 Monterey*)
4467 OPT=""
4468 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004469 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004470
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004471fi
4472
Skip Montanarodecc6a42003-01-01 20:07:49 +00004473
4474# tweak BASECFLAGS based on compiler and platform
4475case $GCC in
4476yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004477 # Python violates C99 rules, by casting between incompatible
4478 # pointer types. GCC may generate bad code as a result of that,
4479 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4481echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004482 ac_save_cc="$CC"
4483 CC="$CC -fno-strict-aliasing"
4484 if test "$cross_compiling" = yes; then
4485 ac_cv_no_strict_aliasing_ok=no
4486else
4487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004488/* confdefs.h. */
4489_ACEOF
4490cat confdefs.h >>conftest.$ac_ext
4491cat >>conftest.$ac_ext <<_ACEOF
4492/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004493int main() { return 0; }
4494_ACEOF
4495rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004496if { (ac_try="$ac_link"
4497case "(($ac_try" in
4498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4499 *) ac_try_echo=$ac_try;;
4500esac
4501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4502 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004503 ac_status=$?
4504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004506 { (case "(($ac_try" in
4507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4508 *) ac_try_echo=$ac_try;;
4509esac
4510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4511 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004512 ac_status=$?
4513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514 (exit $ac_status); }; }; then
4515 ac_cv_no_strict_aliasing_ok=yes
4516else
4517 echo "$as_me: program exited with status $ac_status" >&5
4518echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004519sed 's/^/| /' conftest.$ac_ext >&5
4520
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004521( exit $ac_status )
4522ac_cv_no_strict_aliasing_ok=no
4523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004526
4527
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004528 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004529 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4530echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004531 if test $ac_cv_no_strict_aliasing_ok = yes
4532 then
4533 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4534 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004535 case $ac_sys_system in
4536 SCO_SV*)
4537 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4538 ;;
4539 # is there any other compiler on Darwin besides gcc?
4540 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004541 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4542 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren988117f2006-04-29 11:31:35 +00004543 if test "${enable_universalsdk}"; then
4544 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4545 fi
4546
Skip Montanarodecc6a42003-01-01 20:07:49 +00004547 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004548 OSF*)
4549 BASECFLAGS="$BASECFLAGS -mieee"
4550 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004551 esac
4552 ;;
4553
4554*)
4555 case $ac_sys_system in
4556 OpenUNIX*|UnixWare*)
4557 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4558 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004559 OSF*)
4560 BASECFLAGS="$BASECFLAGS -ieee -std"
4561 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004562 SCO_SV*)
4563 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4564 ;;
4565 esac
4566 ;;
4567esac
4568
Fred Drakee1ceaa02001-12-04 20:55:47 +00004569if test "$Py_DEBUG" = 'true'; then
4570 :
4571else
4572 OPT="-DNDEBUG $OPT"
4573fi
4574
Guido van Rossum563e7081996-09-10 18:20:48 +00004575if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004576then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004577 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004578fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004579
Neal Norwitz020c46a2006-01-07 21:39:28 +00004580# disable check for icc since it seems to pass, but generates a warning
4581if test "$CC" = icc
4582then
4583 ac_cv_opt_olimit_ok=no
4584fi
4585
Martin v. Löwiseba40652007-08-30 20:10:57 +00004586{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4587echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004588if test "${ac_cv_opt_olimit_ok+set}" = set; then
4589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004590else
4591 ac_save_cc="$CC"
4592CC="$CC -OPT:Olimit=0"
4593if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004594 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004595else
Martin v. Löwis11437992002-04-12 09:54:03 +00004596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004597/* confdefs.h. */
4598_ACEOF
4599cat confdefs.h >>conftest.$ac_ext
4600cat >>conftest.$ac_ext <<_ACEOF
4601/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004602int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004603_ACEOF
4604rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004605if { (ac_try="$ac_link"
4606case "(($ac_try" in
4607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4608 *) ac_try_echo=$ac_try;;
4609esac
4610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4611 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004612 ac_status=$?
4613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4614 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004615 { (case "(($ac_try" in
4616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4617 *) ac_try_echo=$ac_try;;
4618esac
4619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4620 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004621 ac_status=$?
4622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4623 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004624 ac_cv_opt_olimit_ok=yes
4625else
Martin v. Löwis11437992002-04-12 09:54:03 +00004626 echo "$as_me: program exited with status $ac_status" >&5
4627echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004628sed 's/^/| /' conftest.$ac_ext >&5
4629
Martin v. Löwis11437992002-04-12 09:54:03 +00004630( exit $ac_status )
4631ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004633rm -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 +00004634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004635
4636
Guido van Rossum91922671997-10-09 20:24:13 +00004637CC="$ac_save_cc"
4638fi
4639
Martin v. Löwiseba40652007-08-30 20:10:57 +00004640{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4641echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004642if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004643 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004644 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4645 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4646 # environment?
4647 Darwin*)
4648 ;;
4649 *)
4650 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4651 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004652 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004653else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004654 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4655echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004656 if test "${ac_cv_olimit_ok+set}" = set; then
4657 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004658else
4659 ac_save_cc="$CC"
4660 CC="$CC -Olimit 1500"
4661 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004662 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004663else
Martin v. Löwis11437992002-04-12 09:54:03 +00004664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004665/* confdefs.h. */
4666_ACEOF
4667cat confdefs.h >>conftest.$ac_ext
4668cat >>conftest.$ac_ext <<_ACEOF
4669/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004670int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004671_ACEOF
4672rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004673if { (ac_try="$ac_link"
4674case "(($ac_try" in
4675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4676 *) ac_try_echo=$ac_try;;
4677esac
4678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4679 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004680 ac_status=$?
4681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004683 { (case "(($ac_try" in
4684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4685 *) ac_try_echo=$ac_try;;
4686esac
4687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4688 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004689 ac_status=$?
4690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4691 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004692 ac_cv_olimit_ok=yes
4693else
Martin v. Löwis11437992002-04-12 09:54:03 +00004694 echo "$as_me: program exited with status $ac_status" >&5
4695echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004696sed 's/^/| /' conftest.$ac_ext >&5
4697
Martin v. Löwis11437992002-04-12 09:54:03 +00004698( exit $ac_status )
4699ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004701rm -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 +00004702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004703
4704
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004705 CC="$ac_save_cc"
4706fi
4707
Martin v. Löwiseba40652007-08-30 20:10:57 +00004708 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4709echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004710 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004711 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004712 fi
4713fi
4714
Martin v. Löwisaac13162006-10-19 10:58:46 +00004715# Check whether GCC supports PyArg_ParseTuple format
4716if test "$GCC" = "yes"
4717then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004718 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4719echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004720 save_CFLAGS=$CFLAGS
4721 CFLAGS="$CFLAGS -Werror"
4722 cat >conftest.$ac_ext <<_ACEOF
4723/* confdefs.h. */
4724_ACEOF
4725cat confdefs.h >>conftest.$ac_ext
4726cat >>conftest.$ac_ext <<_ACEOF
4727/* end confdefs.h. */
4728
4729 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4730
4731int
4732main ()
4733{
4734
4735 ;
4736 return 0;
4737}
4738_ACEOF
4739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004740if { (ac_try="$ac_compile"
4741case "(($ac_try" in
4742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4743 *) ac_try_echo=$ac_try;;
4744esac
4745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004747 ac_status=$?
4748 grep -v '^ *+' conftest.er1 >conftest.err
4749 rm -f conftest.er1
4750 cat conftest.err >&5
4751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004752 (exit $ac_status); } && {
4753 test -z "$ac_c_werror_flag" ||
4754 test ! -s conftest.err
4755 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004756
4757cat >>confdefs.h <<\_ACEOF
4758#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4759_ACEOF
4760
Martin v. Löwiseba40652007-08-30 20:10:57 +00004761 { echo "$as_me:$LINENO: result: yes" >&5
4762echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004763else
4764 echo "$as_me: failed program was:" >&5
4765sed 's/^/| /' conftest.$ac_ext >&5
4766
Martin v. Löwiseba40652007-08-30 20:10:57 +00004767 { echo "$as_me:$LINENO: result: no" >&5
4768echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004769
4770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004771
4772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004773 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004774fi
4775
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004776# On some compilers, pthreads are available without further options
4777# (e.g. MacOS X). On some of these systems, the compiler will not
4778# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4779# So we have to see first whether pthreads are available without
4780# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004781{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4782echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004783if test "${ac_cv_pthread_is_default+set}" = set; then
4784 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004785else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004786 if test "$cross_compiling" = yes; then
4787 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004788else
Martin v. Löwis11437992002-04-12 09:54:03 +00004789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004790/* confdefs.h. */
4791_ACEOF
4792cat confdefs.h >>conftest.$ac_ext
4793cat >>conftest.$ac_ext <<_ACEOF
4794/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004795
Martin v. Löwis130fb172001-07-19 11:00:41 +00004796#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004797
4798void* routine(void* p){return NULL;}
4799
4800int main(){
4801 pthread_t p;
4802 if(pthread_create(&p,NULL,routine,NULL)!=0)
4803 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004804 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004805 return 0;
4806}
4807
Martin v. Löwis11437992002-04-12 09:54:03 +00004808_ACEOF
4809rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004810if { (ac_try="$ac_link"
4811case "(($ac_try" in
4812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4813 *) ac_try_echo=$ac_try;;
4814esac
4815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4816 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004817 ac_status=$?
4818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4819 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004820 { (case "(($ac_try" in
4821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4822 *) ac_try_echo=$ac_try;;
4823esac
4824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4825 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004826 ac_status=$?
4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4828 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004829
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004830 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004831 ac_cv_kthread=no
4832 ac_cv_pthread=no
4833
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004834else
Martin v. Löwis11437992002-04-12 09:54:03 +00004835 echo "$as_me: program exited with status $ac_status" >&5
4836echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004837sed 's/^/| /' conftest.$ac_ext >&5
4838
Martin v. Löwis11437992002-04-12 09:54:03 +00004839( exit $ac_status )
4840ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004842rm -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 +00004843fi
4844
Martin v. Löwiseba40652007-08-30 20:10:57 +00004845
4846
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004847fi
4848
Martin v. Löwiseba40652007-08-30 20:10:57 +00004849{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4850echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004851
Michael W. Hudson54241132001-12-07 15:38:26 +00004852
Martin v. Löwis11437992002-04-12 09:54:03 +00004853if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004854then
4855 ac_cv_kpthread=no
4856else
4857# -Kpthread, if available, provides the right #defines
4858# and linker options to make pthread_create available
4859# Some compilers won't report that they do not support -Kpthread,
4860# so we need to run a program to see whether it really made the
4861# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004862{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4863echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004864if test "${ac_cv_kpthread+set}" = set; then
4865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004866else
4867 ac_save_cc="$CC"
4868CC="$CC -Kpthread"
4869if test "$cross_compiling" = yes; then
4870 ac_cv_kpthread=no
4871else
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004873/* confdefs.h. */
4874_ACEOF
4875cat confdefs.h >>conftest.$ac_ext
4876cat >>conftest.$ac_ext <<_ACEOF
4877/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004878
4879#include <pthread.h>
4880
4881void* routine(void* p){return NULL;}
4882
4883int main(){
4884 pthread_t p;
4885 if(pthread_create(&p,NULL,routine,NULL)!=0)
4886 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004887 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004888 return 0;
4889}
4890
Martin v. Löwis11437992002-04-12 09:54:03 +00004891_ACEOF
4892rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004893if { (ac_try="$ac_link"
4894case "(($ac_try" in
4895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4896 *) ac_try_echo=$ac_try;;
4897esac
4898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4899 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004900 ac_status=$?
4901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4902 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004903 { (case "(($ac_try" in
4904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4905 *) ac_try_echo=$ac_try;;
4906esac
4907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4908 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004909 ac_status=$?
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4911 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004912 ac_cv_kpthread=yes
4913else
Martin v. Löwis11437992002-04-12 09:54:03 +00004914 echo "$as_me: program exited with status $ac_status" >&5
4915echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004916sed 's/^/| /' conftest.$ac_ext >&5
4917
Martin v. Löwis11437992002-04-12 09:54:03 +00004918( exit $ac_status )
4919ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004921rm -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 +00004922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004923
4924
Martin v. Löwis130fb172001-07-19 11:00:41 +00004925CC="$ac_save_cc"
4926fi
4927
Martin v. Löwiseba40652007-08-30 20:10:57 +00004928{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4929echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004930fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004931
Skip Montanarod8d39a02003-07-10 20:44:10 +00004932if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004933then
4934# -Kthread, if available, provides the right #defines
4935# and linker options to make pthread_create available
4936# Some compilers won't report that they do not support -Kthread,
4937# so we need to run a program to see whether it really made the
4938# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004939{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4940echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004941if test "${ac_cv_kthread+set}" = set; then
4942 echo $ECHO_N "(cached) $ECHO_C" >&6
4943else
4944 ac_save_cc="$CC"
4945CC="$CC -Kthread"
4946if test "$cross_compiling" = yes; then
4947 ac_cv_kthread=no
4948else
4949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004950/* confdefs.h. */
4951_ACEOF
4952cat confdefs.h >>conftest.$ac_ext
4953cat >>conftest.$ac_ext <<_ACEOF
4954/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004955
4956#include <pthread.h>
4957
4958void* routine(void* p){return NULL;}
4959
4960int main(){
4961 pthread_t p;
4962 if(pthread_create(&p,NULL,routine,NULL)!=0)
4963 return 1;
4964 (void)pthread_detach(p);
4965 return 0;
4966}
4967
4968_ACEOF
4969rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004970if { (ac_try="$ac_link"
4971case "(($ac_try" in
4972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4973 *) ac_try_echo=$ac_try;;
4974esac
4975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4976 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004977 ac_status=$?
4978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004980 { (case "(($ac_try" in
4981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4982 *) ac_try_echo=$ac_try;;
4983esac
4984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4985 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004986 ac_status=$?
4987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4988 (exit $ac_status); }; }; then
4989 ac_cv_kthread=yes
4990else
4991 echo "$as_me: program exited with status $ac_status" >&5
4992echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004993sed 's/^/| /' conftest.$ac_ext >&5
4994
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004995( exit $ac_status )
4996ac_cv_kthread=no
4997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004998rm -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 +00004999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005000
5001
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005002CC="$ac_save_cc"
5003fi
5004
Martin v. Löwiseba40652007-08-30 20:10:57 +00005005{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5006echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005007fi
5008
Skip Montanarod8d39a02003-07-10 20:44:10 +00005009if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005010then
5011# -pthread, if available, provides the right #defines
5012# and linker options to make pthread_create available
5013# Some compilers won't report that they do not support -pthread,
5014# so we need to run a program to see whether it really made the
5015# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005016{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5017echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005018if test "${ac_cv_thread+set}" = set; then
5019 echo $ECHO_N "(cached) $ECHO_C" >&6
5020else
5021 ac_save_cc="$CC"
5022CC="$CC -pthread"
5023if test "$cross_compiling" = yes; then
5024 ac_cv_pthread=no
5025else
5026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005027/* confdefs.h. */
5028_ACEOF
5029cat confdefs.h >>conftest.$ac_ext
5030cat >>conftest.$ac_ext <<_ACEOF
5031/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005032
5033#include <pthread.h>
5034
5035void* routine(void* p){return NULL;}
5036
5037int main(){
5038 pthread_t p;
5039 if(pthread_create(&p,NULL,routine,NULL)!=0)
5040 return 1;
5041 (void)pthread_detach(p);
5042 return 0;
5043}
5044
5045_ACEOF
5046rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005047if { (ac_try="$ac_link"
5048case "(($ac_try" in
5049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5050 *) ac_try_echo=$ac_try;;
5051esac
5052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5053 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005054 ac_status=$?
5055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005057 { (case "(($ac_try" in
5058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5059 *) ac_try_echo=$ac_try;;
5060esac
5061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5062 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005063 ac_status=$?
5064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065 (exit $ac_status); }; }; then
5066 ac_cv_pthread=yes
5067else
5068 echo "$as_me: program exited with status $ac_status" >&5
5069echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005070sed 's/^/| /' conftest.$ac_ext >&5
5071
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005072( exit $ac_status )
5073ac_cv_pthread=no
5074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005075rm -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 +00005076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005077
5078
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005079CC="$ac_save_cc"
5080fi
5081
Martin v. Löwiseba40652007-08-30 20:10:57 +00005082{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5083echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005084fi
5085
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005086# If we have set a CC compiler flag for thread support then
5087# check if it works for CXX, too.
5088ac_cv_cxx_thread=no
5089if test ! -z "$CXX"
5090then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005091{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5092echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005093ac_save_cxx="$CXX"
5094
5095if test "$ac_cv_kpthread" = "yes"
5096then
5097 CXX="$CXX -Kpthread"
5098 ac_cv_cxx_thread=yes
5099elif test "$ac_cv_kthread" = "yes"
5100then
5101 CXX="$CXX -Kthread"
5102 ac_cv_cxx_thread=yes
5103elif test "$ac_cv_pthread" = "yes"
5104then
5105 CXX="$CXX -pthread"
5106 ac_cv_cxx_thread=yes
5107fi
5108
5109if test $ac_cv_cxx_thread = yes
5110then
5111 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5112 $CXX -c conftest.$ac_ext 2>&5
5113 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5114 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5115 then
5116 ac_cv_cxx_thread=yes
5117 else
5118 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005119 fi
5120 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005122{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5123echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005124fi
5125CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005126
Michael W. Hudson54241132001-12-07 15:38:26 +00005127
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005128# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005129{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5130echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005131if test "${ac_cv_header_stdc+set}" = set; then
5132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005133else
Martin v. Löwis11437992002-04-12 09:54:03 +00005134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005135/* confdefs.h. */
5136_ACEOF
5137cat confdefs.h >>conftest.$ac_ext
5138cat >>conftest.$ac_ext <<_ACEOF
5139/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005140#include <stdlib.h>
5141#include <stdarg.h>
5142#include <string.h>
5143#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005144
Skip Montanaro6dead952003-09-25 14:50:04 +00005145int
5146main ()
5147{
5148
5149 ;
5150 return 0;
5151}
Martin v. Löwis11437992002-04-12 09:54:03 +00005152_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005153rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005154if { (ac_try="$ac_compile"
5155case "(($ac_try" in
5156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5157 *) ac_try_echo=$ac_try;;
5158esac
5159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5160 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005162 grep -v '^ *+' conftest.er1 >conftest.err
5163 rm -f conftest.er1
5164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005166 (exit $ac_status); } && {
5167 test -z "$ac_c_werror_flag" ||
5168 test ! -s conftest.err
5169 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005170 ac_cv_header_stdc=yes
5171else
Martin v. Löwis11437992002-04-12 09:54:03 +00005172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005173sed 's/^/| /' conftest.$ac_ext >&5
5174
Martin v. Löwiseba40652007-08-30 20:10:57 +00005175 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005177
5178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005179
5180if test $ac_cv_header_stdc = yes; then
5181 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005183/* confdefs.h. */
5184_ACEOF
5185cat confdefs.h >>conftest.$ac_ext
5186cat >>conftest.$ac_ext <<_ACEOF
5187/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005188#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005189
5190_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005192 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005193 :
5194else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005195 ac_cv_header_stdc=no
5196fi
5197rm -f conftest*
5198
5199fi
5200
5201if test $ac_cv_header_stdc = yes; then
5202 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005204/* confdefs.h. */
5205_ACEOF
5206cat confdefs.h >>conftest.$ac_ext
5207cat >>conftest.$ac_ext <<_ACEOF
5208/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005209#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005210
5211_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005213 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005214 :
5215else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005216 ac_cv_header_stdc=no
5217fi
5218rm -f conftest*
5219
5220fi
5221
5222if test $ac_cv_header_stdc = yes; then
5223 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005224 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005225 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005226else
Martin v. Löwis11437992002-04-12 09:54:03 +00005227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005228/* confdefs.h. */
5229_ACEOF
5230cat confdefs.h >>conftest.$ac_ext
5231cat >>conftest.$ac_ext <<_ACEOF
5232/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005233#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005234#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005235#if ((' ' & 0x0FF) == 0x020)
5236# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5237# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5238#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005239# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005240 (('a' <= (c) && (c) <= 'i') \
5241 || ('j' <= (c) && (c) <= 'r') \
5242 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005243# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5244#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005245
Martin v. Löwis11437992002-04-12 09:54:03 +00005246#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5247int
5248main ()
5249{
5250 int i;
5251 for (i = 0; i < 256; i++)
5252 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005253 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005254 return 2;
5255 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005256}
5257_ACEOF
5258rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005259if { (ac_try="$ac_link"
5260case "(($ac_try" in
5261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5262 *) ac_try_echo=$ac_try;;
5263esac
5264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5265 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005266 ac_status=$?
5267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005269 { (case "(($ac_try" in
5270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5271 *) ac_try_echo=$ac_try;;
5272esac
5273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5274 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005275 ac_status=$?
5276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005278 :
5279else
Martin v. Löwis11437992002-04-12 09:54:03 +00005280 echo "$as_me: program exited with status $ac_status" >&5
5281echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005282sed 's/^/| /' conftest.$ac_ext >&5
5283
Martin v. Löwis11437992002-04-12 09:54:03 +00005284( exit $ac_status )
5285ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5288fi
5289
5290
Michael W. Hudson54241132001-12-07 15:38:26 +00005291fi
5292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005293{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5294echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005295if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005296
5297cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005298#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005299_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005300
5301fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005302
Skip Montanarob9820a32004-01-17 00:16:12 +00005303# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005314 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005315do
5316as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005317{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5318echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5319if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005320 echo $ECHO_N "(cached) $ECHO_C" >&6
5321else
5322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005323/* confdefs.h. */
5324_ACEOF
5325cat confdefs.h >>conftest.$ac_ext
5326cat >>conftest.$ac_ext <<_ACEOF
5327/* end confdefs.h. */
5328$ac_includes_default
5329
5330#include <$ac_header>
5331_ACEOF
5332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005333if { (ac_try="$ac_compile"
5334case "(($ac_try" in
5335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5336 *) ac_try_echo=$ac_try;;
5337esac
5338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5339 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005341 grep -v '^ *+' conftest.er1 >conftest.err
5342 rm -f conftest.er1
5343 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005345 (exit $ac_status); } && {
5346 test -z "$ac_c_werror_flag" ||
5347 test ! -s conftest.err
5348 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005349 eval "$as_ac_Header=yes"
5350else
5351 echo "$as_me: failed program was:" >&5
5352sed 's/^/| /' conftest.$ac_ext >&5
5353
Martin v. Löwiseba40652007-08-30 20:10:57 +00005354 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005356
5357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005359ac_res=`eval echo '${'$as_ac_Header'}'`
5360 { echo "$as_me:$LINENO: result: $ac_res" >&5
5361echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005362if test `eval echo '${'$as_ac_Header'}'` = yes; then
5363 cat >>confdefs.h <<_ACEOF
5364#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5365_ACEOF
5366
5367fi
5368
5369done
5370
5371
Martin v. Löwis11437992002-04-12 09:54:03 +00005372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
Anthony Baxter8a560de2004-10-13 15:30:56 +00005408
Martin v. Löwisc3001752005-01-23 09:27:24 +00005409
Martin v. Löwis11017b12006-01-14 18:12:57 +00005410
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005411
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005412
5413
5414
5415
5416
5417
5418
5419
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005420
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005421
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005422
5423
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005424for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5425fcntl.h grp.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005426io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
5427shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005428unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005429sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5430sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005431sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5432sys/time.h \
5433sys/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 +00005434sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005435bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005436do
Martin v. Löwis11437992002-04-12 09:54:03 +00005437as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005438if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5439 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5440echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5441if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005442 echo $ECHO_N "(cached) $ECHO_C" >&6
5443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005444ac_res=`eval echo '${'$as_ac_Header'}'`
5445 { echo "$as_me:$LINENO: result: $ac_res" >&5
5446echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005447else
Martin v. Löwis11437992002-04-12 09:54:03 +00005448 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005449{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5450echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005451cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005452/* confdefs.h. */
5453_ACEOF
5454cat confdefs.h >>conftest.$ac_ext
5455cat >>conftest.$ac_ext <<_ACEOF
5456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005457$ac_includes_default
5458#include <$ac_header>
5459_ACEOF
5460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005461if { (ac_try="$ac_compile"
5462case "(($ac_try" in
5463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5464 *) ac_try_echo=$ac_try;;
5465esac
5466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005469 grep -v '^ *+' conftest.er1 >conftest.err
5470 rm -f conftest.er1
5471 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005473 (exit $ac_status); } && {
5474 test -z "$ac_c_werror_flag" ||
5475 test ! -s conftest.err
5476 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005477 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005478else
Martin v. Löwis11437992002-04-12 09:54:03 +00005479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005480sed 's/^/| /' conftest.$ac_ext >&5
5481
Martin v. Löwiseba40652007-08-30 20:10:57 +00005482 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005484
5485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5486{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5487echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005488
5489# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005490{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5491echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005492cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005493/* confdefs.h. */
5494_ACEOF
5495cat confdefs.h >>conftest.$ac_ext
5496cat >>conftest.$ac_ext <<_ACEOF
5497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005498#include <$ac_header>
5499_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005500if { (ac_try="$ac_cpp conftest.$ac_ext"
5501case "(($ac_try" in
5502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5503 *) ac_try_echo=$ac_try;;
5504esac
5505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5506 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005507 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005508 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005509 rm -f conftest.er1
5510 cat conftest.err >&5
5511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005512 (exit $ac_status); } >/dev/null && {
5513 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5514 test ! -s conftest.err
5515 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005516 ac_header_preproc=yes
5517else
5518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005519sed 's/^/| /' conftest.$ac_ext >&5
5520
Martin v. Löwis11437992002-04-12 09:54:03 +00005521 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005523
Martin v. Löwis11437992002-04-12 09:54:03 +00005524rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005525{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5526echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005527
5528# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005529case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5530 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005531 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5532echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005533 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5534echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5535 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005536 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005537 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005538 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5539echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005540 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5541echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5542 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5543echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5544 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5545echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005546 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5547echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005548 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5549echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005550 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005551## ------------------------------------------------ ##
5552## Report this to http://www.python.org/python-bugs ##
5553## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005554_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005555 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005556 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005557esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005558{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5559echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5560if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005561 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005562else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005563 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005565ac_res=`eval echo '${'$as_ac_Header'}'`
5566 { echo "$as_me:$LINENO: result: $ac_res" >&5
5567echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005568
5569fi
5570if test `eval echo '${'$as_ac_Header'}'` = yes; then
5571 cat >>confdefs.h <<_ACEOF
5572#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5573_ACEOF
5574
5575fi
5576
Guido van Rossum627b2d71993-12-24 10:39:16 +00005577done
5578
Martin v. Löwis11437992002-04-12 09:54:03 +00005579
5580
5581
5582
5583
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005584ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005585for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5586 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005587{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5588echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5589if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005591else
Martin v. Löwis11437992002-04-12 09:54:03 +00005592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005593/* confdefs.h. */
5594_ACEOF
5595cat confdefs.h >>conftest.$ac_ext
5596cat >>conftest.$ac_ext <<_ACEOF
5597/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005598#include <sys/types.h>
5599#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005600
Martin v. Löwis11437992002-04-12 09:54:03 +00005601int
5602main ()
5603{
5604if ((DIR *) 0)
5605return 0;
5606 ;
5607 return 0;
5608}
5609_ACEOF
5610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005611if { (ac_try="$ac_compile"
5612case "(($ac_try" in
5613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5614 *) ac_try_echo=$ac_try;;
5615esac
5616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005619 grep -v '^ *+' conftest.er1 >conftest.err
5620 rm -f conftest.er1
5621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005623 (exit $ac_status); } && {
5624 test -z "$ac_c_werror_flag" ||
5625 test ! -s conftest.err
5626 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005627 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005628else
Martin v. Löwis11437992002-04-12 09:54:03 +00005629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005630sed 's/^/| /' conftest.$ac_ext >&5
5631
Martin v. Löwiseba40652007-08-30 20:10:57 +00005632 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005634
5635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005637ac_res=`eval echo '${'$as_ac_Header'}'`
5638 { echo "$as_me:$LINENO: result: $ac_res" >&5
5639echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005640if test `eval echo '${'$as_ac_Header'}'` = yes; then
5641 cat >>confdefs.h <<_ACEOF
5642#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5643_ACEOF
5644
5645ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005646fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005647
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005648done
5649# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5650if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005651 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5652echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005653if test "${ac_cv_search_opendir+set}" = set; then
5654 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005655else
Martin v. Löwis11437992002-04-12 09:54:03 +00005656 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005658/* confdefs.h. */
5659_ACEOF
5660cat confdefs.h >>conftest.$ac_ext
5661cat >>conftest.$ac_ext <<_ACEOF
5662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005663
Martin v. Löwiseba40652007-08-30 20:10:57 +00005664/* Override any GCC internal prototype to avoid an error.
5665 Use char because int might match the return type of a GCC
5666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005667#ifdef __cplusplus
5668extern "C"
5669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005670char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005671int
5672main ()
5673{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005674return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005675 ;
5676 return 0;
5677}
5678_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005679for ac_lib in '' dir; do
5680 if test -z "$ac_lib"; then
5681 ac_res="none required"
5682 else
5683 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005684 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005685 fi
5686 rm -f conftest.$ac_objext conftest$ac_exeext
5687if { (ac_try="$ac_link"
5688case "(($ac_try" in
5689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5690 *) ac_try_echo=$ac_try;;
5691esac
5692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5693 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005694 ac_status=$?
5695 grep -v '^ *+' conftest.er1 >conftest.err
5696 rm -f conftest.er1
5697 cat conftest.err >&5
5698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005699 (exit $ac_status); } && {
5700 test -z "$ac_c_werror_flag" ||
5701 test ! -s conftest.err
5702 } && test -s conftest$ac_exeext &&
5703 $as_test_x conftest$ac_exeext; then
5704 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005705else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005706 echo "$as_me: failed program was:" >&5
5707sed 's/^/| /' conftest.$ac_ext >&5
5708
Martin v. Löwiseba40652007-08-30 20:10:57 +00005709
Brett Cannon19fab762007-06-02 03:02:29 +00005710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005711
5712rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5713 conftest$ac_exeext
5714 if test "${ac_cv_search_opendir+set}" = set; then
5715 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005717done
5718if test "${ac_cv_search_opendir+set}" = set; then
5719 :
5720else
5721 ac_cv_search_opendir=no
5722fi
5723rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005724LIBS=$ac_func_search_save_LIBS
5725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005726{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5727echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5728ac_res=$ac_cv_search_opendir
5729if test "$ac_res" != no; then
5730 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005731
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005732fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005733
Michael W. Hudson54241132001-12-07 15:38:26 +00005734else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005735 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5736echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005737if test "${ac_cv_search_opendir+set}" = set; then
5738 echo $ECHO_N "(cached) $ECHO_C" >&6
5739else
5740 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005742/* confdefs.h. */
5743_ACEOF
5744cat confdefs.h >>conftest.$ac_ext
5745cat >>conftest.$ac_ext <<_ACEOF
5746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
Martin v. Löwiseba40652007-08-30 20:10:57 +00005748/* Override any GCC internal prototype to avoid an error.
5749 Use char because int might match the return type of a GCC
5750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005751#ifdef __cplusplus
5752extern "C"
5753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005754char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005755int
5756main ()
5757{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005758return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005759 ;
5760 return 0;
5761}
5762_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005763for ac_lib in '' x; do
5764 if test -z "$ac_lib"; then
5765 ac_res="none required"
5766 else
5767 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005768 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005769 fi
5770 rm -f conftest.$ac_objext conftest$ac_exeext
5771if { (ac_try="$ac_link"
5772case "(($ac_try" in
5773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5774 *) ac_try_echo=$ac_try;;
5775esac
5776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5777 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005778 ac_status=$?
5779 grep -v '^ *+' conftest.er1 >conftest.err
5780 rm -f conftest.er1
5781 cat conftest.err >&5
5782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005783 (exit $ac_status); } && {
5784 test -z "$ac_c_werror_flag" ||
5785 test ! -s conftest.err
5786 } && test -s conftest$ac_exeext &&
5787 $as_test_x conftest$ac_exeext; then
5788 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005789else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005790 echo "$as_me: failed program was:" >&5
5791sed 's/^/| /' conftest.$ac_ext >&5
5792
Martin v. Löwiseba40652007-08-30 20:10:57 +00005793
Brett Cannon19fab762007-06-02 03:02:29 +00005794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005795
5796rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5797 conftest$ac_exeext
5798 if test "${ac_cv_search_opendir+set}" = set; then
5799 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005801done
5802if test "${ac_cv_search_opendir+set}" = set; then
5803 :
5804else
5805 ac_cv_search_opendir=no
5806fi
5807rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005808LIBS=$ac_func_search_save_LIBS
5809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005810{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5811echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5812ac_res=$ac_cv_search_opendir
5813if test "$ac_res" != no; then
5814 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816fi
5817
5818fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005819
Martin v. Löwiseba40652007-08-30 20:10:57 +00005820{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5821echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005822if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5823 echo $ECHO_N "(cached) $ECHO_C" >&6
5824else
5825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005826/* confdefs.h. */
5827_ACEOF
5828cat confdefs.h >>conftest.$ac_ext
5829cat >>conftest.$ac_ext <<_ACEOF
5830/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005831#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005832int
5833main ()
5834{
5835return makedev(0, 0);
5836 ;
5837 return 0;
5838}
5839_ACEOF
5840rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005841if { (ac_try="$ac_link"
5842case "(($ac_try" in
5843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5844 *) ac_try_echo=$ac_try;;
5845esac
5846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5847 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005849 grep -v '^ *+' conftest.er1 >conftest.err
5850 rm -f conftest.er1
5851 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005853 (exit $ac_status); } && {
5854 test -z "$ac_c_werror_flag" ||
5855 test ! -s conftest.err
5856 } && test -s conftest$ac_exeext &&
5857 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005858 ac_cv_header_sys_types_h_makedev=yes
5859else
5860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005861sed 's/^/| /' conftest.$ac_ext >&5
5862
Martin v. Löwiseba40652007-08-30 20:10:57 +00005863 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005865
5866rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005868
5869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005870{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5871echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005872
5873if test $ac_cv_header_sys_types_h_makedev = no; then
5874if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005875 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5876echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005877if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5878 echo $ECHO_N "(cached) $ECHO_C" >&6
5879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005880{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5881echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005882else
5883 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005884{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5885echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005887/* confdefs.h. */
5888_ACEOF
5889cat confdefs.h >>conftest.$ac_ext
5890cat >>conftest.$ac_ext <<_ACEOF
5891/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005892$ac_includes_default
5893#include <sys/mkdev.h>
5894_ACEOF
5895rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005896if { (ac_try="$ac_compile"
5897case "(($ac_try" in
5898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5899 *) ac_try_echo=$ac_try;;
5900esac
5901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5902 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005904 grep -v '^ *+' conftest.er1 >conftest.err
5905 rm -f conftest.er1
5906 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005908 (exit $ac_status); } && {
5909 test -z "$ac_c_werror_flag" ||
5910 test ! -s conftest.err
5911 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005912 ac_header_compiler=yes
5913else
5914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005915sed 's/^/| /' conftest.$ac_ext >&5
5916
Martin v. Löwiseba40652007-08-30 20:10:57 +00005917 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005919
5920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5921{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5922echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005923
5924# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005925{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5926echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005927cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005928/* confdefs.h. */
5929_ACEOF
5930cat confdefs.h >>conftest.$ac_ext
5931cat >>conftest.$ac_ext <<_ACEOF
5932/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005933#include <sys/mkdev.h>
5934_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005935if { (ac_try="$ac_cpp conftest.$ac_ext"
5936case "(($ac_try" in
5937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5938 *) ac_try_echo=$ac_try;;
5939esac
5940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5941 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005942 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005943 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005944 rm -f conftest.er1
5945 cat conftest.err >&5
5946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005947 (exit $ac_status); } >/dev/null && {
5948 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5949 test ! -s conftest.err
5950 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005951 ac_header_preproc=yes
5952else
5953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005954sed 's/^/| /' conftest.$ac_ext >&5
5955
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005956 ac_header_preproc=no
5957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005958
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005959rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005960{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5961echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005962
5963# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005964case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5965 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005966 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5967echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005968 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5969echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5970 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005971 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005972 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005973 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5974echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005975 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5976echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5977 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5978echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5979 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5980echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005981 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5982echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005983 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5984echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005986## ------------------------------------------------ ##
5987## Report this to http://www.python.org/python-bugs ##
5988## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005989_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005991 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005992esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005993{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5994echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005995if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5996 echo $ECHO_N "(cached) $ECHO_C" >&6
5997else
5998 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006000{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6001echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006002
6003fi
6004if test $ac_cv_header_sys_mkdev_h = yes; then
6005
6006cat >>confdefs.h <<\_ACEOF
6007#define MAJOR_IN_MKDEV 1
6008_ACEOF
6009
6010fi
6011
6012
6013
6014 if test $ac_cv_header_sys_mkdev_h = no; then
6015 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006016 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6017echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006018if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6019 echo $ECHO_N "(cached) $ECHO_C" >&6
6020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6022echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023else
6024 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006025{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6026echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006028/* confdefs.h. */
6029_ACEOF
6030cat confdefs.h >>conftest.$ac_ext
6031cat >>conftest.$ac_ext <<_ACEOF
6032/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033$ac_includes_default
6034#include <sys/sysmacros.h>
6035_ACEOF
6036rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006037if { (ac_try="$ac_compile"
6038case "(($ac_try" in
6039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6040 *) ac_try_echo=$ac_try;;
6041esac
6042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006045 grep -v '^ *+' conftest.er1 >conftest.err
6046 rm -f conftest.er1
6047 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006049 (exit $ac_status); } && {
6050 test -z "$ac_c_werror_flag" ||
6051 test ! -s conftest.err
6052 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053 ac_header_compiler=yes
6054else
6055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006056sed 's/^/| /' conftest.$ac_ext >&5
6057
Martin v. Löwiseba40652007-08-30 20:10:57 +00006058 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006060
6061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6062{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6063echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064
6065# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006066{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6067echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006069/* confdefs.h. */
6070_ACEOF
6071cat confdefs.h >>conftest.$ac_ext
6072cat >>conftest.$ac_ext <<_ACEOF
6073/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074#include <sys/sysmacros.h>
6075_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006076if { (ac_try="$ac_cpp conftest.$ac_ext"
6077case "(($ac_try" in
6078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6079 *) ac_try_echo=$ac_try;;
6080esac
6081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6082 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006083 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006084 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085 rm -f conftest.er1
6086 cat conftest.err >&5
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006088 (exit $ac_status); } >/dev/null && {
6089 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6090 test ! -s conftest.err
6091 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006092 ac_header_preproc=yes
6093else
6094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006095sed 's/^/| /' conftest.$ac_ext >&5
6096
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097 ac_header_preproc=no
6098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006099
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006101{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6102echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103
6104# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006105case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6106 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6108echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006109 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6110echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6111 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006112 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006113 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006114 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6115echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006116 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6117echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6118 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6119echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6120 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6121echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006122 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6123echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006124 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6125echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006126 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006127## ------------------------------------------------ ##
6128## Report this to http://www.python.org/python-bugs ##
6129## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006130_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006131 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006132 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006134{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6135echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006136if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6137 echo $ECHO_N "(cached) $ECHO_C" >&6
6138else
6139 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006141{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6142echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143
6144fi
6145if test $ac_cv_header_sys_sysmacros_h = yes; then
6146
6147cat >>confdefs.h <<\_ACEOF
6148#define MAJOR_IN_SYSMACROS 1
6149_ACEOF
6150
6151fi
6152
6153
6154 fi
6155fi
6156
Michael W. Hudson54241132001-12-07 15:38:26 +00006157
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006158# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006159
6160for ac_header in term.h
6161do
6162as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006163{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6164echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6165if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006166 echo $ECHO_N "(cached) $ECHO_C" >&6
6167else
6168 cat >conftest.$ac_ext <<_ACEOF
6169/* confdefs.h. */
6170_ACEOF
6171cat confdefs.h >>conftest.$ac_ext
6172cat >>conftest.$ac_ext <<_ACEOF
6173/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006174
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006175#ifdef HAVE_CURSES_H
6176#include <curses.h>
6177#endif
6178
6179
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006180#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006181_ACEOF
6182rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006183if { (ac_try="$ac_compile"
6184case "(($ac_try" in
6185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6186 *) ac_try_echo=$ac_try;;
6187esac
6188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6189 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006190 ac_status=$?
6191 grep -v '^ *+' conftest.er1 >conftest.err
6192 rm -f conftest.er1
6193 cat conftest.err >&5
6194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006195 (exit $ac_status); } && {
6196 test -z "$ac_c_werror_flag" ||
6197 test ! -s conftest.err
6198 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006199 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006200else
6201 echo "$as_me: failed program was:" >&5
6202sed 's/^/| /' conftest.$ac_ext >&5
6203
Martin v. Löwiseba40652007-08-30 20:10:57 +00006204 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206
6207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006209ac_res=`eval echo '${'$as_ac_Header'}'`
6210 { echo "$as_me:$LINENO: result: $ac_res" >&5
6211echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006212if test `eval echo '${'$as_ac_Header'}'` = yes; then
6213 cat >>confdefs.h <<_ACEOF
6214#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6215_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006216
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006217fi
6218
6219done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006220
6221
Martin v. Löwis11017b12006-01-14 18:12:57 +00006222# On Linux, netlink.h requires asm/types.h
6223
6224for ac_header in linux/netlink.h
6225do
6226as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6228echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6229if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006230 echo $ECHO_N "(cached) $ECHO_C" >&6
6231else
6232 cat >conftest.$ac_ext <<_ACEOF
6233/* confdefs.h. */
6234_ACEOF
6235cat confdefs.h >>conftest.$ac_ext
6236cat >>conftest.$ac_ext <<_ACEOF
6237/* end confdefs.h. */
6238
6239#ifdef HAVE_ASM_TYPES_H
6240#include <asm/types.h>
6241#endif
6242#ifdef HAVE_SYS_SOCKET_H
6243#include <sys/socket.h>
6244#endif
6245
6246
6247#include <$ac_header>
6248_ACEOF
6249rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006250if { (ac_try="$ac_compile"
6251case "(($ac_try" in
6252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6253 *) ac_try_echo=$ac_try;;
6254esac
6255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006257 ac_status=$?
6258 grep -v '^ *+' conftest.er1 >conftest.err
6259 rm -f conftest.er1
6260 cat conftest.err >&5
6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006262 (exit $ac_status); } && {
6263 test -z "$ac_c_werror_flag" ||
6264 test ! -s conftest.err
6265 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006266 eval "$as_ac_Header=yes"
6267else
6268 echo "$as_me: failed program was:" >&5
6269sed 's/^/| /' conftest.$ac_ext >&5
6270
Martin v. Löwiseba40652007-08-30 20:10:57 +00006271 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006273
6274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006276ac_res=`eval echo '${'$as_ac_Header'}'`
6277 { echo "$as_me:$LINENO: result: $ac_res" >&5
6278echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006279if test `eval echo '${'$as_ac_Header'}'` = yes; then
6280 cat >>confdefs.h <<_ACEOF
6281#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6282_ACEOF
6283
6284fi
6285
6286done
6287
6288
Guido van Rossum627b2d71993-12-24 10:39:16 +00006289# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006290was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006291{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6292echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006293cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006294/* confdefs.h. */
6295_ACEOF
6296cat confdefs.h >>conftest.$ac_ext
6297cat >>conftest.$ac_ext <<_ACEOF
6298/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006299#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006300
6301_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006303 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006304 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006305else
Martin v. Löwis11437992002-04-12 09:54:03 +00006306
6307
6308cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006309#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006310_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006311
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006312
Guido van Rossum627b2d71993-12-24 10:39:16 +00006313fi
6314rm -f conftest*
6315
Martin v. Löwiseba40652007-08-30 20:10:57 +00006316{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6317echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006318
Neal Norwitz11690112002-07-30 01:08:28 +00006319# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006320{ echo "$as_me:$LINENO: checking for makedev" >&5
6321echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006322cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006323/* confdefs.h. */
6324_ACEOF
6325cat confdefs.h >>conftest.$ac_ext
6326cat >>conftest.$ac_ext <<_ACEOF
6327/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006328#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006329int
6330main ()
6331{
6332 makedev(0, 0)
6333 ;
6334 return 0;
6335}
6336_ACEOF
6337rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006338if { (ac_try="$ac_link"
6339case "(($ac_try" in
6340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6341 *) ac_try_echo=$ac_try;;
6342esac
6343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6344 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006346 grep -v '^ *+' conftest.er1 >conftest.err
6347 rm -f conftest.er1
6348 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006350 (exit $ac_status); } && {
6351 test -z "$ac_c_werror_flag" ||
6352 test ! -s conftest.err
6353 } && test -s conftest$ac_exeext &&
6354 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006355 ac_cv_has_makedev=yes
6356else
6357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006358sed 's/^/| /' conftest.$ac_ext >&5
6359
Martin v. Löwiseba40652007-08-30 20:10:57 +00006360 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006362
6363rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006364 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006365if test "$ac_cv_has_makedev" = "no"; then
6366 # we didn't link, try if _OSF_SOURCE will allow us to link
6367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006368/* confdefs.h. */
6369_ACEOF
6370cat confdefs.h >>conftest.$ac_ext
6371cat >>conftest.$ac_ext <<_ACEOF
6372/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006373
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006374#define _OSF_SOURCE 1
6375#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006376
Neal Norwitz11690112002-07-30 01:08:28 +00006377int
6378main ()
6379{
6380 makedev(0, 0)
6381 ;
6382 return 0;
6383}
6384_ACEOF
6385rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006386if { (ac_try="$ac_link"
6387case "(($ac_try" in
6388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6389 *) ac_try_echo=$ac_try;;
6390esac
6391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6392 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006394 grep -v '^ *+' conftest.er1 >conftest.err
6395 rm -f conftest.er1
6396 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006398 (exit $ac_status); } && {
6399 test -z "$ac_c_werror_flag" ||
6400 test ! -s conftest.err
6401 } && test -s conftest$ac_exeext &&
6402 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006403 ac_cv_has_makedev=yes
6404else
6405 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006406sed 's/^/| /' conftest.$ac_ext >&5
6407
Martin v. Löwiseba40652007-08-30 20:10:57 +00006408 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006410
6411rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006412 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006413 if test "$ac_cv_has_makedev" = "yes"; then
6414
6415cat >>confdefs.h <<\_ACEOF
6416#define _OSF_SOURCE 1
6417_ACEOF
6418
6419 fi
6420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006421{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6422echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006423if test "$ac_cv_has_makedev" = "yes"; then
6424
6425cat >>confdefs.h <<\_ACEOF
6426#define HAVE_MAKEDEV 1
6427_ACEOF
6428
6429fi
6430
Martin v. Löwis399a6892002-10-04 10:22:02 +00006431# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6432# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6433# defined, but the compiler does not support pragma redefine_extname,
6434# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6435# structures (such as rlimit64) without declaring them. As a
6436# work-around, disable LFS on such configurations
6437
6438use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006439{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6440echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006441cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006442/* confdefs.h. */
6443_ACEOF
6444cat confdefs.h >>conftest.$ac_ext
6445cat >>conftest.$ac_ext <<_ACEOF
6446/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006447
6448#define _LARGEFILE_SOURCE 1
6449#define _FILE_OFFSET_BITS 64
6450#include <sys/resource.h>
6451
Martin v. Löwis399a6892002-10-04 10:22:02 +00006452int
6453main ()
6454{
6455struct rlimit foo;
6456 ;
6457 return 0;
6458}
6459_ACEOF
6460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006461if { (ac_try="$ac_compile"
6462case "(($ac_try" in
6463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6464 *) ac_try_echo=$ac_try;;
6465esac
6466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006469 grep -v '^ *+' conftest.er1 >conftest.err
6470 rm -f conftest.er1
6471 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006473 (exit $ac_status); } && {
6474 test -z "$ac_c_werror_flag" ||
6475 test ! -s conftest.err
6476 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006477 sol_lfs_bug=no
6478else
6479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006480sed 's/^/| /' conftest.$ac_ext >&5
6481
Martin v. Löwiseba40652007-08-30 20:10:57 +00006482 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006484
6485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6486{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6487echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006488if test "$sol_lfs_bug" = "yes"; then
6489 use_lfs=no
6490fi
6491
6492if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006493# Two defines needed to enable largefile support on various platforms
6494# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006495
Martin v. Löwis11437992002-04-12 09:54:03 +00006496cat >>confdefs.h <<\_ACEOF
6497#define _LARGEFILE_SOURCE 1
6498_ACEOF
6499
6500
6501cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006502#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006503_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006504
Martin v. Löwis399a6892002-10-04 10:22:02 +00006505fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006506
Guido van Rossum84e7b241996-08-19 21:59:00 +00006507# Add some code to confdefs.h so that the test for off_t works on SCO
6508cat >> confdefs.h <<\EOF
6509#if defined(SCO_DS)
6510#undef _OFF_T
6511#endif
6512EOF
6513
Guido van Rossumef2255b2000-03-10 22:30:29 +00006514# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006515{ echo "$as_me:$LINENO: checking for mode_t" >&5
6516echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006517if test "${ac_cv_type_mode_t+set}" = set; then
6518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006519else
Martin v. Löwis11437992002-04-12 09:54:03 +00006520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006521/* confdefs.h. */
6522_ACEOF
6523cat confdefs.h >>conftest.$ac_ext
6524cat >>conftest.$ac_ext <<_ACEOF
6525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006526$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006527typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006528int
6529main ()
6530{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006531if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006532 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006533if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006534 return 0;
6535 ;
6536 return 0;
6537}
6538_ACEOF
6539rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006540if { (ac_try="$ac_compile"
6541case "(($ac_try" in
6542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6543 *) ac_try_echo=$ac_try;;
6544esac
6545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006548 grep -v '^ *+' conftest.er1 >conftest.err
6549 rm -f conftest.er1
6550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006552 (exit $ac_status); } && {
6553 test -z "$ac_c_werror_flag" ||
6554 test ! -s conftest.err
6555 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006556 ac_cv_type_mode_t=yes
6557else
Martin v. Löwis11437992002-04-12 09:54:03 +00006558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006559sed 's/^/| /' conftest.$ac_ext >&5
6560
Martin v. Löwiseba40652007-08-30 20:10:57 +00006561 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006563
6564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6567echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006568if test $ac_cv_type_mode_t = yes; then
6569 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006570else
Martin v. Löwis11437992002-04-12 09:54:03 +00006571
6572cat >>confdefs.h <<_ACEOF
6573#define mode_t int
6574_ACEOF
6575
6576fi
6577
Martin v. Löwiseba40652007-08-30 20:10:57 +00006578{ echo "$as_me:$LINENO: checking for off_t" >&5
6579echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006580if test "${ac_cv_type_off_t+set}" = set; then
6581 echo $ECHO_N "(cached) $ECHO_C" >&6
6582else
6583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006584/* confdefs.h. */
6585_ACEOF
6586cat confdefs.h >>conftest.$ac_ext
6587cat >>conftest.$ac_ext <<_ACEOF
6588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006589$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006590typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006591int
6592main ()
6593{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006594if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006595 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006596if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006597 return 0;
6598 ;
6599 return 0;
6600}
6601_ACEOF
6602rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006603if { (ac_try="$ac_compile"
6604case "(($ac_try" in
6605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6606 *) ac_try_echo=$ac_try;;
6607esac
6608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006611 grep -v '^ *+' conftest.er1 >conftest.err
6612 rm -f conftest.er1
6613 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006615 (exit $ac_status); } && {
6616 test -z "$ac_c_werror_flag" ||
6617 test ! -s conftest.err
6618 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006619 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006620else
Martin v. Löwis11437992002-04-12 09:54:03 +00006621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006622sed 's/^/| /' conftest.$ac_ext >&5
6623
Martin v. Löwiseba40652007-08-30 20:10:57 +00006624 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006626
6627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006629{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6630echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006631if test $ac_cv_type_off_t = yes; then
6632 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006633else
Martin v. Löwis11437992002-04-12 09:54:03 +00006634
6635cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006636#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006637_ACEOF
6638
6639fi
6640
Martin v. Löwiseba40652007-08-30 20:10:57 +00006641{ echo "$as_me:$LINENO: checking for pid_t" >&5
6642echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006643if test "${ac_cv_type_pid_t+set}" = set; then
6644 echo $ECHO_N "(cached) $ECHO_C" >&6
6645else
6646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006647/* confdefs.h. */
6648_ACEOF
6649cat confdefs.h >>conftest.$ac_ext
6650cat >>conftest.$ac_ext <<_ACEOF
6651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006652$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006653typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006654int
6655main ()
6656{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006657if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006658 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006659if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006660 return 0;
6661 ;
6662 return 0;
6663}
6664_ACEOF
6665rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006666if { (ac_try="$ac_compile"
6667case "(($ac_try" in
6668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6669 *) ac_try_echo=$ac_try;;
6670esac
6671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006674 grep -v '^ *+' conftest.er1 >conftest.err
6675 rm -f conftest.er1
6676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006678 (exit $ac_status); } && {
6679 test -z "$ac_c_werror_flag" ||
6680 test ! -s conftest.err
6681 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006682 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006683else
Martin v. Löwis11437992002-04-12 09:54:03 +00006684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006685sed 's/^/| /' conftest.$ac_ext >&5
6686
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689
6690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006692{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6693echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006694if test $ac_cv_type_pid_t = yes; then
6695 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006696else
Martin v. Löwis11437992002-04-12 09:54:03 +00006697
6698cat >>confdefs.h <<_ACEOF
6699#define pid_t int
6700_ACEOF
6701
6702fi
6703
Martin v. Löwiseba40652007-08-30 20:10:57 +00006704{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6705echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006706if test "${ac_cv_type_signal+set}" = set; then
6707 echo $ECHO_N "(cached) $ECHO_C" >&6
6708else
6709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006710/* confdefs.h. */
6711_ACEOF
6712cat confdefs.h >>conftest.$ac_ext
6713cat >>conftest.$ac_ext <<_ACEOF
6714/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006715#include <sys/types.h>
6716#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006717
Martin v. Löwis11437992002-04-12 09:54:03 +00006718int
6719main ()
6720{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006721return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006722 ;
6723 return 0;
6724}
6725_ACEOF
6726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006727if { (ac_try="$ac_compile"
6728case "(($ac_try" in
6729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6730 *) ac_try_echo=$ac_try;;
6731esac
6732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006735 grep -v '^ *+' conftest.er1 >conftest.err
6736 rm -f conftest.er1
6737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006739 (exit $ac_status); } && {
6740 test -z "$ac_c_werror_flag" ||
6741 test ! -s conftest.err
6742 } && test -s conftest.$ac_objext; then
6743 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006744else
Martin v. Löwis11437992002-04-12 09:54:03 +00006745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006746sed 's/^/| /' conftest.$ac_ext >&5
6747
Martin v. Löwiseba40652007-08-30 20:10:57 +00006748 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750
6751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006753{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6754echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006757#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006758_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006759
Michael W. Hudson54241132001-12-07 15:38:26 +00006760
Martin v. Löwiseba40652007-08-30 20:10:57 +00006761{ echo "$as_me:$LINENO: checking for size_t" >&5
6762echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006763if test "${ac_cv_type_size_t+set}" = set; then
6764 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006765else
Martin v. Löwis11437992002-04-12 09:54:03 +00006766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006767/* confdefs.h. */
6768_ACEOF
6769cat confdefs.h >>conftest.$ac_ext
6770cat >>conftest.$ac_ext <<_ACEOF
6771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006773typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006774int
6775main ()
6776{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006780 return 0;
6781 ;
6782 return 0;
6783}
6784_ACEOF
6785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006786if { (ac_try="$ac_compile"
6787case "(($ac_try" in
6788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6789 *) ac_try_echo=$ac_try;;
6790esac
6791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006794 grep -v '^ *+' conftest.er1 >conftest.err
6795 rm -f conftest.er1
6796 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006798 (exit $ac_status); } && {
6799 test -z "$ac_c_werror_flag" ||
6800 test ! -s conftest.err
6801 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006802 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006803else
Martin v. Löwis11437992002-04-12 09:54:03 +00006804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006805sed 's/^/| /' conftest.$ac_ext >&5
6806
Martin v. Löwiseba40652007-08-30 20:10:57 +00006807 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809
6810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006812{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6813echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006814if test $ac_cv_type_size_t = yes; then
6815 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006816else
Martin v. Löwis11437992002-04-12 09:54:03 +00006817
6818cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006819#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006820_ACEOF
6821
6822fi
6823
Martin v. Löwiseba40652007-08-30 20:10:57 +00006824{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6825echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006826if test "${ac_cv_type_uid_t+set}" = set; then
6827 echo $ECHO_N "(cached) $ECHO_C" >&6
6828else
6829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006830/* confdefs.h. */
6831_ACEOF
6832cat confdefs.h >>conftest.$ac_ext
6833cat >>conftest.$ac_ext <<_ACEOF
6834/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006835#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006836
6837_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006839 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006840 ac_cv_type_uid_t=yes
6841else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006842 ac_cv_type_uid_t=no
6843fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006844rm -f conftest*
6845
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6848echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006849if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006850
Martin v. Löwis11437992002-04-12 09:54:03 +00006851cat >>confdefs.h <<\_ACEOF
6852#define uid_t int
6853_ACEOF
6854
6855
6856cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006857#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006858_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006859
6860fi
6861
Martin v. Löwiseba40652007-08-30 20:10:57 +00006862{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6863echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006864if test "${ac_cv_type_ssize_t+set}" = set; then
6865 echo $ECHO_N "(cached) $ECHO_C" >&6
6866else
6867 cat >conftest.$ac_ext <<_ACEOF
6868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
6873$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006874typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006875int
6876main ()
6877{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006878if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006879 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006880if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006881 return 0;
6882 ;
6883 return 0;
6884}
6885_ACEOF
6886rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006887if { (ac_try="$ac_compile"
6888case "(($ac_try" in
6889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6890 *) ac_try_echo=$ac_try;;
6891esac
6892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006894 ac_status=$?
6895 grep -v '^ *+' conftest.er1 >conftest.err
6896 rm -f conftest.er1
6897 cat conftest.err >&5
6898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006899 (exit $ac_status); } && {
6900 test -z "$ac_c_werror_flag" ||
6901 test ! -s conftest.err
6902 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006903 ac_cv_type_ssize_t=yes
6904else
6905 echo "$as_me: failed program was:" >&5
6906sed 's/^/| /' conftest.$ac_ext >&5
6907
Martin v. Löwiseba40652007-08-30 20:10:57 +00006908 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006910
6911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006913{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6914echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006915if test $ac_cv_type_ssize_t = yes; then
6916
6917cat >>confdefs.h <<\_ACEOF
6918#define HAVE_SSIZE_T 1
6919_ACEOF
6920
6921fi
6922
Jack Jansendd19cf82001-12-06 22:36:17 +00006923
Michael W. Hudson54241132001-12-07 15:38:26 +00006924# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006925# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006926{ echo "$as_me:$LINENO: checking for int" >&5
6927echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006928if test "${ac_cv_type_int+set}" = set; then
6929 echo $ECHO_N "(cached) $ECHO_C" >&6
6930else
6931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006932/* confdefs.h. */
6933_ACEOF
6934cat confdefs.h >>conftest.$ac_ext
6935cat >>conftest.$ac_ext <<_ACEOF
6936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006937$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006939int
6940main ()
6941{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006942if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006944if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006945 return 0;
6946 ;
6947 return 0;
6948}
6949_ACEOF
6950rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006951if { (ac_try="$ac_compile"
6952case "(($ac_try" in
6953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6954 *) ac_try_echo=$ac_try;;
6955esac
6956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006959 grep -v '^ *+' conftest.er1 >conftest.err
6960 rm -f conftest.er1
6961 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006963 (exit $ac_status); } && {
6964 test -z "$ac_c_werror_flag" ||
6965 test ! -s conftest.err
6966 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006967 ac_cv_type_int=yes
6968else
6969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006970sed 's/^/| /' conftest.$ac_ext >&5
6971
Martin v. Löwiseba40652007-08-30 20:10:57 +00006972 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006973fi
Brett Cannon19fab762007-06-02 03:02:29 +00006974
Martin v. Löwiseba40652007-08-30 20:10:57 +00006975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6976fi
6977{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6978echo "${ECHO_T}$ac_cv_type_int" >&6; }
6979
6980# The cast to long int works around a bug in the HP C Compiler
6981# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6982# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6983# This bug is HP SR number 8606223364.
6984{ echo "$as_me:$LINENO: checking size of int" >&5
6985echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006986if test "${ac_cv_sizeof_int+set}" = set; then
6987 echo $ECHO_N "(cached) $ECHO_C" >&6
6988else
Martin v. Löwis11437992002-04-12 09:54:03 +00006989 if test "$cross_compiling" = yes; then
6990 # Depending upon the size, compute the lo and hi bounds.
6991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006992/* confdefs.h. */
6993_ACEOF
6994cat confdefs.h >>conftest.$ac_ext
6995cat >>conftest.$ac_ext <<_ACEOF
6996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006997$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006998 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006999int
7000main ()
7001{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007002static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007003test_array [0] = 0
7004
7005 ;
7006 return 0;
7007}
7008_ACEOF
7009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007010if { (ac_try="$ac_compile"
7011case "(($ac_try" in
7012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7013 *) ac_try_echo=$ac_try;;
7014esac
7015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007018 grep -v '^ *+' conftest.er1 >conftest.err
7019 rm -f conftest.er1
7020 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007022 (exit $ac_status); } && {
7023 test -z "$ac_c_werror_flag" ||
7024 test ! -s conftest.err
7025 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007026 ac_lo=0 ac_mid=0
7027 while :; do
7028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007029/* confdefs.h. */
7030_ACEOF
7031cat confdefs.h >>conftest.$ac_ext
7032cat >>conftest.$ac_ext <<_ACEOF
7033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007034$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007035 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007036int
7037main ()
7038{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007040test_array [0] = 0
7041
7042 ;
7043 return 0;
7044}
7045_ACEOF
7046rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007047if { (ac_try="$ac_compile"
7048case "(($ac_try" in
7049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7050 *) ac_try_echo=$ac_try;;
7051esac
7052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7053 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007055 grep -v '^ *+' conftest.er1 >conftest.err
7056 rm -f conftest.er1
7057 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007059 (exit $ac_status); } && {
7060 test -z "$ac_c_werror_flag" ||
7061 test ! -s conftest.err
7062 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007063 ac_hi=$ac_mid; break
7064else
7065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007066sed 's/^/| /' conftest.$ac_ext >&5
7067
Martin v. Löwiseba40652007-08-30 20:10:57 +00007068 ac_lo=`expr $ac_mid + 1`
7069 if test $ac_lo -le $ac_mid; then
7070 ac_lo= ac_hi=
7071 break
7072 fi
7073 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007075
7076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007077 done
7078else
7079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007080sed 's/^/| /' conftest.$ac_ext >&5
7081
Martin v. Löwiseba40652007-08-30 20:10:57 +00007082 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007083/* confdefs.h. */
7084_ACEOF
7085cat confdefs.h >>conftest.$ac_ext
7086cat >>conftest.$ac_ext <<_ACEOF
7087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007088$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007090int
7091main ()
7092{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007093static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007094test_array [0] = 0
7095
7096 ;
7097 return 0;
7098}
7099_ACEOF
7100rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007101if { (ac_try="$ac_compile"
7102case "(($ac_try" in
7103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7104 *) ac_try_echo=$ac_try;;
7105esac
7106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007109 grep -v '^ *+' conftest.er1 >conftest.err
7110 rm -f conftest.er1
7111 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007113 (exit $ac_status); } && {
7114 test -z "$ac_c_werror_flag" ||
7115 test ! -s conftest.err
7116 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007117 ac_hi=-1 ac_mid=-1
7118 while :; do
7119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007120/* confdefs.h. */
7121_ACEOF
7122cat confdefs.h >>conftest.$ac_ext
7123cat >>conftest.$ac_ext <<_ACEOF
7124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007125$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007126 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007127int
7128main ()
7129{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007131test_array [0] = 0
7132
7133 ;
7134 return 0;
7135}
7136_ACEOF
7137rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007138if { (ac_try="$ac_compile"
7139case "(($ac_try" in
7140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7141 *) ac_try_echo=$ac_try;;
7142esac
7143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007146 grep -v '^ *+' conftest.er1 >conftest.err
7147 rm -f conftest.er1
7148 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007150 (exit $ac_status); } && {
7151 test -z "$ac_c_werror_flag" ||
7152 test ! -s conftest.err
7153 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007154 ac_lo=$ac_mid; break
7155else
7156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007157sed 's/^/| /' conftest.$ac_ext >&5
7158
Martin v. Löwiseba40652007-08-30 20:10:57 +00007159 ac_hi=`expr '(' $ac_mid ')' - 1`
7160 if test $ac_mid -le $ac_hi; then
7161 ac_lo= ac_hi=
7162 break
7163 fi
7164 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007166
7167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007168 done
7169else
7170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007171sed 's/^/| /' conftest.$ac_ext >&5
7172
Martin v. Löwiseba40652007-08-30 20:10:57 +00007173 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007175
7176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007178
7179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007180# Binary search between lo and hi bounds.
7181while test "x$ac_lo" != "x$ac_hi"; do
7182 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007184/* confdefs.h. */
7185_ACEOF
7186cat confdefs.h >>conftest.$ac_ext
7187cat >>conftest.$ac_ext <<_ACEOF
7188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007189$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007190 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007191int
7192main ()
7193{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007194static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007195test_array [0] = 0
7196
7197 ;
7198 return 0;
7199}
7200_ACEOF
7201rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007202if { (ac_try="$ac_compile"
7203case "(($ac_try" in
7204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7205 *) ac_try_echo=$ac_try;;
7206esac
7207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007210 grep -v '^ *+' conftest.er1 >conftest.err
7211 rm -f conftest.er1
7212 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007214 (exit $ac_status); } && {
7215 test -z "$ac_c_werror_flag" ||
7216 test ! -s conftest.err
7217 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007218 ac_hi=$ac_mid
7219else
7220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007221sed 's/^/| /' conftest.$ac_ext >&5
7222
Martin v. Löwiseba40652007-08-30 20:10:57 +00007223 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007225
7226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007227done
7228case $ac_lo in
7229?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007230'') if test "$ac_cv_type_int" = yes; then
7231 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007232See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007233echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007234See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007235 { (exit 77); exit 77; }; }
7236 else
7237 ac_cv_sizeof_int=0
7238 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007239esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007240else
Martin v. Löwis11437992002-04-12 09:54:03 +00007241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007242/* confdefs.h. */
7243_ACEOF
7244cat confdefs.h >>conftest.$ac_ext
7245cat >>conftest.$ac_ext <<_ACEOF
7246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007247$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007248 typedef int ac__type_sizeof_;
7249static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7250static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007251#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007252#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007253int
7254main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007255{
Martin v. Löwis11437992002-04-12 09:54:03 +00007256
7257 FILE *f = fopen ("conftest.val", "w");
7258 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007259 return 1;
7260 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007261 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007262 long int i = longval ();
7263 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7264 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007265 fprintf (f, "%ld\n", i);
7266 }
7267 else
7268 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007269 unsigned long int i = ulongval ();
7270 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7271 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007272 fprintf (f, "%lu\n", i);
7273 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007274 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007275
7276 ;
7277 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007278}
Martin v. Löwis11437992002-04-12 09:54:03 +00007279_ACEOF
7280rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007281if { (ac_try="$ac_link"
7282case "(($ac_try" in
7283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7284 *) ac_try_echo=$ac_try;;
7285esac
7286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7287 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007288 ac_status=$?
7289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007291 { (case "(($ac_try" in
7292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7293 *) ac_try_echo=$ac_try;;
7294esac
7295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7296 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007297 ac_status=$?
7298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7299 (exit $ac_status); }; }; then
7300 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007301else
Martin v. Löwis11437992002-04-12 09:54:03 +00007302 echo "$as_me: program exited with status $ac_status" >&5
7303echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007304sed 's/^/| /' conftest.$ac_ext >&5
7305
Martin v. Löwis11437992002-04-12 09:54:03 +00007306( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007307if test "$ac_cv_type_int" = yes; then
7308 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007309See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007310echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007311See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007312 { (exit 77); exit 77; }; }
7313 else
7314 ac_cv_sizeof_int=0
7315 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007317rm -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 +00007318fi
7319rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007321{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7322echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7323
7324
7325
Martin v. Löwis11437992002-04-12 09:54:03 +00007326cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007327#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007328_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007329
7330
Martin v. Löwiseba40652007-08-30 20:10:57 +00007331{ echo "$as_me:$LINENO: checking for long" >&5
7332echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007333if test "${ac_cv_type_long+set}" = set; then
7334 echo $ECHO_N "(cached) $ECHO_C" >&6
7335else
7336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007337/* confdefs.h. */
7338_ACEOF
7339cat confdefs.h >>conftest.$ac_ext
7340cat >>conftest.$ac_ext <<_ACEOF
7341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007342$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007343typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007344int
7345main ()
7346{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007347if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007348 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007349if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007350 return 0;
7351 ;
7352 return 0;
7353}
7354_ACEOF
7355rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007356if { (ac_try="$ac_compile"
7357case "(($ac_try" in
7358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7359 *) ac_try_echo=$ac_try;;
7360esac
7361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007364 grep -v '^ *+' conftest.er1 >conftest.err
7365 rm -f conftest.er1
7366 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007368 (exit $ac_status); } && {
7369 test -z "$ac_c_werror_flag" ||
7370 test ! -s conftest.err
7371 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007372 ac_cv_type_long=yes
7373else
7374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007375sed 's/^/| /' conftest.$ac_ext >&5
7376
Martin v. Löwiseba40652007-08-30 20:10:57 +00007377 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007378fi
Brett Cannon19fab762007-06-02 03:02:29 +00007379
Martin v. Löwiseba40652007-08-30 20:10:57 +00007380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7381fi
7382{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7383echo "${ECHO_T}$ac_cv_type_long" >&6; }
7384
7385# The cast to long int works around a bug in the HP C Compiler
7386# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7387# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7388# This bug is HP SR number 8606223364.
7389{ echo "$as_me:$LINENO: checking size of long" >&5
7390echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007391if test "${ac_cv_sizeof_long+set}" = set; then
7392 echo $ECHO_N "(cached) $ECHO_C" >&6
7393else
Martin v. Löwis11437992002-04-12 09:54:03 +00007394 if test "$cross_compiling" = yes; then
7395 # Depending upon the size, compute the lo and hi bounds.
7396cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007397/* confdefs.h. */
7398_ACEOF
7399cat confdefs.h >>conftest.$ac_ext
7400cat >>conftest.$ac_ext <<_ACEOF
7401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007402$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007403 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007404int
7405main ()
7406{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007407static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007408test_array [0] = 0
7409
7410 ;
7411 return 0;
7412}
7413_ACEOF
7414rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007415if { (ac_try="$ac_compile"
7416case "(($ac_try" in
7417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7418 *) ac_try_echo=$ac_try;;
7419esac
7420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007423 grep -v '^ *+' conftest.er1 >conftest.err
7424 rm -f conftest.er1
7425 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007427 (exit $ac_status); } && {
7428 test -z "$ac_c_werror_flag" ||
7429 test ! -s conftest.err
7430 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007431 ac_lo=0 ac_mid=0
7432 while :; do
7433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007434/* confdefs.h. */
7435_ACEOF
7436cat confdefs.h >>conftest.$ac_ext
7437cat >>conftest.$ac_ext <<_ACEOF
7438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007439$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007440 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007441int
7442main ()
7443{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007444static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007445test_array [0] = 0
7446
7447 ;
7448 return 0;
7449}
7450_ACEOF
7451rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007452if { (ac_try="$ac_compile"
7453case "(($ac_try" in
7454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7455 *) ac_try_echo=$ac_try;;
7456esac
7457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007460 grep -v '^ *+' conftest.er1 >conftest.err
7461 rm -f conftest.er1
7462 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007464 (exit $ac_status); } && {
7465 test -z "$ac_c_werror_flag" ||
7466 test ! -s conftest.err
7467 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007468 ac_hi=$ac_mid; break
7469else
7470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007471sed 's/^/| /' conftest.$ac_ext >&5
7472
Martin v. Löwiseba40652007-08-30 20:10:57 +00007473 ac_lo=`expr $ac_mid + 1`
7474 if test $ac_lo -le $ac_mid; then
7475 ac_lo= ac_hi=
7476 break
7477 fi
7478 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007480
7481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007482 done
7483else
7484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007485sed 's/^/| /' conftest.$ac_ext >&5
7486
Martin v. Löwiseba40652007-08-30 20:10:57 +00007487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007488/* confdefs.h. */
7489_ACEOF
7490cat confdefs.h >>conftest.$ac_ext
7491cat >>conftest.$ac_ext <<_ACEOF
7492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007493$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007494 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007495int
7496main ()
7497{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007498static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007499test_array [0] = 0
7500
7501 ;
7502 return 0;
7503}
7504_ACEOF
7505rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007506if { (ac_try="$ac_compile"
7507case "(($ac_try" in
7508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7509 *) ac_try_echo=$ac_try;;
7510esac
7511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007514 grep -v '^ *+' conftest.er1 >conftest.err
7515 rm -f conftest.er1
7516 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007518 (exit $ac_status); } && {
7519 test -z "$ac_c_werror_flag" ||
7520 test ! -s conftest.err
7521 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 ac_hi=-1 ac_mid=-1
7523 while :; do
7524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007525/* confdefs.h. */
7526_ACEOF
7527cat confdefs.h >>conftest.$ac_ext
7528cat >>conftest.$ac_ext <<_ACEOF
7529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007530$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007531 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007532int
7533main ()
7534{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007535static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007536test_array [0] = 0
7537
7538 ;
7539 return 0;
7540}
7541_ACEOF
7542rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007543if { (ac_try="$ac_compile"
7544case "(($ac_try" in
7545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7546 *) ac_try_echo=$ac_try;;
7547esac
7548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7549 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007551 grep -v '^ *+' conftest.er1 >conftest.err
7552 rm -f conftest.er1
7553 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007555 (exit $ac_status); } && {
7556 test -z "$ac_c_werror_flag" ||
7557 test ! -s conftest.err
7558 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007559 ac_lo=$ac_mid; break
7560else
7561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007562sed 's/^/| /' conftest.$ac_ext >&5
7563
Martin v. Löwiseba40652007-08-30 20:10:57 +00007564 ac_hi=`expr '(' $ac_mid ')' - 1`
7565 if test $ac_mid -le $ac_hi; then
7566 ac_lo= ac_hi=
7567 break
7568 fi
7569 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007571
7572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007573 done
7574else
7575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007576sed 's/^/| /' conftest.$ac_ext >&5
7577
Martin v. Löwiseba40652007-08-30 20:10:57 +00007578 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007580
7581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007583
7584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007585# Binary search between lo and hi bounds.
7586while test "x$ac_lo" != "x$ac_hi"; do
7587 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007589/* confdefs.h. */
7590_ACEOF
7591cat confdefs.h >>conftest.$ac_ext
7592cat >>conftest.$ac_ext <<_ACEOF
7593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007594$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007596int
7597main ()
7598{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007599static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007600test_array [0] = 0
7601
7602 ;
7603 return 0;
7604}
7605_ACEOF
7606rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007607if { (ac_try="$ac_compile"
7608case "(($ac_try" in
7609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7610 *) ac_try_echo=$ac_try;;
7611esac
7612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007615 grep -v '^ *+' conftest.er1 >conftest.err
7616 rm -f conftest.er1
7617 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007619 (exit $ac_status); } && {
7620 test -z "$ac_c_werror_flag" ||
7621 test ! -s conftest.err
7622 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007623 ac_hi=$ac_mid
7624else
7625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007626sed 's/^/| /' conftest.$ac_ext >&5
7627
Martin v. Löwiseba40652007-08-30 20:10:57 +00007628 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007630
7631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007632done
7633case $ac_lo in
7634?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007635'') if test "$ac_cv_type_long" = yes; then
7636 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007637See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007638echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007639See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007640 { (exit 77); exit 77; }; }
7641 else
7642 ac_cv_sizeof_long=0
7643 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007644esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007645else
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007647/* confdefs.h. */
7648_ACEOF
7649cat confdefs.h >>conftest.$ac_ext
7650cat >>conftest.$ac_ext <<_ACEOF
7651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007652$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007653 typedef long ac__type_sizeof_;
7654static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7655static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007656#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007657#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007658int
7659main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007660{
Martin v. Löwis11437992002-04-12 09:54:03 +00007661
7662 FILE *f = fopen ("conftest.val", "w");
7663 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007664 return 1;
7665 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007666 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007667 long int i = longval ();
7668 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7669 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 fprintf (f, "%ld\n", i);
7671 }
7672 else
7673 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007674 unsigned long int i = ulongval ();
7675 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7676 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 fprintf (f, "%lu\n", i);
7678 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007679 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007680
7681 ;
7682 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007683}
Martin v. Löwis11437992002-04-12 09:54:03 +00007684_ACEOF
7685rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686if { (ac_try="$ac_link"
7687case "(($ac_try" in
7688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7689 *) ac_try_echo=$ac_try;;
7690esac
7691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7692 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 ac_status=$?
7694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7695 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007696 { (case "(($ac_try" in
7697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7698 *) ac_try_echo=$ac_try;;
7699esac
7700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7701 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 ac_status=$?
7703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704 (exit $ac_status); }; }; then
7705 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007706else
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 echo "$as_me: program exited with status $ac_status" >&5
7708echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007709sed 's/^/| /' conftest.$ac_ext >&5
7710
Martin v. Löwis11437992002-04-12 09:54:03 +00007711( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007712if test "$ac_cv_type_long" = yes; then
7713 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007714See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007716See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007717 { (exit 77); exit 77; }; }
7718 else
7719 ac_cv_sizeof_long=0
7720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007722rm -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 +00007723fi
7724rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007726{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7727echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7728
7729
7730
Martin v. Löwis11437992002-04-12 09:54:03 +00007731cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007732#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007733_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007734
7735
Martin v. Löwiseba40652007-08-30 20:10:57 +00007736{ echo "$as_me:$LINENO: checking for void *" >&5
7737echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007738if test "${ac_cv_type_void_p+set}" = set; then
7739 echo $ECHO_N "(cached) $ECHO_C" >&6
7740else
7741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007742/* confdefs.h. */
7743_ACEOF
7744cat confdefs.h >>conftest.$ac_ext
7745cat >>conftest.$ac_ext <<_ACEOF
7746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007747$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007749int
7750main ()
7751{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007752if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007754if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 return 0;
7756 ;
7757 return 0;
7758}
7759_ACEOF
7760rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007761if { (ac_try="$ac_compile"
7762case "(($ac_try" in
7763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7764 *) ac_try_echo=$ac_try;;
7765esac
7766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007769 grep -v '^ *+' conftest.er1 >conftest.err
7770 rm -f conftest.er1
7771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773 (exit $ac_status); } && {
7774 test -z "$ac_c_werror_flag" ||
7775 test ! -s conftest.err
7776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 ac_cv_type_void_p=yes
7778else
7779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007780sed 's/^/| /' conftest.$ac_ext >&5
7781
Martin v. Löwiseba40652007-08-30 20:10:57 +00007782 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007783fi
Brett Cannon19fab762007-06-02 03:02:29 +00007784
Martin v. Löwiseba40652007-08-30 20:10:57 +00007785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7786fi
7787{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7788echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7789
7790# The cast to long int works around a bug in the HP C Compiler
7791# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7792# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7793# This bug is HP SR number 8606223364.
7794{ echo "$as_me:$LINENO: checking size of void *" >&5
7795echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007796if test "${ac_cv_sizeof_void_p+set}" = set; then
7797 echo $ECHO_N "(cached) $ECHO_C" >&6
7798else
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 if test "$cross_compiling" = yes; then
7800 # Depending upon the size, compute the lo and hi bounds.
7801cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007802/* confdefs.h. */
7803_ACEOF
7804cat confdefs.h >>conftest.$ac_ext
7805cat >>conftest.$ac_ext <<_ACEOF
7806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007807$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007808 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007809int
7810main ()
7811{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007812static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007813test_array [0] = 0
7814
7815 ;
7816 return 0;
7817}
7818_ACEOF
7819rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007820if { (ac_try="$ac_compile"
7821case "(($ac_try" in
7822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7823 *) ac_try_echo=$ac_try;;
7824esac
7825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007828 grep -v '^ *+' conftest.er1 >conftest.err
7829 rm -f conftest.er1
7830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832 (exit $ac_status); } && {
7833 test -z "$ac_c_werror_flag" ||
7834 test ! -s conftest.err
7835 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007836 ac_lo=0 ac_mid=0
7837 while :; do
7838 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007839/* confdefs.h. */
7840_ACEOF
7841cat confdefs.h >>conftest.$ac_ext
7842cat >>conftest.$ac_ext <<_ACEOF
7843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007844$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007845 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007846int
7847main ()
7848{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007849static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007850test_array [0] = 0
7851
7852 ;
7853 return 0;
7854}
7855_ACEOF
7856rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007857if { (ac_try="$ac_compile"
7858case "(($ac_try" in
7859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7860 *) ac_try_echo=$ac_try;;
7861esac
7862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007865 grep -v '^ *+' conftest.er1 >conftest.err
7866 rm -f conftest.er1
7867 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869 (exit $ac_status); } && {
7870 test -z "$ac_c_werror_flag" ||
7871 test ! -s conftest.err
7872 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 ac_hi=$ac_mid; break
7874else
7875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007876sed 's/^/| /' conftest.$ac_ext >&5
7877
Martin v. Löwiseba40652007-08-30 20:10:57 +00007878 ac_lo=`expr $ac_mid + 1`
7879 if test $ac_lo -le $ac_mid; then
7880 ac_lo= ac_hi=
7881 break
7882 fi
7883 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007885
7886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 done
7888else
7889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007890sed 's/^/| /' conftest.$ac_ext >&5
7891
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007893/* confdefs.h. */
7894_ACEOF
7895cat confdefs.h >>conftest.$ac_ext
7896cat >>conftest.$ac_ext <<_ACEOF
7897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007898$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007899 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007900int
7901main ()
7902{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007903static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007904test_array [0] = 0
7905
7906 ;
7907 return 0;
7908}
7909_ACEOF
7910rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007911if { (ac_try="$ac_compile"
7912case "(($ac_try" in
7913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7914 *) ac_try_echo=$ac_try;;
7915esac
7916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007919 grep -v '^ *+' conftest.er1 >conftest.err
7920 rm -f conftest.er1
7921 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007923 (exit $ac_status); } && {
7924 test -z "$ac_c_werror_flag" ||
7925 test ! -s conftest.err
7926 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 ac_hi=-1 ac_mid=-1
7928 while :; do
7929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007930/* confdefs.h. */
7931_ACEOF
7932cat confdefs.h >>conftest.$ac_ext
7933cat >>conftest.$ac_ext <<_ACEOF
7934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007935$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007936 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007937int
7938main ()
7939{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007940static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007941test_array [0] = 0
7942
7943 ;
7944 return 0;
7945}
7946_ACEOF
7947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007948if { (ac_try="$ac_compile"
7949case "(($ac_try" in
7950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7951 *) ac_try_echo=$ac_try;;
7952esac
7953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007956 grep -v '^ *+' conftest.er1 >conftest.err
7957 rm -f conftest.er1
7958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007960 (exit $ac_status); } && {
7961 test -z "$ac_c_werror_flag" ||
7962 test ! -s conftest.err
7963 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007964 ac_lo=$ac_mid; break
7965else
7966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007967sed 's/^/| /' conftest.$ac_ext >&5
7968
Martin v. Löwiseba40652007-08-30 20:10:57 +00007969 ac_hi=`expr '(' $ac_mid ')' - 1`
7970 if test $ac_mid -le $ac_hi; then
7971 ac_lo= ac_hi=
7972 break
7973 fi
7974 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007976
7977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 done
7979else
7980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007981sed 's/^/| /' conftest.$ac_ext >&5
7982
Martin v. Löwiseba40652007-08-30 20:10:57 +00007983 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985
7986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007988
7989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007990# Binary search between lo and hi bounds.
7991while test "x$ac_lo" != "x$ac_hi"; do
7992 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007994/* confdefs.h. */
7995_ACEOF
7996cat confdefs.h >>conftest.$ac_ext
7997cat >>conftest.$ac_ext <<_ACEOF
7998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007999$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008001int
8002main ()
8003{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008004static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008005test_array [0] = 0
8006
8007 ;
8008 return 0;
8009}
8010_ACEOF
8011rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008012if { (ac_try="$ac_compile"
8013case "(($ac_try" in
8014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8015 *) ac_try_echo=$ac_try;;
8016esac
8017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008020 grep -v '^ *+' conftest.er1 >conftest.err
8021 rm -f conftest.er1
8022 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008024 (exit $ac_status); } && {
8025 test -z "$ac_c_werror_flag" ||
8026 test ! -s conftest.err
8027 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ac_hi=$ac_mid
8029else
8030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008031sed 's/^/| /' conftest.$ac_ext >&5
8032
Martin v. Löwiseba40652007-08-30 20:10:57 +00008033 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008035
8036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008037done
8038case $ac_lo in
8039?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008040'') if test "$ac_cv_type_void_p" = yes; then
8041 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008042See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008043echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008044See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008045 { (exit 77); exit 77; }; }
8046 else
8047 ac_cv_sizeof_void_p=0
8048 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008049esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008050else
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008052/* confdefs.h. */
8053_ACEOF
8054cat confdefs.h >>conftest.$ac_ext
8055cat >>conftest.$ac_ext <<_ACEOF
8056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008057$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008058 typedef void * ac__type_sizeof_;
8059static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8060static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008061#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008062#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008063int
8064main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008065{
Martin v. Löwis11437992002-04-12 09:54:03 +00008066
8067 FILE *f = fopen ("conftest.val", "w");
8068 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008069 return 1;
8070 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008071 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008072 long int i = longval ();
8073 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8074 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 fprintf (f, "%ld\n", i);
8076 }
8077 else
8078 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008079 unsigned long int i = ulongval ();
8080 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8081 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 fprintf (f, "%lu\n", i);
8083 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008084 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008085
8086 ;
8087 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008088}
Martin v. Löwis11437992002-04-12 09:54:03 +00008089_ACEOF
8090rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008091if { (ac_try="$ac_link"
8092case "(($ac_try" in
8093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8094 *) ac_try_echo=$ac_try;;
8095esac
8096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8097 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 ac_status=$?
8099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008101 { (case "(($ac_try" in
8102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8103 *) ac_try_echo=$ac_try;;
8104esac
8105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8106 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 ac_status=$?
8108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8109 (exit $ac_status); }; }; then
8110 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008111else
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 echo "$as_me: program exited with status $ac_status" >&5
8113echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008114sed 's/^/| /' conftest.$ac_ext >&5
8115
Martin v. Löwis11437992002-04-12 09:54:03 +00008116( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008117if test "$ac_cv_type_void_p" = yes; then
8118 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008119See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008120echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008121See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008122 { (exit 77); exit 77; }; }
8123 else
8124 ac_cv_sizeof_void_p=0
8125 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008127rm -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 +00008128fi
8129rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008131{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8132echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8133
8134
8135
Martin v. Löwis11437992002-04-12 09:54:03 +00008136cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008137#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008138_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008139
8140
Martin v. Löwiseba40652007-08-30 20:10:57 +00008141{ echo "$as_me:$LINENO: checking for short" >&5
8142echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008143if test "${ac_cv_type_short+set}" = set; then
8144 echo $ECHO_N "(cached) $ECHO_C" >&6
8145else
8146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008147/* confdefs.h. */
8148_ACEOF
8149cat confdefs.h >>conftest.$ac_ext
8150cat >>conftest.$ac_ext <<_ACEOF
8151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008152$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008153typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008154int
8155main ()
8156{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008157if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008159if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 return 0;
8161 ;
8162 return 0;
8163}
8164_ACEOF
8165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008166if { (ac_try="$ac_compile"
8167case "(($ac_try" in
8168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8169 *) ac_try_echo=$ac_try;;
8170esac
8171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008174 grep -v '^ *+' conftest.er1 >conftest.err
8175 rm -f conftest.er1
8176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178 (exit $ac_status); } && {
8179 test -z "$ac_c_werror_flag" ||
8180 test ! -s conftest.err
8181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008182 ac_cv_type_short=yes
8183else
8184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008185sed 's/^/| /' conftest.$ac_ext >&5
8186
Martin v. Löwiseba40652007-08-30 20:10:57 +00008187 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008188fi
Brett Cannon19fab762007-06-02 03:02:29 +00008189
Martin v. Löwiseba40652007-08-30 20:10:57 +00008190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8191fi
8192{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8193echo "${ECHO_T}$ac_cv_type_short" >&6; }
8194
8195# The cast to long int works around a bug in the HP C Compiler
8196# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8197# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8198# This bug is HP SR number 8606223364.
8199{ echo "$as_me:$LINENO: checking size of short" >&5
8200echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008201if test "${ac_cv_sizeof_short+set}" = set; then
8202 echo $ECHO_N "(cached) $ECHO_C" >&6
8203else
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 if test "$cross_compiling" = yes; then
8205 # Depending upon the size, compute the lo and hi bounds.
8206cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008207/* confdefs.h. */
8208_ACEOF
8209cat confdefs.h >>conftest.$ac_ext
8210cat >>conftest.$ac_ext <<_ACEOF
8211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008212$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008213 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008214int
8215main ()
8216{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008218test_array [0] = 0
8219
8220 ;
8221 return 0;
8222}
8223_ACEOF
8224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008225if { (ac_try="$ac_compile"
8226case "(($ac_try" in
8227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8228 *) ac_try_echo=$ac_try;;
8229esac
8230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008233 grep -v '^ *+' conftest.er1 >conftest.err
8234 rm -f conftest.er1
8235 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237 (exit $ac_status); } && {
8238 test -z "$ac_c_werror_flag" ||
8239 test ! -s conftest.err
8240 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008241 ac_lo=0 ac_mid=0
8242 while :; do
8243 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008244/* confdefs.h. */
8245_ACEOF
8246cat confdefs.h >>conftest.$ac_ext
8247cat >>conftest.$ac_ext <<_ACEOF
8248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008249$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008250 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008251int
8252main ()
8253{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008255test_array [0] = 0
8256
8257 ;
8258 return 0;
8259}
8260_ACEOF
8261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008262if { (ac_try="$ac_compile"
8263case "(($ac_try" in
8264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8265 *) ac_try_echo=$ac_try;;
8266esac
8267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008270 grep -v '^ *+' conftest.er1 >conftest.err
8271 rm -f conftest.er1
8272 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274 (exit $ac_status); } && {
8275 test -z "$ac_c_werror_flag" ||
8276 test ! -s conftest.err
8277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008278 ac_hi=$ac_mid; break
8279else
8280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008281sed 's/^/| /' conftest.$ac_ext >&5
8282
Martin v. Löwiseba40652007-08-30 20:10:57 +00008283 ac_lo=`expr $ac_mid + 1`
8284 if test $ac_lo -le $ac_mid; then
8285 ac_lo= ac_hi=
8286 break
8287 fi
8288 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008290
8291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 done
8293else
8294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008295sed 's/^/| /' conftest.$ac_ext >&5
8296
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008298/* confdefs.h. */
8299_ACEOF
8300cat confdefs.h >>conftest.$ac_ext
8301cat >>conftest.$ac_ext <<_ACEOF
8302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008303$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008304 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008305int
8306main ()
8307{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008308static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008309test_array [0] = 0
8310
8311 ;
8312 return 0;
8313}
8314_ACEOF
8315rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008316if { (ac_try="$ac_compile"
8317case "(($ac_try" in
8318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8319 *) ac_try_echo=$ac_try;;
8320esac
8321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008324 grep -v '^ *+' conftest.er1 >conftest.err
8325 rm -f conftest.er1
8326 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008328 (exit $ac_status); } && {
8329 test -z "$ac_c_werror_flag" ||
8330 test ! -s conftest.err
8331 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 ac_hi=-1 ac_mid=-1
8333 while :; do
8334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008335/* confdefs.h. */
8336_ACEOF
8337cat confdefs.h >>conftest.$ac_ext
8338cat >>conftest.$ac_ext <<_ACEOF
8339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008340$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008341 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008342int
8343main ()
8344{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008345static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008346test_array [0] = 0
8347
8348 ;
8349 return 0;
8350}
8351_ACEOF
8352rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008353if { (ac_try="$ac_compile"
8354case "(($ac_try" in
8355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8356 *) ac_try_echo=$ac_try;;
8357esac
8358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008361 grep -v '^ *+' conftest.er1 >conftest.err
8362 rm -f conftest.er1
8363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008365 (exit $ac_status); } && {
8366 test -z "$ac_c_werror_flag" ||
8367 test ! -s conftest.err
8368 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008369 ac_lo=$ac_mid; break
8370else
8371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008372sed 's/^/| /' conftest.$ac_ext >&5
8373
Martin v. Löwiseba40652007-08-30 20:10:57 +00008374 ac_hi=`expr '(' $ac_mid ')' - 1`
8375 if test $ac_mid -le $ac_hi; then
8376 ac_lo= ac_hi=
8377 break
8378 fi
8379 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008381
8382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008383 done
8384else
8385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008386sed 's/^/| /' conftest.$ac_ext >&5
8387
Martin v. Löwiseba40652007-08-30 20:10:57 +00008388 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008390
8391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008393
8394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008395# Binary search between lo and hi bounds.
8396while test "x$ac_lo" != "x$ac_hi"; do
8397 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008399/* confdefs.h. */
8400_ACEOF
8401cat confdefs.h >>conftest.$ac_ext
8402cat >>conftest.$ac_ext <<_ACEOF
8403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008404$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008405 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008406int
8407main ()
8408{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008410test_array [0] = 0
8411
8412 ;
8413 return 0;
8414}
8415_ACEOF
8416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008417if { (ac_try="$ac_compile"
8418case "(($ac_try" in
8419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8420 *) ac_try_echo=$ac_try;;
8421esac
8422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008425 grep -v '^ *+' conftest.er1 >conftest.err
8426 rm -f conftest.er1
8427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008429 (exit $ac_status); } && {
8430 test -z "$ac_c_werror_flag" ||
8431 test ! -s conftest.err
8432 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 ac_hi=$ac_mid
8434else
8435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008436sed 's/^/| /' conftest.$ac_ext >&5
8437
Martin v. Löwiseba40652007-08-30 20:10:57 +00008438 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008440
8441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008442done
8443case $ac_lo in
8444?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008445'') if test "$ac_cv_type_short" = yes; then
8446 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008447See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008448echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008449See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008450 { (exit 77); exit 77; }; }
8451 else
8452 ac_cv_sizeof_short=0
8453 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008454esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008455else
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* confdefs.h. */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008463 typedef short ac__type_sizeof_;
8464static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8465static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008466#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008467#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008468int
8469main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008470{
Martin v. Löwis11437992002-04-12 09:54:03 +00008471
8472 FILE *f = fopen ("conftest.val", "w");
8473 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474 return 1;
8475 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008477 long int i = longval ();
8478 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8479 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 fprintf (f, "%ld\n", i);
8481 }
8482 else
8483 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008484 unsigned long int i = ulongval ();
8485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8486 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 fprintf (f, "%lu\n", i);
8488 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008489 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008490
8491 ;
8492 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008493}
Martin v. Löwis11437992002-04-12 09:54:03 +00008494_ACEOF
8495rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008496if { (ac_try="$ac_link"
8497case "(($ac_try" in
8498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8499 *) ac_try_echo=$ac_try;;
8500esac
8501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8502 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 ac_status=$?
8504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008506 { (case "(($ac_try" in
8507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8508 *) ac_try_echo=$ac_try;;
8509esac
8510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8511 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ac_status=$?
8513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8514 (exit $ac_status); }; }; then
8515 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008516else
Martin v. Löwis11437992002-04-12 09:54:03 +00008517 echo "$as_me: program exited with status $ac_status" >&5
8518echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008519sed 's/^/| /' conftest.$ac_ext >&5
8520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008522if test "$ac_cv_type_short" = yes; then
8523 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008524See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008525echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008526See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008527 { (exit 77); exit 77; }; }
8528 else
8529 ac_cv_sizeof_short=0
8530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008532rm -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 +00008533fi
8534rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008536{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8537echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8538
8539
8540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008542#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008543_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008544
8545
Martin v. Löwiseba40652007-08-30 20:10:57 +00008546{ echo "$as_me:$LINENO: checking for float" >&5
8547echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008548if test "${ac_cv_type_float+set}" = set; then
8549 echo $ECHO_N "(cached) $ECHO_C" >&6
8550else
8551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008552/* confdefs.h. */
8553_ACEOF
8554cat confdefs.h >>conftest.$ac_ext
8555cat >>conftest.$ac_ext <<_ACEOF
8556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008557$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008558typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008559int
8560main ()
8561{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008562if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 return 0;
8566 ;
8567 return 0;
8568}
8569_ACEOF
8570rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008571if { (ac_try="$ac_compile"
8572case "(($ac_try" in
8573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8574 *) ac_try_echo=$ac_try;;
8575esac
8576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008579 grep -v '^ *+' conftest.er1 >conftest.err
8580 rm -f conftest.er1
8581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583 (exit $ac_status); } && {
8584 test -z "$ac_c_werror_flag" ||
8585 test ! -s conftest.err
8586 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 ac_cv_type_float=yes
8588else
8589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008590sed 's/^/| /' conftest.$ac_ext >&5
8591
Martin v. Löwiseba40652007-08-30 20:10:57 +00008592 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008593fi
Brett Cannon19fab762007-06-02 03:02:29 +00008594
Martin v. Löwiseba40652007-08-30 20:10:57 +00008595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8596fi
8597{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8598echo "${ECHO_T}$ac_cv_type_float" >&6; }
8599
8600# The cast to long int works around a bug in the HP C Compiler
8601# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8602# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8603# This bug is HP SR number 8606223364.
8604{ echo "$as_me:$LINENO: checking size of float" >&5
8605echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008606if test "${ac_cv_sizeof_float+set}" = set; then
8607 echo $ECHO_N "(cached) $ECHO_C" >&6
8608else
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 if test "$cross_compiling" = yes; then
8610 # Depending upon the size, compute the lo and hi bounds.
8611cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008612/* confdefs.h. */
8613_ACEOF
8614cat confdefs.h >>conftest.$ac_ext
8615cat >>conftest.$ac_ext <<_ACEOF
8616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008617$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008619int
8620main ()
8621{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008622static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008623test_array [0] = 0
8624
8625 ;
8626 return 0;
8627}
8628_ACEOF
8629rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008630if { (ac_try="$ac_compile"
8631case "(($ac_try" in
8632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8633 *) ac_try_echo=$ac_try;;
8634esac
8635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008638 grep -v '^ *+' conftest.er1 >conftest.err
8639 rm -f conftest.er1
8640 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642 (exit $ac_status); } && {
8643 test -z "$ac_c_werror_flag" ||
8644 test ! -s conftest.err
8645 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 ac_lo=0 ac_mid=0
8647 while :; do
8648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008649/* confdefs.h. */
8650_ACEOF
8651cat confdefs.h >>conftest.$ac_ext
8652cat >>conftest.$ac_ext <<_ACEOF
8653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008654$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008655 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008656int
8657main ()
8658{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008659static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008660test_array [0] = 0
8661
8662 ;
8663 return 0;
8664}
8665_ACEOF
8666rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008667if { (ac_try="$ac_compile"
8668case "(($ac_try" in
8669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8670 *) ac_try_echo=$ac_try;;
8671esac
8672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008675 grep -v '^ *+' conftest.er1 >conftest.err
8676 rm -f conftest.er1
8677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679 (exit $ac_status); } && {
8680 test -z "$ac_c_werror_flag" ||
8681 test ! -s conftest.err
8682 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 ac_hi=$ac_mid; break
8684else
8685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008686sed 's/^/| /' conftest.$ac_ext >&5
8687
Martin v. Löwiseba40652007-08-30 20:10:57 +00008688 ac_lo=`expr $ac_mid + 1`
8689 if test $ac_lo -le $ac_mid; then
8690 ac_lo= ac_hi=
8691 break
8692 fi
8693 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008695
8696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008697 done
8698else
8699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008700sed 's/^/| /' conftest.$ac_ext >&5
8701
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008703/* confdefs.h. */
8704_ACEOF
8705cat confdefs.h >>conftest.$ac_ext
8706cat >>conftest.$ac_ext <<_ACEOF
8707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008708$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008709 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008710int
8711main ()
8712{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008713static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008714test_array [0] = 0
8715
8716 ;
8717 return 0;
8718}
8719_ACEOF
8720rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008721if { (ac_try="$ac_compile"
8722case "(($ac_try" in
8723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8724 *) ac_try_echo=$ac_try;;
8725esac
8726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008729 grep -v '^ *+' conftest.er1 >conftest.err
8730 rm -f conftest.er1
8731 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008733 (exit $ac_status); } && {
8734 test -z "$ac_c_werror_flag" ||
8735 test ! -s conftest.err
8736 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 ac_hi=-1 ac_mid=-1
8738 while :; do
8739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008740/* confdefs.h. */
8741_ACEOF
8742cat confdefs.h >>conftest.$ac_ext
8743cat >>conftest.$ac_ext <<_ACEOF
8744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008745$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008746 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008747int
8748main ()
8749{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008750static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008751test_array [0] = 0
8752
8753 ;
8754 return 0;
8755}
8756_ACEOF
8757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008758if { (ac_try="$ac_compile"
8759case "(($ac_try" in
8760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8761 *) ac_try_echo=$ac_try;;
8762esac
8763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008766 grep -v '^ *+' conftest.er1 >conftest.err
8767 rm -f conftest.er1
8768 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008770 (exit $ac_status); } && {
8771 test -z "$ac_c_werror_flag" ||
8772 test ! -s conftest.err
8773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ac_lo=$ac_mid; break
8775else
8776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008777sed 's/^/| /' conftest.$ac_ext >&5
8778
Martin v. Löwiseba40652007-08-30 20:10:57 +00008779 ac_hi=`expr '(' $ac_mid ')' - 1`
8780 if test $ac_mid -le $ac_hi; then
8781 ac_lo= ac_hi=
8782 break
8783 fi
8784 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008786
8787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 done
8789else
8790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008791sed 's/^/| /' conftest.$ac_ext >&5
8792
Martin v. Löwiseba40652007-08-30 20:10:57 +00008793 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795
8796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008798
8799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008800# Binary search between lo and hi bounds.
8801while test "x$ac_lo" != "x$ac_hi"; do
8802 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008804/* confdefs.h. */
8805_ACEOF
8806cat confdefs.h >>conftest.$ac_ext
8807cat >>conftest.$ac_ext <<_ACEOF
8808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008809$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008811int
8812main ()
8813{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008814static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008815test_array [0] = 0
8816
8817 ;
8818 return 0;
8819}
8820_ACEOF
8821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008822if { (ac_try="$ac_compile"
8823case "(($ac_try" in
8824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8825 *) ac_try_echo=$ac_try;;
8826esac
8827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008830 grep -v '^ *+' conftest.er1 >conftest.err
8831 rm -f conftest.er1
8832 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008834 (exit $ac_status); } && {
8835 test -z "$ac_c_werror_flag" ||
8836 test ! -s conftest.err
8837 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 ac_hi=$ac_mid
8839else
8840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008841sed 's/^/| /' conftest.$ac_ext >&5
8842
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008845
8846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008847done
8848case $ac_lo in
8849?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008850'') if test "$ac_cv_type_float" = yes; then
8851 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008852See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008853echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008854See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008855 { (exit 77); exit 77; }; }
8856 else
8857 ac_cv_sizeof_float=0
8858 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008859esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008860else
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008862/* confdefs.h. */
8863_ACEOF
8864cat confdefs.h >>conftest.$ac_ext
8865cat >>conftest.$ac_ext <<_ACEOF
8866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008867$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008868 typedef float ac__type_sizeof_;
8869static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8870static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008871#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008872#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008873int
8874main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008875{
Martin v. Löwis11437992002-04-12 09:54:03 +00008876
8877 FILE *f = fopen ("conftest.val", "w");
8878 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008879 return 1;
8880 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008881 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008882 long int i = longval ();
8883 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8884 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 fprintf (f, "%ld\n", i);
8886 }
8887 else
8888 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008889 unsigned long int i = ulongval ();
8890 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8891 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 fprintf (f, "%lu\n", i);
8893 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008894 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008895
8896 ;
8897 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008898}
Martin v. Löwis11437992002-04-12 09:54:03 +00008899_ACEOF
8900rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008901if { (ac_try="$ac_link"
8902case "(($ac_try" in
8903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8904 *) ac_try_echo=$ac_try;;
8905esac
8906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8907 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ac_status=$?
8909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8910 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008911 { (case "(($ac_try" in
8912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8913 *) ac_try_echo=$ac_try;;
8914esac
8915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8916 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 ac_status=$?
8918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8919 (exit $ac_status); }; }; then
8920 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008921else
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 echo "$as_me: program exited with status $ac_status" >&5
8923echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008924sed 's/^/| /' conftest.$ac_ext >&5
8925
Martin v. Löwis11437992002-04-12 09:54:03 +00008926( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008927if test "$ac_cv_type_float" = yes; then
8928 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008929See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008930echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008931See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008932 { (exit 77); exit 77; }; }
8933 else
8934 ac_cv_sizeof_float=0
8935 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008937rm -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 +00008938fi
8939rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008941{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8942echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8943
8944
8945
Martin v. Löwis11437992002-04-12 09:54:03 +00008946cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008947#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008948_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008949
8950
Martin v. Löwiseba40652007-08-30 20:10:57 +00008951{ echo "$as_me:$LINENO: checking for double" >&5
8952echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008953if test "${ac_cv_type_double+set}" = set; then
8954 echo $ECHO_N "(cached) $ECHO_C" >&6
8955else
8956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008957/* confdefs.h. */
8958_ACEOF
8959cat confdefs.h >>conftest.$ac_ext
8960cat >>conftest.$ac_ext <<_ACEOF
8961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008962$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008963typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008964int
8965main ()
8966{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 return 0;
8971 ;
8972 return 0;
8973}
8974_ACEOF
8975rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008976if { (ac_try="$ac_compile"
8977case "(($ac_try" in
8978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8979 *) ac_try_echo=$ac_try;;
8980esac
8981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008984 grep -v '^ *+' conftest.er1 >conftest.err
8985 rm -f conftest.er1
8986 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988 (exit $ac_status); } && {
8989 test -z "$ac_c_werror_flag" ||
8990 test ! -s conftest.err
8991 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 ac_cv_type_double=yes
8993else
8994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008995sed 's/^/| /' conftest.$ac_ext >&5
8996
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008998fi
Brett Cannon19fab762007-06-02 03:02:29 +00008999
Martin v. Löwiseba40652007-08-30 20:10:57 +00009000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9001fi
9002{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9003echo "${ECHO_T}$ac_cv_type_double" >&6; }
9004
9005# The cast to long int works around a bug in the HP C Compiler
9006# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9007# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9008# This bug is HP SR number 8606223364.
9009{ echo "$as_me:$LINENO: checking size of double" >&5
9010echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009011if test "${ac_cv_sizeof_double+set}" = set; then
9012 echo $ECHO_N "(cached) $ECHO_C" >&6
9013else
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 if test "$cross_compiling" = yes; then
9015 # Depending upon the size, compute the lo and hi bounds.
9016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009017/* confdefs.h. */
9018_ACEOF
9019cat confdefs.h >>conftest.$ac_ext
9020cat >>conftest.$ac_ext <<_ACEOF
9021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009022$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009023 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009024int
9025main ()
9026{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009027static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009028test_array [0] = 0
9029
9030 ;
9031 return 0;
9032}
9033_ACEOF
9034rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009035if { (ac_try="$ac_compile"
9036case "(($ac_try" in
9037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9038 *) ac_try_echo=$ac_try;;
9039esac
9040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009043 grep -v '^ *+' conftest.er1 >conftest.err
9044 rm -f conftest.er1
9045 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047 (exit $ac_status); } && {
9048 test -z "$ac_c_werror_flag" ||
9049 test ! -s conftest.err
9050 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009051 ac_lo=0 ac_mid=0
9052 while :; do
9053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009054/* confdefs.h. */
9055_ACEOF
9056cat confdefs.h >>conftest.$ac_ext
9057cat >>conftest.$ac_ext <<_ACEOF
9058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009059$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009060 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009061int
9062main ()
9063{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009064static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009065test_array [0] = 0
9066
9067 ;
9068 return 0;
9069}
9070_ACEOF
9071rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009072if { (ac_try="$ac_compile"
9073case "(($ac_try" in
9074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9075 *) ac_try_echo=$ac_try;;
9076esac
9077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009080 grep -v '^ *+' conftest.er1 >conftest.err
9081 rm -f conftest.er1
9082 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084 (exit $ac_status); } && {
9085 test -z "$ac_c_werror_flag" ||
9086 test ! -s conftest.err
9087 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 ac_hi=$ac_mid; break
9089else
9090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009091sed 's/^/| /' conftest.$ac_ext >&5
9092
Martin v. Löwiseba40652007-08-30 20:10:57 +00009093 ac_lo=`expr $ac_mid + 1`
9094 if test $ac_lo -le $ac_mid; then
9095 ac_lo= ac_hi=
9096 break
9097 fi
9098 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009100
9101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009102 done
9103else
9104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009105sed 's/^/| /' conftest.$ac_ext >&5
9106
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009108/* confdefs.h. */
9109_ACEOF
9110cat confdefs.h >>conftest.$ac_ext
9111cat >>conftest.$ac_ext <<_ACEOF
9112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009113$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009114 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009115int
9116main ()
9117{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009118static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009119test_array [0] = 0
9120
9121 ;
9122 return 0;
9123}
9124_ACEOF
9125rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009126if { (ac_try="$ac_compile"
9127case "(($ac_try" in
9128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9129 *) ac_try_echo=$ac_try;;
9130esac
9131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9132 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009134 grep -v '^ *+' conftest.er1 >conftest.err
9135 rm -f conftest.er1
9136 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009138 (exit $ac_status); } && {
9139 test -z "$ac_c_werror_flag" ||
9140 test ! -s conftest.err
9141 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009142 ac_hi=-1 ac_mid=-1
9143 while :; do
9144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009145/* confdefs.h. */
9146_ACEOF
9147cat confdefs.h >>conftest.$ac_ext
9148cat >>conftest.$ac_ext <<_ACEOF
9149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009150$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009151 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009152int
9153main ()
9154{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009156test_array [0] = 0
9157
9158 ;
9159 return 0;
9160}
9161_ACEOF
9162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009163if { (ac_try="$ac_compile"
9164case "(($ac_try" in
9165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9166 *) ac_try_echo=$ac_try;;
9167esac
9168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009171 grep -v '^ *+' conftest.er1 >conftest.err
9172 rm -f conftest.er1
9173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009175 (exit $ac_status); } && {
9176 test -z "$ac_c_werror_flag" ||
9177 test ! -s conftest.err
9178 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 ac_lo=$ac_mid; break
9180else
9181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009182sed 's/^/| /' conftest.$ac_ext >&5
9183
Martin v. Löwiseba40652007-08-30 20:10:57 +00009184 ac_hi=`expr '(' $ac_mid ')' - 1`
9185 if test $ac_mid -le $ac_hi; then
9186 ac_lo= ac_hi=
9187 break
9188 fi
9189 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009191
9192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 done
9194else
9195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009196sed 's/^/| /' conftest.$ac_ext >&5
9197
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200
9201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009203
9204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009205# Binary search between lo and hi bounds.
9206while test "x$ac_lo" != "x$ac_hi"; do
9207 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009209/* confdefs.h. */
9210_ACEOF
9211cat confdefs.h >>conftest.$ac_ext
9212cat >>conftest.$ac_ext <<_ACEOF
9213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009214$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009216int
9217main ()
9218{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009219static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009220test_array [0] = 0
9221
9222 ;
9223 return 0;
9224}
9225_ACEOF
9226rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009227if { (ac_try="$ac_compile"
9228case "(($ac_try" in
9229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9230 *) ac_try_echo=$ac_try;;
9231esac
9232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009235 grep -v '^ *+' conftest.er1 >conftest.err
9236 rm -f conftest.er1
9237 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009239 (exit $ac_status); } && {
9240 test -z "$ac_c_werror_flag" ||
9241 test ! -s conftest.err
9242 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 ac_hi=$ac_mid
9244else
9245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009246sed 's/^/| /' conftest.$ac_ext >&5
9247
Martin v. Löwiseba40652007-08-30 20:10:57 +00009248 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009250
9251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009252done
9253case $ac_lo in
9254?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009255'') if test "$ac_cv_type_double" = yes; then
9256 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009257See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009258echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009259See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009260 { (exit 77); exit 77; }; }
9261 else
9262 ac_cv_sizeof_double=0
9263 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009264esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009265else
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009267/* confdefs.h. */
9268_ACEOF
9269cat confdefs.h >>conftest.$ac_ext
9270cat >>conftest.$ac_ext <<_ACEOF
9271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009272$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009273 typedef double ac__type_sizeof_;
9274static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9275static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009276#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009277#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009278int
9279main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009280{
Martin v. Löwis11437992002-04-12 09:54:03 +00009281
9282 FILE *f = fopen ("conftest.val", "w");
9283 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009284 return 1;
9285 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009286 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009287 long int i = longval ();
9288 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9289 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 fprintf (f, "%ld\n", i);
9291 }
9292 else
9293 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009294 unsigned long int i = ulongval ();
9295 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9296 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 fprintf (f, "%lu\n", i);
9298 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009299 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009300
9301 ;
9302 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009303}
Martin v. Löwis11437992002-04-12 09:54:03 +00009304_ACEOF
9305rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306if { (ac_try="$ac_link"
9307case "(($ac_try" in
9308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9309 *) ac_try_echo=$ac_try;;
9310esac
9311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9312 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 ac_status=$?
9314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9315 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009316 { (case "(($ac_try" in
9317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9318 *) ac_try_echo=$ac_try;;
9319esac
9320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9321 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 ac_status=$?
9323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9324 (exit $ac_status); }; }; then
9325 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009326else
Martin v. Löwis11437992002-04-12 09:54:03 +00009327 echo "$as_me: program exited with status $ac_status" >&5
9328echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009329sed 's/^/| /' conftest.$ac_ext >&5
9330
Martin v. Löwis11437992002-04-12 09:54:03 +00009331( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009332if test "$ac_cv_type_double" = yes; then
9333 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009334See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009335echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009336See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009337 { (exit 77); exit 77; }; }
9338 else
9339 ac_cv_sizeof_double=0
9340 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009342rm -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 +00009343fi
9344rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009346{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9347echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9348
9349
9350
Martin v. Löwis11437992002-04-12 09:54:03 +00009351cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009352#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009353_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009354
9355
Martin v. Löwiseba40652007-08-30 20:10:57 +00009356{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9357echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009358if test "${ac_cv_type_fpos_t+set}" = set; then
9359 echo $ECHO_N "(cached) $ECHO_C" >&6
9360else
9361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009362/* confdefs.h. */
9363_ACEOF
9364cat confdefs.h >>conftest.$ac_ext
9365cat >>conftest.$ac_ext <<_ACEOF
9366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009367$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009368typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009369int
9370main ()
9371{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009372if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 return 0;
9376 ;
9377 return 0;
9378}
9379_ACEOF
9380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009381if { (ac_try="$ac_compile"
9382case "(($ac_try" in
9383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9384 *) ac_try_echo=$ac_try;;
9385esac
9386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009389 grep -v '^ *+' conftest.er1 >conftest.err
9390 rm -f conftest.er1
9391 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393 (exit $ac_status); } && {
9394 test -z "$ac_c_werror_flag" ||
9395 test ! -s conftest.err
9396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 ac_cv_type_fpos_t=yes
9398else
9399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009400sed 's/^/| /' conftest.$ac_ext >&5
9401
Martin v. Löwiseba40652007-08-30 20:10:57 +00009402 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009403fi
Brett Cannon19fab762007-06-02 03:02:29 +00009404
Martin v. Löwiseba40652007-08-30 20:10:57 +00009405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9406fi
9407{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9408echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9409
9410# The cast to long int works around a bug in the HP C Compiler
9411# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9412# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9413# This bug is HP SR number 8606223364.
9414{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9415echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009416if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9417 echo $ECHO_N "(cached) $ECHO_C" >&6
9418else
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 if test "$cross_compiling" = yes; then
9420 # Depending upon the size, compute the lo and hi bounds.
9421cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009422/* confdefs.h. */
9423_ACEOF
9424cat confdefs.h >>conftest.$ac_ext
9425cat >>conftest.$ac_ext <<_ACEOF
9426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009427$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009428 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009429int
9430main ()
9431{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009432static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009433test_array [0] = 0
9434
9435 ;
9436 return 0;
9437}
9438_ACEOF
9439rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009440if { (ac_try="$ac_compile"
9441case "(($ac_try" in
9442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9443 *) ac_try_echo=$ac_try;;
9444esac
9445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009448 grep -v '^ *+' conftest.er1 >conftest.err
9449 rm -f conftest.er1
9450 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452 (exit $ac_status); } && {
9453 test -z "$ac_c_werror_flag" ||
9454 test ! -s conftest.err
9455 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 ac_lo=0 ac_mid=0
9457 while :; do
9458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009459/* confdefs.h. */
9460_ACEOF
9461cat confdefs.h >>conftest.$ac_ext
9462cat >>conftest.$ac_ext <<_ACEOF
9463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009464$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009465 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009466int
9467main ()
9468{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009469static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009470test_array [0] = 0
9471
9472 ;
9473 return 0;
9474}
9475_ACEOF
9476rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009477if { (ac_try="$ac_compile"
9478case "(($ac_try" in
9479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9480 *) ac_try_echo=$ac_try;;
9481esac
9482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009485 grep -v '^ *+' conftest.er1 >conftest.err
9486 rm -f conftest.er1
9487 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 (exit $ac_status); } && {
9490 test -z "$ac_c_werror_flag" ||
9491 test ! -s conftest.err
9492 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 ac_hi=$ac_mid; break
9494else
9495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009496sed 's/^/| /' conftest.$ac_ext >&5
9497
Martin v. Löwiseba40652007-08-30 20:10:57 +00009498 ac_lo=`expr $ac_mid + 1`
9499 if test $ac_lo -le $ac_mid; then
9500 ac_lo= ac_hi=
9501 break
9502 fi
9503 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009505
9506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 done
9508else
9509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009510sed 's/^/| /' conftest.$ac_ext >&5
9511
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009513/* confdefs.h. */
9514_ACEOF
9515cat confdefs.h >>conftest.$ac_ext
9516cat >>conftest.$ac_ext <<_ACEOF
9517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009518$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009519 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009520int
9521main ()
9522{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009523static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009524test_array [0] = 0
9525
9526 ;
9527 return 0;
9528}
9529_ACEOF
9530rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009531if { (ac_try="$ac_compile"
9532case "(($ac_try" in
9533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9534 *) ac_try_echo=$ac_try;;
9535esac
9536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009539 grep -v '^ *+' conftest.er1 >conftest.err
9540 rm -f conftest.er1
9541 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009543 (exit $ac_status); } && {
9544 test -z "$ac_c_werror_flag" ||
9545 test ! -s conftest.err
9546 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 ac_hi=-1 ac_mid=-1
9548 while :; do
9549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009550/* confdefs.h. */
9551_ACEOF
9552cat confdefs.h >>conftest.$ac_ext
9553cat >>conftest.$ac_ext <<_ACEOF
9554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009555$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009556 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009557int
9558main ()
9559{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009560static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009561test_array [0] = 0
9562
9563 ;
9564 return 0;
9565}
9566_ACEOF
9567rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009568if { (ac_try="$ac_compile"
9569case "(($ac_try" in
9570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9571 *) ac_try_echo=$ac_try;;
9572esac
9573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9574 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009576 grep -v '^ *+' conftest.er1 >conftest.err
9577 rm -f conftest.er1
9578 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009580 (exit $ac_status); } && {
9581 test -z "$ac_c_werror_flag" ||
9582 test ! -s conftest.err
9583 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 ac_lo=$ac_mid; break
9585else
9586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009587sed 's/^/| /' conftest.$ac_ext >&5
9588
Martin v. Löwiseba40652007-08-30 20:10:57 +00009589 ac_hi=`expr '(' $ac_mid ')' - 1`
9590 if test $ac_mid -le $ac_hi; then
9591 ac_lo= ac_hi=
9592 break
9593 fi
9594 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009596
9597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 done
9599else
9600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009601sed 's/^/| /' conftest.$ac_ext >&5
9602
Martin v. Löwiseba40652007-08-30 20:10:57 +00009603 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009605
9606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009608
9609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009610# Binary search between lo and hi bounds.
9611while test "x$ac_lo" != "x$ac_hi"; do
9612 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009614/* confdefs.h. */
9615_ACEOF
9616cat confdefs.h >>conftest.$ac_ext
9617cat >>conftest.$ac_ext <<_ACEOF
9618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009619$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009621int
9622main ()
9623{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009624static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009625test_array [0] = 0
9626
9627 ;
9628 return 0;
9629}
9630_ACEOF
9631rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009632if { (ac_try="$ac_compile"
9633case "(($ac_try" in
9634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9635 *) ac_try_echo=$ac_try;;
9636esac
9637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009640 grep -v '^ *+' conftest.er1 >conftest.err
9641 rm -f conftest.er1
9642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009644 (exit $ac_status); } && {
9645 test -z "$ac_c_werror_flag" ||
9646 test ! -s conftest.err
9647 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 ac_hi=$ac_mid
9649else
9650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009651sed 's/^/| /' conftest.$ac_ext >&5
9652
Martin v. Löwiseba40652007-08-30 20:10:57 +00009653 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009655
9656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009657done
9658case $ac_lo in
9659?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009660'') if test "$ac_cv_type_fpos_t" = yes; then
9661 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009662See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009663echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009664See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009665 { (exit 77); exit 77; }; }
9666 else
9667 ac_cv_sizeof_fpos_t=0
9668 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009669esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009670else
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* confdefs.h. */
9673_ACEOF
9674cat confdefs.h >>conftest.$ac_ext
9675cat >>conftest.$ac_ext <<_ACEOF
9676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009677$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009678 typedef fpos_t ac__type_sizeof_;
9679static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9680static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009681#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009682#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009683int
9684main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009685{
Martin v. Löwis11437992002-04-12 09:54:03 +00009686
9687 FILE *f = fopen ("conftest.val", "w");
9688 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009689 return 1;
9690 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009692 long int i = longval ();
9693 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9694 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 fprintf (f, "%ld\n", i);
9696 }
9697 else
9698 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009699 unsigned long int i = ulongval ();
9700 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9701 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 fprintf (f, "%lu\n", i);
9703 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009704 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009705
9706 ;
9707 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009708}
Martin v. Löwis11437992002-04-12 09:54:03 +00009709_ACEOF
9710rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009711if { (ac_try="$ac_link"
9712case "(($ac_try" in
9713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9714 *) ac_try_echo=$ac_try;;
9715esac
9716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9717 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_status=$?
9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9720 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009721 { (case "(($ac_try" in
9722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9723 *) ac_try_echo=$ac_try;;
9724esac
9725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9726 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ac_status=$?
9728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9729 (exit $ac_status); }; }; then
9730 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009731else
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 echo "$as_me: program exited with status $ac_status" >&5
9733echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009734sed 's/^/| /' conftest.$ac_ext >&5
9735
Martin v. Löwis11437992002-04-12 09:54:03 +00009736( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009737if test "$ac_cv_type_fpos_t" = yes; then
9738 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009739See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009740echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009741See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009742 { (exit 77); exit 77; }; }
9743 else
9744 ac_cv_sizeof_fpos_t=0
9745 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009747rm -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 +00009748fi
9749rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009751{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9752echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9753
9754
9755
Martin v. Löwis11437992002-04-12 09:54:03 +00009756cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009757#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009758_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009759
Michael W. Hudson54241132001-12-07 15:38:26 +00009760
Martin v. Löwiseba40652007-08-30 20:10:57 +00009761{ echo "$as_me:$LINENO: checking for size_t" >&5
9762echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009763if test "${ac_cv_type_size_t+set}" = set; then
9764 echo $ECHO_N "(cached) $ECHO_C" >&6
9765else
9766 cat >conftest.$ac_ext <<_ACEOF
9767/* confdefs.h. */
9768_ACEOF
9769cat confdefs.h >>conftest.$ac_ext
9770cat >>conftest.$ac_ext <<_ACEOF
9771/* end confdefs.h. */
9772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009773typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009774int
9775main ()
9776{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009778 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009779if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009780 return 0;
9781 ;
9782 return 0;
9783}
9784_ACEOF
9785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009786if { (ac_try="$ac_compile"
9787case "(($ac_try" in
9788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9789 *) ac_try_echo=$ac_try;;
9790esac
9791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009793 ac_status=$?
9794 grep -v '^ *+' conftest.er1 >conftest.err
9795 rm -f conftest.er1
9796 cat conftest.err >&5
9797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798 (exit $ac_status); } && {
9799 test -z "$ac_c_werror_flag" ||
9800 test ! -s conftest.err
9801 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009802 ac_cv_type_size_t=yes
9803else
9804 echo "$as_me: failed program was:" >&5
9805sed 's/^/| /' conftest.$ac_ext >&5
9806
Martin v. Löwiseba40652007-08-30 20:10:57 +00009807 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009808fi
Brett Cannon19fab762007-06-02 03:02:29 +00009809
Martin v. Löwiseba40652007-08-30 20:10:57 +00009810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9811fi
9812{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9813echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9814
9815# The cast to long int works around a bug in the HP C Compiler
9816# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9817# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9818# This bug is HP SR number 8606223364.
9819{ echo "$as_me:$LINENO: checking size of size_t" >&5
9820echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009821if test "${ac_cv_sizeof_size_t+set}" = set; then
9822 echo $ECHO_N "(cached) $ECHO_C" >&6
9823else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009824 if test "$cross_compiling" = yes; then
9825 # Depending upon the size, compute the lo and hi bounds.
9826cat >conftest.$ac_ext <<_ACEOF
9827/* confdefs.h. */
9828_ACEOF
9829cat confdefs.h >>conftest.$ac_ext
9830cat >>conftest.$ac_ext <<_ACEOF
9831/* end confdefs.h. */
9832$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009833 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009834int
9835main ()
9836{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009837static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009838test_array [0] = 0
9839
9840 ;
9841 return 0;
9842}
9843_ACEOF
9844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009845if { (ac_try="$ac_compile"
9846case "(($ac_try" in
9847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9848 *) ac_try_echo=$ac_try;;
9849esac
9850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009852 ac_status=$?
9853 grep -v '^ *+' conftest.er1 >conftest.err
9854 rm -f conftest.er1
9855 cat conftest.err >&5
9856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857 (exit $ac_status); } && {
9858 test -z "$ac_c_werror_flag" ||
9859 test ! -s conftest.err
9860 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009861 ac_lo=0 ac_mid=0
9862 while :; do
9863 cat >conftest.$ac_ext <<_ACEOF
9864/* confdefs.h. */
9865_ACEOF
9866cat confdefs.h >>conftest.$ac_ext
9867cat >>conftest.$ac_ext <<_ACEOF
9868/* end confdefs.h. */
9869$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009870 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009871int
9872main ()
9873{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009874static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009875test_array [0] = 0
9876
9877 ;
9878 return 0;
9879}
9880_ACEOF
9881rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009882if { (ac_try="$ac_compile"
9883case "(($ac_try" in
9884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9885 *) ac_try_echo=$ac_try;;
9886esac
9887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009889 ac_status=$?
9890 grep -v '^ *+' conftest.er1 >conftest.err
9891 rm -f conftest.er1
9892 cat conftest.err >&5
9893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894 (exit $ac_status); } && {
9895 test -z "$ac_c_werror_flag" ||
9896 test ! -s conftest.err
9897 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009898 ac_hi=$ac_mid; break
9899else
9900 echo "$as_me: failed program was:" >&5
9901sed 's/^/| /' conftest.$ac_ext >&5
9902
Martin v. Löwiseba40652007-08-30 20:10:57 +00009903 ac_lo=`expr $ac_mid + 1`
9904 if test $ac_lo -le $ac_mid; then
9905 ac_lo= ac_hi=
9906 break
9907 fi
9908 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009910
9911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009912 done
9913else
9914 echo "$as_me: failed program was:" >&5
9915sed 's/^/| /' conftest.$ac_ext >&5
9916
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009918/* confdefs.h. */
9919_ACEOF
9920cat confdefs.h >>conftest.$ac_ext
9921cat >>conftest.$ac_ext <<_ACEOF
9922/* end confdefs.h. */
9923$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009924 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009925int
9926main ()
9927{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009928static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009929test_array [0] = 0
9930
9931 ;
9932 return 0;
9933}
9934_ACEOF
9935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009936if { (ac_try="$ac_compile"
9937case "(($ac_try" in
9938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9939 *) ac_try_echo=$ac_try;;
9940esac
9941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009943 ac_status=$?
9944 grep -v '^ *+' conftest.er1 >conftest.err
9945 rm -f conftest.er1
9946 cat conftest.err >&5
9947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009948 (exit $ac_status); } && {
9949 test -z "$ac_c_werror_flag" ||
9950 test ! -s conftest.err
9951 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009952 ac_hi=-1 ac_mid=-1
9953 while :; do
9954 cat >conftest.$ac_ext <<_ACEOF
9955/* confdefs.h. */
9956_ACEOF
9957cat confdefs.h >>conftest.$ac_ext
9958cat >>conftest.$ac_ext <<_ACEOF
9959/* end confdefs.h. */
9960$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009961 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009962int
9963main ()
9964{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009965static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009966test_array [0] = 0
9967
9968 ;
9969 return 0;
9970}
9971_ACEOF
9972rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009973if { (ac_try="$ac_compile"
9974case "(($ac_try" in
9975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9976 *) ac_try_echo=$ac_try;;
9977esac
9978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009980 ac_status=$?
9981 grep -v '^ *+' conftest.er1 >conftest.err
9982 rm -f conftest.er1
9983 cat conftest.err >&5
9984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009985 (exit $ac_status); } && {
9986 test -z "$ac_c_werror_flag" ||
9987 test ! -s conftest.err
9988 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009989 ac_lo=$ac_mid; break
9990else
9991 echo "$as_me: failed program was:" >&5
9992sed 's/^/| /' conftest.$ac_ext >&5
9993
Martin v. Löwiseba40652007-08-30 20:10:57 +00009994 ac_hi=`expr '(' $ac_mid ')' - 1`
9995 if test $ac_mid -le $ac_hi; then
9996 ac_lo= ac_hi=
9997 break
9998 fi
9999 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010001
10002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010003 done
10004else
10005 echo "$as_me: failed program was:" >&5
10006sed 's/^/| /' conftest.$ac_ext >&5
10007
Martin v. Löwiseba40652007-08-30 20:10:57 +000010008 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010010
10011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010013
10014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010015# Binary search between lo and hi bounds.
10016while test "x$ac_lo" != "x$ac_hi"; do
10017 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10018 cat >conftest.$ac_ext <<_ACEOF
10019/* confdefs.h. */
10020_ACEOF
10021cat confdefs.h >>conftest.$ac_ext
10022cat >>conftest.$ac_ext <<_ACEOF
10023/* end confdefs.h. */
10024$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010026int
10027main ()
10028{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010029static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010030test_array [0] = 0
10031
10032 ;
10033 return 0;
10034}
10035_ACEOF
10036rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010037if { (ac_try="$ac_compile"
10038case "(($ac_try" in
10039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10040 *) ac_try_echo=$ac_try;;
10041esac
10042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010044 ac_status=$?
10045 grep -v '^ *+' conftest.er1 >conftest.err
10046 rm -f conftest.er1
10047 cat conftest.err >&5
10048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010049 (exit $ac_status); } && {
10050 test -z "$ac_c_werror_flag" ||
10051 test ! -s conftest.err
10052 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010053 ac_hi=$ac_mid
10054else
10055 echo "$as_me: failed program was:" >&5
10056sed 's/^/| /' conftest.$ac_ext >&5
10057
Martin v. Löwiseba40652007-08-30 20:10:57 +000010058 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010060
10061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010062done
10063case $ac_lo in
10064?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010065'') if test "$ac_cv_type_size_t" = yes; then
10066 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010067See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010068echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010069See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010070 { (exit 77); exit 77; }; }
10071 else
10072 ac_cv_sizeof_size_t=0
10073 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010074esac
10075else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010076 cat >conftest.$ac_ext <<_ACEOF
10077/* confdefs.h. */
10078_ACEOF
10079cat confdefs.h >>conftest.$ac_ext
10080cat >>conftest.$ac_ext <<_ACEOF
10081/* end confdefs.h. */
10082$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010083 typedef size_t ac__type_sizeof_;
10084static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10085static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010086#include <stdio.h>
10087#include <stdlib.h>
10088int
10089main ()
10090{
10091
10092 FILE *f = fopen ("conftest.val", "w");
10093 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010094 return 1;
10095 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010096 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010097 long int i = longval ();
10098 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10099 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010100 fprintf (f, "%ld\n", i);
10101 }
10102 else
10103 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010104 unsigned long int i = ulongval ();
10105 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10106 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010107 fprintf (f, "%lu\n", i);
10108 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010109 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010110
10111 ;
10112 return 0;
10113}
10114_ACEOF
10115rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010116if { (ac_try="$ac_link"
10117case "(($ac_try" in
10118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10119 *) ac_try_echo=$ac_try;;
10120esac
10121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10122 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010123 ac_status=$?
10124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10125 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010126 { (case "(($ac_try" in
10127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10128 *) ac_try_echo=$ac_try;;
10129esac
10130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10131 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010132 ac_status=$?
10133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10134 (exit $ac_status); }; }; then
10135 ac_cv_sizeof_size_t=`cat conftest.val`
10136else
10137 echo "$as_me: program exited with status $ac_status" >&5
10138echo "$as_me: failed program was:" >&5
10139sed 's/^/| /' conftest.$ac_ext >&5
10140
10141( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010142if test "$ac_cv_type_size_t" = yes; then
10143 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010144See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010145echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010146See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010147 { (exit 77); exit 77; }; }
10148 else
10149 ac_cv_sizeof_size_t=0
10150 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010152rm -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 +000010153fi
10154rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010156{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10157echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10158
10159
10160
Martin v. Löwis18e16552006-02-15 17:27:45 +000010161cat >>confdefs.h <<_ACEOF
10162#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10163_ACEOF
10164
10165
Christian Heimes951cc0f2008-01-31 23:08:23 +000010166{ echo "$as_me:$LINENO: checking for pid_t" >&5
10167echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10168if test "${ac_cv_type_pid_t+set}" = set; then
10169 echo $ECHO_N "(cached) $ECHO_C" >&6
10170else
10171 cat >conftest.$ac_ext <<_ACEOF
10172/* confdefs.h. */
10173_ACEOF
10174cat confdefs.h >>conftest.$ac_ext
10175cat >>conftest.$ac_ext <<_ACEOF
10176/* end confdefs.h. */
10177$ac_includes_default
10178typedef pid_t ac__type_new_;
10179int
10180main ()
10181{
10182if ((ac__type_new_ *) 0)
10183 return 0;
10184if (sizeof (ac__type_new_))
10185 return 0;
10186 ;
10187 return 0;
10188}
10189_ACEOF
10190rm -f conftest.$ac_objext
10191if { (ac_try="$ac_compile"
10192case "(($ac_try" in
10193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10194 *) ac_try_echo=$ac_try;;
10195esac
10196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10197 (eval "$ac_compile") 2>conftest.er1
10198 ac_status=$?
10199 grep -v '^ *+' conftest.er1 >conftest.err
10200 rm -f conftest.er1
10201 cat conftest.err >&5
10202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10203 (exit $ac_status); } && {
10204 test -z "$ac_c_werror_flag" ||
10205 test ! -s conftest.err
10206 } && test -s conftest.$ac_objext; then
10207 ac_cv_type_pid_t=yes
10208else
10209 echo "$as_me: failed program was:" >&5
10210sed 's/^/| /' conftest.$ac_ext >&5
10211
10212 ac_cv_type_pid_t=no
10213fi
10214
10215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10216fi
10217{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10218echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10219
10220# The cast to long int works around a bug in the HP C Compiler
10221# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10222# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10223# This bug is HP SR number 8606223364.
10224{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10225echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10226if test "${ac_cv_sizeof_pid_t+set}" = set; then
10227 echo $ECHO_N "(cached) $ECHO_C" >&6
10228else
10229 if test "$cross_compiling" = yes; then
10230 # Depending upon the size, compute the lo and hi bounds.
10231cat >conftest.$ac_ext <<_ACEOF
10232/* confdefs.h. */
10233_ACEOF
10234cat confdefs.h >>conftest.$ac_ext
10235cat >>conftest.$ac_ext <<_ACEOF
10236/* end confdefs.h. */
10237$ac_includes_default
10238 typedef pid_t ac__type_sizeof_;
10239int
10240main ()
10241{
10242static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10243test_array [0] = 0
10244
10245 ;
10246 return 0;
10247}
10248_ACEOF
10249rm -f conftest.$ac_objext
10250if { (ac_try="$ac_compile"
10251case "(($ac_try" in
10252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10253 *) ac_try_echo=$ac_try;;
10254esac
10255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10256 (eval "$ac_compile") 2>conftest.er1
10257 ac_status=$?
10258 grep -v '^ *+' conftest.er1 >conftest.err
10259 rm -f conftest.er1
10260 cat conftest.err >&5
10261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10262 (exit $ac_status); } && {
10263 test -z "$ac_c_werror_flag" ||
10264 test ! -s conftest.err
10265 } && test -s conftest.$ac_objext; then
10266 ac_lo=0 ac_mid=0
10267 while :; do
10268 cat >conftest.$ac_ext <<_ACEOF
10269/* confdefs.h. */
10270_ACEOF
10271cat confdefs.h >>conftest.$ac_ext
10272cat >>conftest.$ac_ext <<_ACEOF
10273/* end confdefs.h. */
10274$ac_includes_default
10275 typedef pid_t ac__type_sizeof_;
10276int
10277main ()
10278{
10279static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10280test_array [0] = 0
10281
10282 ;
10283 return 0;
10284}
10285_ACEOF
10286rm -f conftest.$ac_objext
10287if { (ac_try="$ac_compile"
10288case "(($ac_try" in
10289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10290 *) ac_try_echo=$ac_try;;
10291esac
10292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10293 (eval "$ac_compile") 2>conftest.er1
10294 ac_status=$?
10295 grep -v '^ *+' conftest.er1 >conftest.err
10296 rm -f conftest.er1
10297 cat conftest.err >&5
10298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10299 (exit $ac_status); } && {
10300 test -z "$ac_c_werror_flag" ||
10301 test ! -s conftest.err
10302 } && test -s conftest.$ac_objext; then
10303 ac_hi=$ac_mid; break
10304else
10305 echo "$as_me: failed program was:" >&5
10306sed 's/^/| /' conftest.$ac_ext >&5
10307
10308 ac_lo=`expr $ac_mid + 1`
10309 if test $ac_lo -le $ac_mid; then
10310 ac_lo= ac_hi=
10311 break
10312 fi
10313 ac_mid=`expr 2 '*' $ac_mid + 1`
10314fi
10315
10316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10317 done
10318else
10319 echo "$as_me: failed program was:" >&5
10320sed 's/^/| /' conftest.$ac_ext >&5
10321
10322 cat >conftest.$ac_ext <<_ACEOF
10323/* confdefs.h. */
10324_ACEOF
10325cat confdefs.h >>conftest.$ac_ext
10326cat >>conftest.$ac_ext <<_ACEOF
10327/* end confdefs.h. */
10328$ac_includes_default
10329 typedef pid_t ac__type_sizeof_;
10330int
10331main ()
10332{
10333static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10334test_array [0] = 0
10335
10336 ;
10337 return 0;
10338}
10339_ACEOF
10340rm -f conftest.$ac_objext
10341if { (ac_try="$ac_compile"
10342case "(($ac_try" in
10343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10344 *) ac_try_echo=$ac_try;;
10345esac
10346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10347 (eval "$ac_compile") 2>conftest.er1
10348 ac_status=$?
10349 grep -v '^ *+' conftest.er1 >conftest.err
10350 rm -f conftest.er1
10351 cat conftest.err >&5
10352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); } && {
10354 test -z "$ac_c_werror_flag" ||
10355 test ! -s conftest.err
10356 } && test -s conftest.$ac_objext; then
10357 ac_hi=-1 ac_mid=-1
10358 while :; do
10359 cat >conftest.$ac_ext <<_ACEOF
10360/* confdefs.h. */
10361_ACEOF
10362cat confdefs.h >>conftest.$ac_ext
10363cat >>conftest.$ac_ext <<_ACEOF
10364/* end confdefs.h. */
10365$ac_includes_default
10366 typedef pid_t ac__type_sizeof_;
10367int
10368main ()
10369{
10370static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10371test_array [0] = 0
10372
10373 ;
10374 return 0;
10375}
10376_ACEOF
10377rm -f conftest.$ac_objext
10378if { (ac_try="$ac_compile"
10379case "(($ac_try" in
10380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10381 *) ac_try_echo=$ac_try;;
10382esac
10383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10384 (eval "$ac_compile") 2>conftest.er1
10385 ac_status=$?
10386 grep -v '^ *+' conftest.er1 >conftest.err
10387 rm -f conftest.er1
10388 cat conftest.err >&5
10389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10390 (exit $ac_status); } && {
10391 test -z "$ac_c_werror_flag" ||
10392 test ! -s conftest.err
10393 } && test -s conftest.$ac_objext; then
10394 ac_lo=$ac_mid; break
10395else
10396 echo "$as_me: failed program was:" >&5
10397sed 's/^/| /' conftest.$ac_ext >&5
10398
10399 ac_hi=`expr '(' $ac_mid ')' - 1`
10400 if test $ac_mid -le $ac_hi; then
10401 ac_lo= ac_hi=
10402 break
10403 fi
10404 ac_mid=`expr 2 '*' $ac_mid`
10405fi
10406
10407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10408 done
10409else
10410 echo "$as_me: failed program was:" >&5
10411sed 's/^/| /' conftest.$ac_ext >&5
10412
10413 ac_lo= ac_hi=
10414fi
10415
10416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10417fi
10418
10419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10420# Binary search between lo and hi bounds.
10421while test "x$ac_lo" != "x$ac_hi"; do
10422 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10423 cat >conftest.$ac_ext <<_ACEOF
10424/* confdefs.h. */
10425_ACEOF
10426cat confdefs.h >>conftest.$ac_ext
10427cat >>conftest.$ac_ext <<_ACEOF
10428/* end confdefs.h. */
10429$ac_includes_default
10430 typedef pid_t ac__type_sizeof_;
10431int
10432main ()
10433{
10434static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10435test_array [0] = 0
10436
10437 ;
10438 return 0;
10439}
10440_ACEOF
10441rm -f conftest.$ac_objext
10442if { (ac_try="$ac_compile"
10443case "(($ac_try" in
10444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10445 *) ac_try_echo=$ac_try;;
10446esac
10447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10448 (eval "$ac_compile") 2>conftest.er1
10449 ac_status=$?
10450 grep -v '^ *+' conftest.er1 >conftest.err
10451 rm -f conftest.er1
10452 cat conftest.err >&5
10453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10454 (exit $ac_status); } && {
10455 test -z "$ac_c_werror_flag" ||
10456 test ! -s conftest.err
10457 } && test -s conftest.$ac_objext; then
10458 ac_hi=$ac_mid
10459else
10460 echo "$as_me: failed program was:" >&5
10461sed 's/^/| /' conftest.$ac_ext >&5
10462
10463 ac_lo=`expr '(' $ac_mid ')' + 1`
10464fi
10465
10466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10467done
10468case $ac_lo in
10469?*) ac_cv_sizeof_pid_t=$ac_lo;;
10470'') if test "$ac_cv_type_pid_t" = yes; then
10471 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10472See \`config.log' for more details." >&5
10473echo "$as_me: error: cannot compute sizeof (pid_t)
10474See \`config.log' for more details." >&2;}
10475 { (exit 77); exit 77; }; }
10476 else
10477 ac_cv_sizeof_pid_t=0
10478 fi ;;
10479esac
10480else
10481 cat >conftest.$ac_ext <<_ACEOF
10482/* confdefs.h. */
10483_ACEOF
10484cat confdefs.h >>conftest.$ac_ext
10485cat >>conftest.$ac_ext <<_ACEOF
10486/* end confdefs.h. */
10487$ac_includes_default
10488 typedef pid_t ac__type_sizeof_;
10489static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10490static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10491#include <stdio.h>
10492#include <stdlib.h>
10493int
10494main ()
10495{
10496
10497 FILE *f = fopen ("conftest.val", "w");
10498 if (! f)
10499 return 1;
10500 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10501 {
10502 long int i = longval ();
10503 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10504 return 1;
10505 fprintf (f, "%ld\n", i);
10506 }
10507 else
10508 {
10509 unsigned long int i = ulongval ();
10510 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10511 return 1;
10512 fprintf (f, "%lu\n", i);
10513 }
10514 return ferror (f) || fclose (f) != 0;
10515
10516 ;
10517 return 0;
10518}
10519_ACEOF
10520rm -f conftest$ac_exeext
10521if { (ac_try="$ac_link"
10522case "(($ac_try" in
10523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10524 *) ac_try_echo=$ac_try;;
10525esac
10526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10527 (eval "$ac_link") 2>&5
10528 ac_status=$?
10529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10530 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10531 { (case "(($ac_try" in
10532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10533 *) ac_try_echo=$ac_try;;
10534esac
10535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10536 (eval "$ac_try") 2>&5
10537 ac_status=$?
10538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10539 (exit $ac_status); }; }; then
10540 ac_cv_sizeof_pid_t=`cat conftest.val`
10541else
10542 echo "$as_me: program exited with status $ac_status" >&5
10543echo "$as_me: failed program was:" >&5
10544sed 's/^/| /' conftest.$ac_ext >&5
10545
10546( exit $ac_status )
10547if test "$ac_cv_type_pid_t" = yes; then
10548 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10549See \`config.log' for more details." >&5
10550echo "$as_me: error: cannot compute sizeof (pid_t)
10551See \`config.log' for more details." >&2;}
10552 { (exit 77); exit 77; }; }
10553 else
10554 ac_cv_sizeof_pid_t=0
10555 fi
10556fi
10557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10558fi
10559rm -f conftest.val
10560fi
10561{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10562echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10563
10564
10565
10566cat >>confdefs.h <<_ACEOF
10567#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10568_ACEOF
10569
10570
Michael W. Hudson54241132001-12-07 15:38:26 +000010571
Martin v. Löwiseba40652007-08-30 20:10:57 +000010572{ echo "$as_me:$LINENO: checking for long long support" >&5
10573echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010574have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010575cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010576/* confdefs.h. */
10577_ACEOF
10578cat confdefs.h >>conftest.$ac_ext
10579cat >>conftest.$ac_ext <<_ACEOF
10580/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010581
Martin v. Löwis11437992002-04-12 09:54:03 +000010582int
10583main ()
10584{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010585long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 ;
10587 return 0;
10588}
10589_ACEOF
10590rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010591if { (ac_try="$ac_compile"
10592case "(($ac_try" in
10593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10594 *) ac_try_echo=$ac_try;;
10595esac
10596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010599 grep -v '^ *+' conftest.er1 >conftest.err
10600 rm -f conftest.er1
10601 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010603 (exit $ac_status); } && {
10604 test -z "$ac_c_werror_flag" ||
10605 test ! -s conftest.err
10606 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010607
10608
10609cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010610#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010611_ACEOF
10612
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010613 have_long_long=yes
10614
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010615else
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010617sed 's/^/| /' conftest.$ac_ext >&5
10618
Martin v. Löwiseba40652007-08-30 20:10:57 +000010619
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010621
10622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10623{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10624echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010625if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010626{ echo "$as_me:$LINENO: checking for long long" >&5
10627echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010628if test "${ac_cv_type_long_long+set}" = set; then
10629 echo $ECHO_N "(cached) $ECHO_C" >&6
10630else
10631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010632/* confdefs.h. */
10633_ACEOF
10634cat confdefs.h >>conftest.$ac_ext
10635cat >>conftest.$ac_ext <<_ACEOF
10636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010637$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010639int
10640main ()
10641{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010642if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010643 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010644if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 return 0;
10646 ;
10647 return 0;
10648}
10649_ACEOF
10650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010651if { (ac_try="$ac_compile"
10652case "(($ac_try" in
10653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10654 *) ac_try_echo=$ac_try;;
10655esac
10656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010659 grep -v '^ *+' conftest.er1 >conftest.err
10660 rm -f conftest.er1
10661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010663 (exit $ac_status); } && {
10664 test -z "$ac_c_werror_flag" ||
10665 test ! -s conftest.err
10666 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010667 ac_cv_type_long_long=yes
10668else
10669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010670sed 's/^/| /' conftest.$ac_ext >&5
10671
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010673fi
Brett Cannon19fab762007-06-02 03:02:29 +000010674
Martin v. Löwiseba40652007-08-30 20:10:57 +000010675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10676fi
10677{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10678echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10679
10680# The cast to long int works around a bug in the HP C Compiler
10681# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10682# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10683# This bug is HP SR number 8606223364.
10684{ echo "$as_me:$LINENO: checking size of long long" >&5
10685echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010686if test "${ac_cv_sizeof_long_long+set}" = set; then
10687 echo $ECHO_N "(cached) $ECHO_C" >&6
10688else
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 if test "$cross_compiling" = yes; then
10690 # Depending upon the size, compute the lo and hi bounds.
10691cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010692/* confdefs.h. */
10693_ACEOF
10694cat confdefs.h >>conftest.$ac_ext
10695cat >>conftest.$ac_ext <<_ACEOF
10696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010697$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010698 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010699int
10700main ()
10701{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010702static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010703test_array [0] = 0
10704
10705 ;
10706 return 0;
10707}
10708_ACEOF
10709rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010710if { (ac_try="$ac_compile"
10711case "(($ac_try" in
10712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10713 *) ac_try_echo=$ac_try;;
10714esac
10715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010718 grep -v '^ *+' conftest.er1 >conftest.err
10719 rm -f conftest.er1
10720 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010722 (exit $ac_status); } && {
10723 test -z "$ac_c_werror_flag" ||
10724 test ! -s conftest.err
10725 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010726 ac_lo=0 ac_mid=0
10727 while :; do
10728 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010729/* confdefs.h. */
10730_ACEOF
10731cat confdefs.h >>conftest.$ac_ext
10732cat >>conftest.$ac_ext <<_ACEOF
10733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010734$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010735 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010736int
10737main ()
10738{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010739static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010740test_array [0] = 0
10741
10742 ;
10743 return 0;
10744}
10745_ACEOF
10746rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010747if { (ac_try="$ac_compile"
10748case "(($ac_try" in
10749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10750 *) ac_try_echo=$ac_try;;
10751esac
10752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10753 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010754 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010755 grep -v '^ *+' conftest.er1 >conftest.err
10756 rm -f conftest.er1
10757 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010759 (exit $ac_status); } && {
10760 test -z "$ac_c_werror_flag" ||
10761 test ! -s conftest.err
10762 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 ac_hi=$ac_mid; break
10764else
10765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010766sed 's/^/| /' conftest.$ac_ext >&5
10767
Martin v. Löwiseba40652007-08-30 20:10:57 +000010768 ac_lo=`expr $ac_mid + 1`
10769 if test $ac_lo -le $ac_mid; then
10770 ac_lo= ac_hi=
10771 break
10772 fi
10773 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010775
10776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 done
10778else
10779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010780sed 's/^/| /' conftest.$ac_ext >&5
10781
Martin v. Löwiseba40652007-08-30 20:10:57 +000010782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* confdefs.h. */
10784_ACEOF
10785cat confdefs.h >>conftest.$ac_ext
10786cat >>conftest.$ac_ext <<_ACEOF
10787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010788$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010789 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010790int
10791main ()
10792{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010793static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010794test_array [0] = 0
10795
10796 ;
10797 return 0;
10798}
10799_ACEOF
10800rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010801if { (ac_try="$ac_compile"
10802case "(($ac_try" in
10803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10804 *) ac_try_echo=$ac_try;;
10805esac
10806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10807 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010809 grep -v '^ *+' conftest.er1 >conftest.err
10810 rm -f conftest.er1
10811 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010813 (exit $ac_status); } && {
10814 test -z "$ac_c_werror_flag" ||
10815 test ! -s conftest.err
10816 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010817 ac_hi=-1 ac_mid=-1
10818 while :; do
10819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010820/* confdefs.h. */
10821_ACEOF
10822cat confdefs.h >>conftest.$ac_ext
10823cat >>conftest.$ac_ext <<_ACEOF
10824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010825$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010826 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010827int
10828main ()
10829{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010830static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010831test_array [0] = 0
10832
10833 ;
10834 return 0;
10835}
10836_ACEOF
10837rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010838if { (ac_try="$ac_compile"
10839case "(($ac_try" in
10840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10841 *) ac_try_echo=$ac_try;;
10842esac
10843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010846 grep -v '^ *+' conftest.er1 >conftest.err
10847 rm -f conftest.er1
10848 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010850 (exit $ac_status); } && {
10851 test -z "$ac_c_werror_flag" ||
10852 test ! -s conftest.err
10853 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010854 ac_lo=$ac_mid; break
10855else
10856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010857sed 's/^/| /' conftest.$ac_ext >&5
10858
Martin v. Löwiseba40652007-08-30 20:10:57 +000010859 ac_hi=`expr '(' $ac_mid ')' - 1`
10860 if test $ac_mid -le $ac_hi; then
10861 ac_lo= ac_hi=
10862 break
10863 fi
10864 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010866
10867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 done
10869else
10870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010871sed 's/^/| /' conftest.$ac_ext >&5
10872
Martin v. Löwiseba40652007-08-30 20:10:57 +000010873 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010875
10876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010878
10879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010880# Binary search between lo and hi bounds.
10881while test "x$ac_lo" != "x$ac_hi"; do
10882 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010884/* confdefs.h. */
10885_ACEOF
10886cat confdefs.h >>conftest.$ac_ext
10887cat >>conftest.$ac_ext <<_ACEOF
10888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010889$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010890 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010891int
10892main ()
10893{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010894static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010895test_array [0] = 0
10896
10897 ;
10898 return 0;
10899}
10900_ACEOF
10901rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010902if { (ac_try="$ac_compile"
10903case "(($ac_try" in
10904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10905 *) ac_try_echo=$ac_try;;
10906esac
10907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10908 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010910 grep -v '^ *+' conftest.er1 >conftest.err
10911 rm -f conftest.er1
10912 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010914 (exit $ac_status); } && {
10915 test -z "$ac_c_werror_flag" ||
10916 test ! -s conftest.err
10917 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 ac_hi=$ac_mid
10919else
10920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010921sed 's/^/| /' conftest.$ac_ext >&5
10922
Martin v. Löwiseba40652007-08-30 20:10:57 +000010923 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010925
10926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010927done
10928case $ac_lo in
10929?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010930'') if test "$ac_cv_type_long_long" = yes; then
10931 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010932See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010933echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010934See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010935 { (exit 77); exit 77; }; }
10936 else
10937 ac_cv_sizeof_long_long=0
10938 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010939esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010940else
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010942/* confdefs.h. */
10943_ACEOF
10944cat confdefs.h >>conftest.$ac_ext
10945cat >>conftest.$ac_ext <<_ACEOF
10946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010947$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010948 typedef long long ac__type_sizeof_;
10949static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10950static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010951#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010952#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010953int
10954main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010955{
Martin v. Löwis11437992002-04-12 09:54:03 +000010956
10957 FILE *f = fopen ("conftest.val", "w");
10958 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010959 return 1;
10960 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010962 long int i = longval ();
10963 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10964 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 fprintf (f, "%ld\n", i);
10966 }
10967 else
10968 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010969 unsigned long int i = ulongval ();
10970 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10971 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 fprintf (f, "%lu\n", i);
10973 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010974 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010975
10976 ;
10977 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010978}
Martin v. Löwis11437992002-04-12 09:54:03 +000010979_ACEOF
10980rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010981if { (ac_try="$ac_link"
10982case "(($ac_try" in
10983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10984 *) ac_try_echo=$ac_try;;
10985esac
10986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10987 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 ac_status=$?
10989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10990 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010991 { (case "(($ac_try" in
10992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10993 *) ac_try_echo=$ac_try;;
10994esac
10995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10996 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 ac_status=$?
10998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10999 (exit $ac_status); }; }; then
11000 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011001else
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 echo "$as_me: program exited with status $ac_status" >&5
11003echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011004sed 's/^/| /' conftest.$ac_ext >&5
11005
Martin v. Löwis11437992002-04-12 09:54:03 +000011006( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011007if test "$ac_cv_type_long_long" = yes; then
11008 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011009See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011010echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011011See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011012 { (exit 77); exit 77; }; }
11013 else
11014 ac_cv_sizeof_long_long=0
11015 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011017rm -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 +000011018fi
11019rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011021{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11022echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11023
11024
11025
Martin v. Löwis11437992002-04-12 09:54:03 +000011026cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011027#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011028_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011029
Michael W. Hudson54241132001-12-07 15:38:26 +000011030
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011031fi
11032
Martin v. Löwiseba40652007-08-30 20:10:57 +000011033{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11034echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011035have_c99_bool=no
11036cat >conftest.$ac_ext <<_ACEOF
11037/* confdefs.h. */
11038_ACEOF
11039cat confdefs.h >>conftest.$ac_ext
11040cat >>conftest.$ac_ext <<_ACEOF
11041/* end confdefs.h. */
11042
11043int
11044main ()
11045{
11046_Bool x; x = (_Bool)0;
11047 ;
11048 return 0;
11049}
11050_ACEOF
11051rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011052if { (ac_try="$ac_compile"
11053case "(($ac_try" in
11054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11055 *) ac_try_echo=$ac_try;;
11056esac
11057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011059 ac_status=$?
11060 grep -v '^ *+' conftest.er1 >conftest.err
11061 rm -f conftest.er1
11062 cat conftest.err >&5
11063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011064 (exit $ac_status); } && {
11065 test -z "$ac_c_werror_flag" ||
11066 test ! -s conftest.err
11067 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011068
11069
11070cat >>confdefs.h <<\_ACEOF
11071#define HAVE_C99_BOOL 1
11072_ACEOF
11073
11074 have_c99_bool=yes
11075
11076else
11077 echo "$as_me: failed program was:" >&5
11078sed 's/^/| /' conftest.$ac_ext >&5
11079
Martin v. Löwiseba40652007-08-30 20:10:57 +000011080
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011082
11083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11084{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11085echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011086if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011087{ echo "$as_me:$LINENO: checking for _Bool" >&5
11088echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011089if test "${ac_cv_type__Bool+set}" = set; then
11090 echo $ECHO_N "(cached) $ECHO_C" >&6
11091else
11092 cat >conftest.$ac_ext <<_ACEOF
11093/* confdefs.h. */
11094_ACEOF
11095cat confdefs.h >>conftest.$ac_ext
11096cat >>conftest.$ac_ext <<_ACEOF
11097/* end confdefs.h. */
11098$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011099typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011100int
11101main ()
11102{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011103if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011104 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011105if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011106 return 0;
11107 ;
11108 return 0;
11109}
11110_ACEOF
11111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011112if { (ac_try="$ac_compile"
11113case "(($ac_try" in
11114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11115 *) ac_try_echo=$ac_try;;
11116esac
11117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011119 ac_status=$?
11120 grep -v '^ *+' conftest.er1 >conftest.err
11121 rm -f conftest.er1
11122 cat conftest.err >&5
11123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011124 (exit $ac_status); } && {
11125 test -z "$ac_c_werror_flag" ||
11126 test ! -s conftest.err
11127 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011128 ac_cv_type__Bool=yes
11129else
11130 echo "$as_me: failed program was:" >&5
11131sed 's/^/| /' conftest.$ac_ext >&5
11132
Martin v. Löwiseba40652007-08-30 20:10:57 +000011133 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011134fi
Brett Cannon19fab762007-06-02 03:02:29 +000011135
Martin v. Löwiseba40652007-08-30 20:10:57 +000011136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11137fi
11138{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11139echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11140
11141# The cast to long int works around a bug in the HP C Compiler
11142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11144# This bug is HP SR number 8606223364.
11145{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11146echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011147if test "${ac_cv_sizeof__Bool+set}" = set; then
11148 echo $ECHO_N "(cached) $ECHO_C" >&6
11149else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011150 if test "$cross_compiling" = yes; then
11151 # Depending upon the size, compute the lo and hi bounds.
11152cat >conftest.$ac_ext <<_ACEOF
11153/* confdefs.h. */
11154_ACEOF
11155cat confdefs.h >>conftest.$ac_ext
11156cat >>conftest.$ac_ext <<_ACEOF
11157/* end confdefs.h. */
11158$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011159 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011160int
11161main ()
11162{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011163static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011164test_array [0] = 0
11165
11166 ;
11167 return 0;
11168}
11169_ACEOF
11170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011171if { (ac_try="$ac_compile"
11172case "(($ac_try" in
11173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11174 *) ac_try_echo=$ac_try;;
11175esac
11176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011178 ac_status=$?
11179 grep -v '^ *+' conftest.er1 >conftest.err
11180 rm -f conftest.er1
11181 cat conftest.err >&5
11182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011183 (exit $ac_status); } && {
11184 test -z "$ac_c_werror_flag" ||
11185 test ! -s conftest.err
11186 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011187 ac_lo=0 ac_mid=0
11188 while :; do
11189 cat >conftest.$ac_ext <<_ACEOF
11190/* confdefs.h. */
11191_ACEOF
11192cat confdefs.h >>conftest.$ac_ext
11193cat >>conftest.$ac_ext <<_ACEOF
11194/* end confdefs.h. */
11195$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011196 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011197int
11198main ()
11199{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011200static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011201test_array [0] = 0
11202
11203 ;
11204 return 0;
11205}
11206_ACEOF
11207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011208if { (ac_try="$ac_compile"
11209case "(($ac_try" in
11210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11211 *) ac_try_echo=$ac_try;;
11212esac
11213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011215 ac_status=$?
11216 grep -v '^ *+' conftest.er1 >conftest.err
11217 rm -f conftest.er1
11218 cat conftest.err >&5
11219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220 (exit $ac_status); } && {
11221 test -z "$ac_c_werror_flag" ||
11222 test ! -s conftest.err
11223 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011224 ac_hi=$ac_mid; break
11225else
11226 echo "$as_me: failed program was:" >&5
11227sed 's/^/| /' conftest.$ac_ext >&5
11228
Martin v. Löwiseba40652007-08-30 20:10:57 +000011229 ac_lo=`expr $ac_mid + 1`
11230 if test $ac_lo -le $ac_mid; then
11231 ac_lo= ac_hi=
11232 break
11233 fi
11234 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011236
11237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011238 done
11239else
11240 echo "$as_me: failed program was:" >&5
11241sed 's/^/| /' conftest.$ac_ext >&5
11242
Martin v. Löwiseba40652007-08-30 20:10:57 +000011243 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011244/* confdefs.h. */
11245_ACEOF
11246cat confdefs.h >>conftest.$ac_ext
11247cat >>conftest.$ac_ext <<_ACEOF
11248/* end confdefs.h. */
11249$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011250 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011251int
11252main ()
11253{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011255test_array [0] = 0
11256
11257 ;
11258 return 0;
11259}
11260_ACEOF
11261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011262if { (ac_try="$ac_compile"
11263case "(($ac_try" in
11264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11265 *) ac_try_echo=$ac_try;;
11266esac
11267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011269 ac_status=$?
11270 grep -v '^ *+' conftest.er1 >conftest.err
11271 rm -f conftest.er1
11272 cat conftest.err >&5
11273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011274 (exit $ac_status); } && {
11275 test -z "$ac_c_werror_flag" ||
11276 test ! -s conftest.err
11277 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011278 ac_hi=-1 ac_mid=-1
11279 while :; do
11280 cat >conftest.$ac_ext <<_ACEOF
11281/* confdefs.h. */
11282_ACEOF
11283cat confdefs.h >>conftest.$ac_ext
11284cat >>conftest.$ac_ext <<_ACEOF
11285/* end confdefs.h. */
11286$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011288int
11289main ()
11290{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011292test_array [0] = 0
11293
11294 ;
11295 return 0;
11296}
11297_ACEOF
11298rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011299if { (ac_try="$ac_compile"
11300case "(($ac_try" in
11301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11302 *) ac_try_echo=$ac_try;;
11303esac
11304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011306 ac_status=$?
11307 grep -v '^ *+' conftest.er1 >conftest.err
11308 rm -f conftest.er1
11309 cat conftest.err >&5
11310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311 (exit $ac_status); } && {
11312 test -z "$ac_c_werror_flag" ||
11313 test ! -s conftest.err
11314 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011315 ac_lo=$ac_mid; break
11316else
11317 echo "$as_me: failed program was:" >&5
11318sed 's/^/| /' conftest.$ac_ext >&5
11319
Martin v. Löwiseba40652007-08-30 20:10:57 +000011320 ac_hi=`expr '(' $ac_mid ')' - 1`
11321 if test $ac_mid -le $ac_hi; then
11322 ac_lo= ac_hi=
11323 break
11324 fi
11325 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011327
11328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011329 done
11330else
11331 echo "$as_me: failed program was:" >&5
11332sed 's/^/| /' conftest.$ac_ext >&5
11333
Martin v. Löwiseba40652007-08-30 20:10:57 +000011334 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011336
11337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011339
11340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011341# Binary search between lo and hi bounds.
11342while test "x$ac_lo" != "x$ac_hi"; do
11343 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11344 cat >conftest.$ac_ext <<_ACEOF
11345/* confdefs.h. */
11346_ACEOF
11347cat confdefs.h >>conftest.$ac_ext
11348cat >>conftest.$ac_ext <<_ACEOF
11349/* end confdefs.h. */
11350$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011351 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011352int
11353main ()
11354{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011356test_array [0] = 0
11357
11358 ;
11359 return 0;
11360}
11361_ACEOF
11362rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011363if { (ac_try="$ac_compile"
11364case "(($ac_try" in
11365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11366 *) ac_try_echo=$ac_try;;
11367esac
11368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011370 ac_status=$?
11371 grep -v '^ *+' conftest.er1 >conftest.err
11372 rm -f conftest.er1
11373 cat conftest.err >&5
11374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011375 (exit $ac_status); } && {
11376 test -z "$ac_c_werror_flag" ||
11377 test ! -s conftest.err
11378 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011379 ac_hi=$ac_mid
11380else
11381 echo "$as_me: failed program was:" >&5
11382sed 's/^/| /' conftest.$ac_ext >&5
11383
Martin v. Löwiseba40652007-08-30 20:10:57 +000011384 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011386
11387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011388done
11389case $ac_lo in
11390?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011391'') if test "$ac_cv_type__Bool" = yes; then
11392 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011393See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011394echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011395See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011396 { (exit 77); exit 77; }; }
11397 else
11398 ac_cv_sizeof__Bool=0
11399 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011400esac
11401else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011402 cat >conftest.$ac_ext <<_ACEOF
11403/* confdefs.h. */
11404_ACEOF
11405cat confdefs.h >>conftest.$ac_ext
11406cat >>conftest.$ac_ext <<_ACEOF
11407/* end confdefs.h. */
11408$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011409 typedef _Bool ac__type_sizeof_;
11410static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11411static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011412#include <stdio.h>
11413#include <stdlib.h>
11414int
11415main ()
11416{
11417
11418 FILE *f = fopen ("conftest.val", "w");
11419 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011420 return 1;
11421 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011422 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011423 long int i = longval ();
11424 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11425 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011426 fprintf (f, "%ld\n", i);
11427 }
11428 else
11429 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011430 unsigned long int i = ulongval ();
11431 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11432 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011433 fprintf (f, "%lu\n", i);
11434 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011435 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011436
11437 ;
11438 return 0;
11439}
11440_ACEOF
11441rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011442if { (ac_try="$ac_link"
11443case "(($ac_try" in
11444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11445 *) ac_try_echo=$ac_try;;
11446esac
11447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11448 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011449 ac_status=$?
11450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011452 { (case "(($ac_try" in
11453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11454 *) ac_try_echo=$ac_try;;
11455esac
11456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11457 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011458 ac_status=$?
11459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11460 (exit $ac_status); }; }; then
11461 ac_cv_sizeof__Bool=`cat conftest.val`
11462else
11463 echo "$as_me: program exited with status $ac_status" >&5
11464echo "$as_me: failed program was:" >&5
11465sed 's/^/| /' conftest.$ac_ext >&5
11466
11467( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011468if test "$ac_cv_type__Bool" = yes; then
11469 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011470See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011472See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473 { (exit 77); exit 77; }; }
11474 else
11475 ac_cv_sizeof__Bool=0
11476 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011478rm -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 +000011479fi
11480rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011482{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11483echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11484
11485
11486
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011487cat >>confdefs.h <<_ACEOF
11488#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11489_ACEOF
11490
11491
11492fi
11493
Martin v. Löwiseba40652007-08-30 20:10:57 +000011494{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11495echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011496if test "${ac_cv_type_uintptr_t+set}" = set; then
11497 echo $ECHO_N "(cached) $ECHO_C" >&6
11498else
11499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011500/* confdefs.h. */
11501_ACEOF
11502cat confdefs.h >>conftest.$ac_ext
11503cat >>conftest.$ac_ext <<_ACEOF
11504/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011505#ifdef HAVE_STDINT_H
11506 #include <stdint.h>
11507 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011508
Martin v. Löwiseba40652007-08-30 20:10:57 +000011509typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011510int
11511main ()
11512{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011513if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011514 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011515if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011516 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 ;
11518 return 0;
11519}
11520_ACEOF
11521rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011522if { (ac_try="$ac_compile"
11523case "(($ac_try" in
11524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11525 *) ac_try_echo=$ac_try;;
11526esac
11527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011530 grep -v '^ *+' conftest.er1 >conftest.err
11531 rm -f conftest.er1
11532 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534 (exit $ac_status); } && {
11535 test -z "$ac_c_werror_flag" ||
11536 test ! -s conftest.err
11537 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011538 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011539else
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011541sed 's/^/| /' conftest.$ac_ext >&5
11542
Martin v. Löwiseba40652007-08-30 20:10:57 +000011543 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011545
11546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011548{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11549echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011550if test $ac_cv_type_uintptr_t = yes; then
11551
11552cat >>confdefs.h <<_ACEOF
11553#define HAVE_UINTPTR_T 1
11554_ACEOF
11555
Martin v. Löwiseba40652007-08-30 20:10:57 +000011556{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11557echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011558if test "${ac_cv_type_uintptr_t+set}" = set; then
11559 echo $ECHO_N "(cached) $ECHO_C" >&6
11560else
11561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011562/* confdefs.h. */
11563_ACEOF
11564cat confdefs.h >>conftest.$ac_ext
11565cat >>conftest.$ac_ext <<_ACEOF
11566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011567$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011568typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011569int
11570main ()
11571{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011574if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 return 0;
11576 ;
11577 return 0;
11578}
11579_ACEOF
11580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011581if { (ac_try="$ac_compile"
11582case "(($ac_try" in
11583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11584 *) ac_try_echo=$ac_try;;
11585esac
11586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011589 grep -v '^ *+' conftest.er1 >conftest.err
11590 rm -f conftest.er1
11591 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011593 (exit $ac_status); } && {
11594 test -z "$ac_c_werror_flag" ||
11595 test ! -s conftest.err
11596 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 ac_cv_type_uintptr_t=yes
11598else
11599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011600sed 's/^/| /' conftest.$ac_ext >&5
11601
Martin v. Löwiseba40652007-08-30 20:10:57 +000011602 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011603fi
Brett Cannon19fab762007-06-02 03:02:29 +000011604
Martin v. Löwiseba40652007-08-30 20:10:57 +000011605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11606fi
11607{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11608echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11609
11610# The cast to long int works around a bug in the HP C Compiler
11611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11613# This bug is HP SR number 8606223364.
11614{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11615echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011616if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11617 echo $ECHO_N "(cached) $ECHO_C" >&6
11618else
Martin v. Löwis11437992002-04-12 09:54:03 +000011619 if test "$cross_compiling" = yes; then
11620 # Depending upon the size, compute the lo and hi bounds.
11621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011622/* confdefs.h. */
11623_ACEOF
11624cat confdefs.h >>conftest.$ac_ext
11625cat >>conftest.$ac_ext <<_ACEOF
11626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011627$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011628 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011629int
11630main ()
11631{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011632static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011633test_array [0] = 0
11634
11635 ;
11636 return 0;
11637}
11638_ACEOF
11639rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011640if { (ac_try="$ac_compile"
11641case "(($ac_try" in
11642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11643 *) ac_try_echo=$ac_try;;
11644esac
11645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011648 grep -v '^ *+' conftest.er1 >conftest.err
11649 rm -f conftest.er1
11650 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011652 (exit $ac_status); } && {
11653 test -z "$ac_c_werror_flag" ||
11654 test ! -s conftest.err
11655 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011656 ac_lo=0 ac_mid=0
11657 while :; do
11658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011659/* confdefs.h. */
11660_ACEOF
11661cat confdefs.h >>conftest.$ac_ext
11662cat >>conftest.$ac_ext <<_ACEOF
11663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011664$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011665 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011666int
11667main ()
11668{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011669static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011670test_array [0] = 0
11671
11672 ;
11673 return 0;
11674}
11675_ACEOF
11676rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011677if { (ac_try="$ac_compile"
11678case "(($ac_try" in
11679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11680 *) ac_try_echo=$ac_try;;
11681esac
11682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011685 grep -v '^ *+' conftest.er1 >conftest.err
11686 rm -f conftest.er1
11687 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011689 (exit $ac_status); } && {
11690 test -z "$ac_c_werror_flag" ||
11691 test ! -s conftest.err
11692 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011693 ac_hi=$ac_mid; break
11694else
11695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011696sed 's/^/| /' conftest.$ac_ext >&5
11697
Martin v. Löwiseba40652007-08-30 20:10:57 +000011698 ac_lo=`expr $ac_mid + 1`
11699 if test $ac_lo -le $ac_mid; then
11700 ac_lo= ac_hi=
11701 break
11702 fi
11703 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011705
11706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011707 done
11708else
11709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011710sed 's/^/| /' conftest.$ac_ext >&5
11711
Martin v. Löwiseba40652007-08-30 20:10:57 +000011712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011713/* confdefs.h. */
11714_ACEOF
11715cat confdefs.h >>conftest.$ac_ext
11716cat >>conftest.$ac_ext <<_ACEOF
11717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011718$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011719 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011720int
11721main ()
11722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011724test_array [0] = 0
11725
11726 ;
11727 return 0;
11728}
11729_ACEOF
11730rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011731if { (ac_try="$ac_compile"
11732case "(($ac_try" in
11733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11734 *) ac_try_echo=$ac_try;;
11735esac
11736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011739 grep -v '^ *+' conftest.er1 >conftest.err
11740 rm -f conftest.er1
11741 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011743 (exit $ac_status); } && {
11744 test -z "$ac_c_werror_flag" ||
11745 test ! -s conftest.err
11746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 ac_hi=-1 ac_mid=-1
11748 while :; do
11749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011750/* confdefs.h. */
11751_ACEOF
11752cat confdefs.h >>conftest.$ac_ext
11753cat >>conftest.$ac_ext <<_ACEOF
11754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011755$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011756 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011757int
11758main ()
11759{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011760static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011761test_array [0] = 0
11762
11763 ;
11764 return 0;
11765}
11766_ACEOF
11767rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011768if { (ac_try="$ac_compile"
11769case "(($ac_try" in
11770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11771 *) ac_try_echo=$ac_try;;
11772esac
11773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011776 grep -v '^ *+' conftest.er1 >conftest.err
11777 rm -f conftest.er1
11778 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011780 (exit $ac_status); } && {
11781 test -z "$ac_c_werror_flag" ||
11782 test ! -s conftest.err
11783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011784 ac_lo=$ac_mid; break
11785else
11786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011787sed 's/^/| /' conftest.$ac_ext >&5
11788
Martin v. Löwiseba40652007-08-30 20:10:57 +000011789 ac_hi=`expr '(' $ac_mid ')' - 1`
11790 if test $ac_mid -le $ac_hi; then
11791 ac_lo= ac_hi=
11792 break
11793 fi
11794 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011796
11797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011798 done
11799else
11800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011801sed 's/^/| /' conftest.$ac_ext >&5
11802
Martin v. Löwiseba40652007-08-30 20:10:57 +000011803 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011805
11806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011808
11809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011810# Binary search between lo and hi bounds.
11811while test "x$ac_lo" != "x$ac_hi"; do
11812 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011814/* confdefs.h. */
11815_ACEOF
11816cat confdefs.h >>conftest.$ac_ext
11817cat >>conftest.$ac_ext <<_ACEOF
11818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011819$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011820 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011821int
11822main ()
11823{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011825test_array [0] = 0
11826
11827 ;
11828 return 0;
11829}
11830_ACEOF
11831rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011832if { (ac_try="$ac_compile"
11833case "(($ac_try" in
11834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11835 *) ac_try_echo=$ac_try;;
11836esac
11837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011840 grep -v '^ *+' conftest.er1 >conftest.err
11841 rm -f conftest.er1
11842 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011844 (exit $ac_status); } && {
11845 test -z "$ac_c_werror_flag" ||
11846 test ! -s conftest.err
11847 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 ac_hi=$ac_mid
11849else
11850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011851sed 's/^/| /' conftest.$ac_ext >&5
11852
Martin v. Löwiseba40652007-08-30 20:10:57 +000011853 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011855
11856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011857done
11858case $ac_lo in
11859?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011860'') if test "$ac_cv_type_uintptr_t" = yes; then
11861 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011862See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011863echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011864See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011865 { (exit 77); exit 77; }; }
11866 else
11867 ac_cv_sizeof_uintptr_t=0
11868 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011869esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011870else
Martin v. Löwis11437992002-04-12 09:54:03 +000011871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011872/* confdefs.h. */
11873_ACEOF
11874cat confdefs.h >>conftest.$ac_ext
11875cat >>conftest.$ac_ext <<_ACEOF
11876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011877$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011878 typedef uintptr_t ac__type_sizeof_;
11879static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11880static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011881#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011882#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011883int
11884main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011885{
Martin v. Löwis11437992002-04-12 09:54:03 +000011886
11887 FILE *f = fopen ("conftest.val", "w");
11888 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011889 return 1;
11890 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011891 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011892 long int i = longval ();
11893 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11894 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011895 fprintf (f, "%ld\n", i);
11896 }
11897 else
11898 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011899 unsigned long int i = ulongval ();
11900 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11901 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011902 fprintf (f, "%lu\n", i);
11903 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011904 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011905
11906 ;
11907 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011908}
Martin v. Löwis11437992002-04-12 09:54:03 +000011909_ACEOF
11910rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011911if { (ac_try="$ac_link"
11912case "(($ac_try" in
11913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11914 *) ac_try_echo=$ac_try;;
11915esac
11916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11917 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 ac_status=$?
11919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011921 { (case "(($ac_try" in
11922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11923 *) ac_try_echo=$ac_try;;
11924esac
11925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11926 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011927 ac_status=$?
11928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11929 (exit $ac_status); }; }; then
11930 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011931else
Martin v. Löwis11437992002-04-12 09:54:03 +000011932 echo "$as_me: program exited with status $ac_status" >&5
11933echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011934sed 's/^/| /' conftest.$ac_ext >&5
11935
Martin v. Löwis11437992002-04-12 09:54:03 +000011936( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011937if test "$ac_cv_type_uintptr_t" = yes; then
11938 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011939See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011940echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011941See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011942 { (exit 77); exit 77; }; }
11943 else
11944 ac_cv_sizeof_uintptr_t=0
11945 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011947rm -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 +000011948fi
11949rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011951{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11952echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
11953
11954
11955
Martin v. Löwis11437992002-04-12 09:54:03 +000011956cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011957#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011958_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011959
Michael W. Hudson54241132001-12-07 15:38:26 +000011960
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011961fi
11962
Martin v. Löwisebe26702006-10-02 14:55:51 +000011963
11964
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011965# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011966{ echo "$as_me:$LINENO: checking size of off_t" >&5
11967echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011968if test "${ac_cv_sizeof_off_t+set}" = set; then
11969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011970else
11971 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011972 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011973else
Martin v. Löwis11437992002-04-12 09:54:03 +000011974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011975/* confdefs.h. */
11976_ACEOF
11977cat confdefs.h >>conftest.$ac_ext
11978cat >>conftest.$ac_ext <<_ACEOF
11979/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011980#include <stdio.h>
11981#include <sys/types.h>
11982main()
11983{
11984 FILE *f=fopen("conftestval", "w");
11985 if (!f) exit(1);
11986 fprintf(f, "%d\n", sizeof(off_t));
11987 exit(0);
11988}
Martin v. Löwis11437992002-04-12 09:54:03 +000011989_ACEOF
11990rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011991if { (ac_try="$ac_link"
11992case "(($ac_try" in
11993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11994 *) ac_try_echo=$ac_try;;
11995esac
11996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11997 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011998 ac_status=$?
11999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012001 { (case "(($ac_try" in
12002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12003 *) ac_try_echo=$ac_try;;
12004esac
12005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12006 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 ac_status=$?
12008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12009 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012010 ac_cv_sizeof_off_t=`cat conftestval`
12011else
Martin v. Löwis11437992002-04-12 09:54:03 +000012012 echo "$as_me: program exited with status $ac_status" >&5
12013echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012014sed 's/^/| /' conftest.$ac_ext >&5
12015
Martin v. Löwis11437992002-04-12 09:54:03 +000012016( exit $ac_status )
12017ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012019rm -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 +000012020fi
12021
Martin v. Löwiseba40652007-08-30 20:10:57 +000012022
12023
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012024fi
12025
Martin v. Löwiseba40652007-08-30 20:10:57 +000012026{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12027echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012028
12029cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012030#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012031_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012032
Michael W. Hudson54241132001-12-07 15:38:26 +000012033
Martin v. Löwiseba40652007-08-30 20:10:57 +000012034{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12035echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012036if test "$have_long_long" = yes -a \
12037 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12038 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012039
Martin v. Löwis11437992002-04-12 09:54:03 +000012040cat >>confdefs.h <<\_ACEOF
12041#define HAVE_LARGEFILE_SUPPORT 1
12042_ACEOF
12043
Martin v. Löwiseba40652007-08-30 20:10:57 +000012044 { echo "$as_me:$LINENO: result: yes" >&5
12045echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012046else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012047 { echo "$as_me:$LINENO: result: no" >&5
12048echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012049fi
12050
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012051# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012052{ echo "$as_me:$LINENO: checking size of time_t" >&5
12053echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012054if test "${ac_cv_sizeof_time_t+set}" = set; then
12055 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012056else
12057 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012058 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012059else
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012061/* confdefs.h. */
12062_ACEOF
12063cat confdefs.h >>conftest.$ac_ext
12064cat >>conftest.$ac_ext <<_ACEOF
12065/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012066#include <stdio.h>
12067#include <time.h>
12068main()
12069{
12070 FILE *f=fopen("conftestval", "w");
12071 if (!f) exit(1);
12072 fprintf(f, "%d\n", sizeof(time_t));
12073 exit(0);
12074}
Martin v. Löwis11437992002-04-12 09:54:03 +000012075_ACEOF
12076rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012077if { (ac_try="$ac_link"
12078case "(($ac_try" in
12079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12080 *) ac_try_echo=$ac_try;;
12081esac
12082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12083 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 ac_status=$?
12085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12086 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012087 { (case "(($ac_try" in
12088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12089 *) ac_try_echo=$ac_try;;
12090esac
12091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12092 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012093 ac_status=$?
12094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12095 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012096 ac_cv_sizeof_time_t=`cat conftestval`
12097else
Martin v. Löwis11437992002-04-12 09:54:03 +000012098 echo "$as_me: program exited with status $ac_status" >&5
12099echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012100sed 's/^/| /' conftest.$ac_ext >&5
12101
Martin v. Löwis11437992002-04-12 09:54:03 +000012102( exit $ac_status )
12103ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012105rm -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 +000012106fi
12107
Martin v. Löwiseba40652007-08-30 20:10:57 +000012108
12109
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012110fi
12111
Martin v. Löwiseba40652007-08-30 20:10:57 +000012112{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12113echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012114
12115cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012116#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012117_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012118
Michael W. Hudson54241132001-12-07 15:38:26 +000012119
12120
Trent Mick635f6fb2000-08-23 21:33:05 +000012121# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012122ac_save_cc="$CC"
12123if test "$ac_cv_kpthread" = "yes"
12124then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012125elif test "$ac_cv_kthread" = "yes"
12126then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012127elif test "$ac_cv_pthread" = "yes"
12128then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012130{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12131echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012132have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012134/* confdefs.h. */
12135_ACEOF
12136cat confdefs.h >>conftest.$ac_ext
12137cat >>conftest.$ac_ext <<_ACEOF
12138/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012139#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012140int
12141main ()
12142{
Guido van Rossum12580492000-09-24 16:47:19 +000012143pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 ;
12145 return 0;
12146}
12147_ACEOF
12148rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012149if { (ac_try="$ac_compile"
12150case "(($ac_try" in
12151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12152 *) ac_try_echo=$ac_try;;
12153esac
12154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12155 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012157 grep -v '^ *+' conftest.er1 >conftest.err
12158 rm -f conftest.er1
12159 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012161 (exit $ac_status); } && {
12162 test -z "$ac_c_werror_flag" ||
12163 test ! -s conftest.err
12164 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012165 have_pthread_t=yes
12166else
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012168sed 's/^/| /' conftest.$ac_ext >&5
12169
Martin v. Löwiseba40652007-08-30 20:10:57 +000012170
Trent Mick635f6fb2000-08-23 21:33:05 +000012171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172
12173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12174{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12175echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012176if test "$have_pthread_t" = yes ; then
12177 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012178 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12179echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12181 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012182else
12183 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012184 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012185else
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012187/* confdefs.h. */
12188_ACEOF
12189cat confdefs.h >>conftest.$ac_ext
12190cat >>conftest.$ac_ext <<_ACEOF
12191/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012192#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012193#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012194 main()
12195 {
12196 FILE *f=fopen("conftestval", "w");
12197 if (!f) exit(1);
12198 fprintf(f, "%d\n", sizeof(pthread_t));
12199 exit(0);
12200 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012201_ACEOF
12202rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203if { (ac_try="$ac_link"
12204case "(($ac_try" in
12205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12206 *) ac_try_echo=$ac_try;;
12207esac
12208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12209 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 ac_status=$?
12211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12212 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012213 { (case "(($ac_try" in
12214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12215 *) ac_try_echo=$ac_try;;
12216esac
12217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12218 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 ac_status=$?
12220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12221 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012222 ac_cv_sizeof_pthread_t=`cat conftestval`
12223else
Martin v. Löwis11437992002-04-12 09:54:03 +000012224 echo "$as_me: program exited with status $ac_status" >&5
12225echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012226sed 's/^/| /' conftest.$ac_ext >&5
12227
Martin v. Löwis11437992002-04-12 09:54:03 +000012228( exit $ac_status )
12229ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231rm -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 +000012232fi
12233
Martin v. Löwiseba40652007-08-30 20:10:57 +000012234
12235
Trent Mick635f6fb2000-08-23 21:33:05 +000012236fi
12237
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12239echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012240
12241cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012242#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012243_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012244
12245fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012246CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012247
Martin v. Löwiseba40652007-08-30 20:10:57 +000012248{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12249echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12250# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012251if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012252 enableval=$enable_toolbox_glue;
12253fi
Jack Jansene578a632001-08-15 01:27:14 +000012254
12255
12256if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012257then
Jack Jansene578a632001-08-15 01:27:14 +000012258 case $ac_sys_system/$ac_sys_release in
12259 Darwin/*)
12260 enable_toolbox_glue="yes";;
12261 *)
12262 enable_toolbox_glue="no";;
12263 esac
12264fi
12265case "$enable_toolbox_glue" in
12266yes)
Jack Jansene578a632001-08-15 01:27:14 +000012267 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012268 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
12270cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012271#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012272_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012273
12274 ;;
12275*)
Jack Jansene578a632001-08-15 01:27:14 +000012276 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012277 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012278 ;;
12279esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012280{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12281echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012282
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012283
12284case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012285 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012286 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12287 ;;
12288 Darwin/*)
12289 OTHER_LIBTOOL_OPT=""
12290 ;;
12291esac
12292
12293
12294case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012295 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012296 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12297 if test "${enable_universalsdk}"; then
12298 :
12299 else
12300 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12301 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012302 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012303 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012304 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012305 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12306 if test ${gcc_version} '<' 4.0
12307 then
12308 LIBTOOL_CRUFT="-lcc_dynamic"
12309 else
12310 LIBTOOL_CRUFT=""
12311 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012312 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012313 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012314 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012315esac
12316
Martin v. Löwiseba40652007-08-30 20:10:57 +000012317{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12318echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012319if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012320then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012321 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012322 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012323 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012324
Martin v. Löwis11437992002-04-12 09:54:03 +000012325cat >>confdefs.h <<\_ACEOF
12326#define WITH_NEXT_FRAMEWORK 1
12327_ACEOF
12328
Martin v. Löwiseba40652007-08-30 20:10:57 +000012329 { echo "$as_me:$LINENO: result: yes" >&5
12330echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012331else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012332 { echo "$as_me:$LINENO: result: no" >&5
12333echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012334fi
12335
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336{ echo "$as_me:$LINENO: checking for dyld" >&5
12337echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012338case $ac_sys_system/$ac_sys_release in
12339 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012340
Martin v. Löwis11437992002-04-12 09:54:03 +000012341cat >>confdefs.h <<\_ACEOF
12342#define WITH_DYLD 1
12343_ACEOF
12344
Martin v. Löwiseba40652007-08-30 20:10:57 +000012345 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12346echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012347 ;;
12348 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012349 { echo "$as_me:$LINENO: result: no" >&5
12350echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012351 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012352esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012353
Guido van Rossum0a516c91994-09-12 10:58:40 +000012354# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012355
Michael W. Hudson54241132001-12-07 15:38:26 +000012356
12357
12358
12359
Guido van Rossum0a516c91994-09-12 10:58:40 +000012360# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012361# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012362{ echo "$as_me:$LINENO: checking SO" >&5
12363echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012364if test -z "$SO"
12365then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012366 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012367 hp*|HP*)
12368 case `uname -m` in
12369 ia64) SO=.so;;
12370 *) SO=.sl;;
12371 esac
12372 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012373 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012374 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012375 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012376else
12377 # this might also be a termcap variable, see #610332
12378 echo
12379 echo '====================================================================='
12380 echo '+ +'
12381 echo '+ WARNING: You have set SO in your environment. +'
12382 echo '+ Do you really mean to change the extension for shared libraries? +'
12383 echo '+ Continuing in 10 seconds to let you to ponder. +'
12384 echo '+ +'
12385 echo '====================================================================='
12386 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012388{ echo "$as_me:$LINENO: result: $SO" >&5
12389echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012390
12391cat >>confdefs.h <<_ACEOF
12392#define SHLIB_EXT "$SO"
12393_ACEOF
12394
Guido van Rossum0a516c91994-09-12 10:58:40 +000012395# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012396# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012397# (Shared libraries in this instance are shared modules to be loaded into
12398# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012399{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12400echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012401if test -z "$LDSHARED"
12402then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012403 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012404 AIX*)
12405 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012406 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012407 ;;
12408 BeOS*)
12409 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012410 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012411 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012412 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012413 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012414 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012415 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012416 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012417 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012418 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012419 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012420 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012421 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012422 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12423 if test "$enable_framework" ; then
12424 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012425 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12426 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012427 else
12428 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012429 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012430 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012431 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012432 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12433 if test "$enable_framework" ; then
12434 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012435 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12436 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012437 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012438 # No framework, use the Python app as bundle-loader
12439 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012440 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012441 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012442 Darwin/*)
12443 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12444 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012445 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012446 if test ${cur_target} '>' 10.2; then
12447 cur_target=10.3
12448 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012449 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012450
12451 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12452 # environment with a value that is the same as what we'll use
12453 # in the Makefile to ensure that we'll get the same compiler
12454 # environment during configure and build time.
12455 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12456 export MACOSX_DEPLOYMENT_TARGET
12457
Ronald Oussoren988117f2006-04-29 11:31:35 +000012458 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012459 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012460 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012461 if test "${enable_universalsdk}"; then
12462 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12463 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012464 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12465 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012466 else
12467 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12468 if test "$enable_framework" ; then
12469 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012470 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12471 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012472 else
12473 # No framework, use the Python app as bundle-loader
12474 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12475 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12476 fi
12477 fi
12478 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012479 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012480 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012481 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012482 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012483 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012484 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012485 else
12486 LDSHARED="ld -Bshareable ${LDFLAGS}"
12487 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012488 OpenBSD*)
12489 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12490 then
12491 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12492 else
12493 case `uname -r` in
12494 [01].* | 2.[0-7] | 2.[0-7].*)
12495 LDSHARED="ld -Bshareable ${LDFLAGS}"
12496 ;;
12497 *)
12498 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12499 ;;
12500 esac
12501 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012502 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012503 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012504 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012505 then LDSHARED='$(CC) -shared'
12506 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012507 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012508 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012509 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012510 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012511 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012512 *) LDSHARED="ld";;
12513 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012515{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12516echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012517BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012518# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012519# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012520{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12521echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012522if test -z "$CCSHARED"
12523then
Guido van Rossum07397971997-04-29 21:49:50 +000012524 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012525 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012526 then CCSHARED="-fPIC";
12527 elif test `uname -p` = sparc;
12528 then CCSHARED="-xcode=pic32";
12529 else CCSHARED="-Kpic";
12530 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012531 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012532 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012533 else CCSHARED="+z";
12534 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012535 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012536 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012537 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012538 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012539 if test "$GCC" = "yes"
12540 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012541 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012542 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012543 SCO_SV*)
12544 if test "$GCC" = "yes"
12545 then CCSHARED="-fPIC"
12546 else CCSHARED="-Kpic -belf"
12547 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012548 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012549 IRIX*/6*) case $CC in
12550 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012551 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012552 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012553 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012554 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012556{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12557echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012558# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012559# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012560{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12561echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012562if test -z "$LINKFORSHARED"
12563then
Guido van Rossum07397971997-04-29 21:49:50 +000012564 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012565 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012566 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012567 LINKFORSHARED="-Wl,-E -Wl,+s";;
12568# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012569 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012570 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012571 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012572 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012573 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12574 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012575 # not used by the core itself but which needs to be in the core so
12576 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012577 # -prebind is no longer used, because it actually seems to give a
12578 # slowdown in stead of a speedup, maybe due to the large number of
12579 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012580
12581 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012582 if test "$enable_framework"
12583 then
Jack Jansenda49e192005-01-07 13:08:22 +000012584 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012585 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012586 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012587 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012588 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012589 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012590 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012591 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12592 then
12593 LINKFORSHARED="-Wl,--export-dynamic"
12594 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012595 SunOS/5*) case $CC in
12596 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012597 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012598 then
12599 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012600 fi;;
12601 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012602 CYGWIN*)
12603 if test $enable_shared = "no"
12604 then
12605 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12606 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012607 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012609{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12610echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012611
Michael W. Hudson54241132001-12-07 15:38:26 +000012612
Martin v. Löwiseba40652007-08-30 20:10:57 +000012613{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12614echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012615if test ! "$LIBRARY" = "$LDLIBRARY"
12616then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012617 case $ac_sys_system in
12618 CYGWIN*)
12619 # Cygwin needs CCSHARED when building extension DLLs
12620 # but not when building the interpreter DLL.
12621 CFLAGSFORSHARED='';;
12622 *)
12623 CFLAGSFORSHARED='$(CCSHARED)'
12624 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012626{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12627echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012628
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012629# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12630# library (with --enable-shared).
12631# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012632# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12633# if it is not required, since it creates a dependency of the shared library
12634# to LIBS. This, in turn, means that applications linking the shared libpython
12635# don't need to link LIBS explicitly. The default should be only changed
12636# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012637
Martin v. Löwiseba40652007-08-30 20:10:57 +000012638{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12639echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012640case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012641 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012642 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012643esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012644{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12645echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012646
12647
Guido van Rossum627b2d71993-12-24 10:39:16 +000012648# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012649
Martin v. Löwiseba40652007-08-30 20:10:57 +000012650{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12651echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012652if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12653 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654else
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012656LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012658/* confdefs.h. */
12659_ACEOF
12660cat confdefs.h >>conftest.$ac_ext
12661cat >>conftest.$ac_ext <<_ACEOF
12662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012663
Martin v. Löwiseba40652007-08-30 20:10:57 +000012664/* Override any GCC internal prototype to avoid an error.
12665 Use char because int might match the return type of a GCC
12666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012667#ifdef __cplusplus
12668extern "C"
12669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012670char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012671int
12672main ()
12673{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012674return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 ;
12676 return 0;
12677}
12678_ACEOF
12679rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012680if { (ac_try="$ac_link"
12681case "(($ac_try" in
12682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12683 *) ac_try_echo=$ac_try;;
12684esac
12685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12686 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012688 grep -v '^ *+' conftest.er1 >conftest.err
12689 rm -f conftest.er1
12690 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012692 (exit $ac_status); } && {
12693 test -z "$ac_c_werror_flag" ||
12694 test ! -s conftest.err
12695 } && test -s conftest$ac_exeext &&
12696 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012698else
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012700sed 's/^/| /' conftest.$ac_ext >&5
12701
Martin v. Löwiseba40652007-08-30 20:10:57 +000012702 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012704
12705rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012706 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012707LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012709{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12710echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012711if test $ac_cv_lib_dl_dlopen = yes; then
12712 cat >>confdefs.h <<_ACEOF
12713#define HAVE_LIBDL 1
12714_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012715
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012716 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012717
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718fi
12719 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
Martin v. Löwiseba40652007-08-30 20:10:57 +000012721{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12722echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012723if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012725else
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012727LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012728cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012729/* confdefs.h. */
12730_ACEOF
12731cat confdefs.h >>conftest.$ac_ext
12732cat >>conftest.$ac_ext <<_ACEOF
12733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Martin v. Löwiseba40652007-08-30 20:10:57 +000012735/* Override any GCC internal prototype to avoid an error.
12736 Use char because int might match the return type of a GCC
12737 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012738#ifdef __cplusplus
12739extern "C"
12740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012741char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012742int
12743main ()
12744{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012745return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ;
12747 return 0;
12748}
12749_ACEOF
12750rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012751if { (ac_try="$ac_link"
12752case "(($ac_try" in
12753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12754 *) ac_try_echo=$ac_try;;
12755esac
12756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12757 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012759 grep -v '^ *+' conftest.er1 >conftest.err
12760 rm -f conftest.er1
12761 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012763 (exit $ac_status); } && {
12764 test -z "$ac_c_werror_flag" ||
12765 test ! -s conftest.err
12766 } && test -s conftest$ac_exeext &&
12767 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769else
Martin v. Löwis11437992002-04-12 09:54:03 +000012770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012771sed 's/^/| /' conftest.$ac_ext >&5
12772
Martin v. Löwiseba40652007-08-30 20:10:57 +000012773 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012775
12776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012777 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012778LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012780{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12781echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012782if test $ac_cv_lib_dld_shl_load = yes; then
12783 cat >>confdefs.h <<_ACEOF
12784#define HAVE_LIBDLD 1
12785_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012786
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012787 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012788
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012789fi
12790 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012791
12792# only check for sem_ini if thread support is requested
12793if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12795echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012796if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012797 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012798else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012799 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012801/* confdefs.h. */
12802_ACEOF
12803cat confdefs.h >>conftest.$ac_ext
12804cat >>conftest.$ac_ext <<_ACEOF
12805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
Martin v. Löwiseba40652007-08-30 20:10:57 +000012807/* Override any GCC internal prototype to avoid an error.
12808 Use char because int might match the return type of a GCC
12809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012810#ifdef __cplusplus
12811extern "C"
12812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012813char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012814int
12815main ()
12816{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012817return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012818 ;
12819 return 0;
12820}
12821_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012822for ac_lib in '' pthread rt posix4; do
12823 if test -z "$ac_lib"; then
12824 ac_res="none required"
12825 else
12826 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012827 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012828 fi
12829 rm -f conftest.$ac_objext conftest$ac_exeext
12830if { (ac_try="$ac_link"
12831case "(($ac_try" in
12832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12833 *) ac_try_echo=$ac_try;;
12834esac
12835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12836 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012837 ac_status=$?
12838 grep -v '^ *+' conftest.er1 >conftest.err
12839 rm -f conftest.er1
12840 cat conftest.err >&5
12841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012842 (exit $ac_status); } && {
12843 test -z "$ac_c_werror_flag" ||
12844 test ! -s conftest.err
12845 } && test -s conftest$ac_exeext &&
12846 $as_test_x conftest$ac_exeext; then
12847 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012848else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012849 echo "$as_me: failed program was:" >&5
12850sed 's/^/| /' conftest.$ac_ext >&5
12851
Martin v. Löwiseba40652007-08-30 20:10:57 +000012852
Brett Cannon19fab762007-06-02 03:02:29 +000012853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012854
12855rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12856 conftest$ac_exeext
12857 if test "${ac_cv_search_sem_init+set}" = set; then
12858 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012860done
12861if test "${ac_cv_search_sem_init+set}" = set; then
12862 :
12863else
12864 ac_cv_search_sem_init=no
12865fi
12866rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012867LIBS=$ac_func_search_save_LIBS
12868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012869{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12870echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12871ac_res=$ac_cv_search_sem_init
12872if test "$ac_res" != no; then
12873 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012874
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012875fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012876 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012877 # posix4 on Solaris 2.6
12878 # pthread (first!) on Linux
12879fi
12880
Martin v. Löwis19d17342003-06-14 21:03:05 +000012881# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012882{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12883echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012884if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12885 echo $ECHO_N "(cached) $ECHO_C" >&6
12886else
12887 ac_check_lib_save_LIBS=$LIBS
12888LIBS="-lintl $LIBS"
12889cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012890/* confdefs.h. */
12891_ACEOF
12892cat confdefs.h >>conftest.$ac_ext
12893cat >>conftest.$ac_ext <<_ACEOF
12894/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012895
Martin v. Löwiseba40652007-08-30 20:10:57 +000012896/* Override any GCC internal prototype to avoid an error.
12897 Use char because int might match the return type of a GCC
12898 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012899#ifdef __cplusplus
12900extern "C"
12901#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012902char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012903int
12904main ()
12905{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012906return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012907 ;
12908 return 0;
12909}
12910_ACEOF
12911rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012912if { (ac_try="$ac_link"
12913case "(($ac_try" in
12914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12915 *) ac_try_echo=$ac_try;;
12916esac
12917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12918 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012920 grep -v '^ *+' conftest.er1 >conftest.err
12921 rm -f conftest.er1
12922 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012924 (exit $ac_status); } && {
12925 test -z "$ac_c_werror_flag" ||
12926 test ! -s conftest.err
12927 } && test -s conftest$ac_exeext &&
12928 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012929 ac_cv_lib_intl_textdomain=yes
12930else
12931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012932sed 's/^/| /' conftest.$ac_ext >&5
12933
Martin v. Löwiseba40652007-08-30 20:10:57 +000012934 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012936
12937rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012939LIBS=$ac_check_lib_save_LIBS
12940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012941{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12942echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012943if test $ac_cv_lib_intl_textdomain = yes; then
12944
12945cat >>confdefs.h <<\_ACEOF
12946#define WITH_LIBINTL 1
12947_ACEOF
12948
12949fi
12950
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012951
12952# checks for system dependent C++ extensions support
12953case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000012954 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12955echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012957/* confdefs.h. */
12958_ACEOF
12959cat confdefs.h >>conftest.$ac_ext
12960cat >>conftest.$ac_ext <<_ACEOF
12961/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012962#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012963int
12964main ()
12965{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012966loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 ;
12968 return 0;
12969}
12970_ACEOF
12971rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012972if { (ac_try="$ac_link"
12973case "(($ac_try" in
12974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12975 *) ac_try_echo=$ac_try;;
12976esac
12977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12978 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012980 grep -v '^ *+' conftest.er1 >conftest.err
12981 rm -f conftest.er1
12982 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012984 (exit $ac_status); } && {
12985 test -z "$ac_c_werror_flag" ||
12986 test ! -s conftest.err
12987 } && test -s conftest$ac_exeext &&
12988 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012989
Martin v. Löwis11437992002-04-12 09:54:03 +000012990cat >>confdefs.h <<\_ACEOF
12991#define AIX_GENUINE_CPLUSPLUS 1
12992_ACEOF
12993
Martin v. Löwiseba40652007-08-30 20:10:57 +000012994 { echo "$as_me:$LINENO: result: yes" >&5
12995echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012996else
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012998sed 's/^/| /' conftest.$ac_ext >&5
12999
Martin v. Löwiseba40652007-08-30 20:10:57 +000013000 { echo "$as_me:$LINENO: result: no" >&5
13001echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013003
13004rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013005 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013006 *) ;;
13007esac
13008
Guido van Rossum70c7f481998-03-26 18:44:10 +000013009# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013010# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013011{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13012echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013013if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13014 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013015else
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013017LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013019/* confdefs.h. */
13020_ACEOF
13021cat confdefs.h >>conftest.$ac_ext
13022cat >>conftest.$ac_ext <<_ACEOF
13023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013024
Martin v. Löwiseba40652007-08-30 20:10:57 +000013025/* Override any GCC internal prototype to avoid an error.
13026 Use char because int might match the return type of a GCC
13027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013028#ifdef __cplusplus
13029extern "C"
13030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013031char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013032int
13033main ()
13034{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013035return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 ;
13037 return 0;
13038}
13039_ACEOF
13040rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013041if { (ac_try="$ac_link"
13042case "(($ac_try" in
13043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13044 *) ac_try_echo=$ac_try;;
13045esac
13046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13047 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013049 grep -v '^ *+' conftest.er1 >conftest.err
13050 rm -f conftest.er1
13051 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013053 (exit $ac_status); } && {
13054 test -z "$ac_c_werror_flag" ||
13055 test ! -s conftest.err
13056 } && test -s conftest$ac_exeext &&
13057 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013059else
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013061sed 's/^/| /' conftest.$ac_ext >&5
13062
Martin v. Löwiseba40652007-08-30 20:10:57 +000013063 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013065
13066rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013067 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013068LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013070{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13071echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013072if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013073 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013074fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013075 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013076{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13077echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013078if test "${ac_cv_lib_socket_socket+set}" = set; then
13079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013080else
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013082LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013083cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013084/* confdefs.h. */
13085_ACEOF
13086cat confdefs.h >>conftest.$ac_ext
13087cat >>conftest.$ac_ext <<_ACEOF
13088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
Martin v. Löwiseba40652007-08-30 20:10:57 +000013090/* Override any GCC internal prototype to avoid an error.
13091 Use char because int might match the return type of a GCC
13092 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013093#ifdef __cplusplus
13094extern "C"
13095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013096char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013097int
13098main ()
13099{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013100return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013101 ;
13102 return 0;
13103}
13104_ACEOF
13105rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013106if { (ac_try="$ac_link"
13107case "(($ac_try" in
13108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13109 *) ac_try_echo=$ac_try;;
13110esac
13111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13112 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013114 grep -v '^ *+' conftest.er1 >conftest.err
13115 rm -f conftest.er1
13116 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013118 (exit $ac_status); } && {
13119 test -z "$ac_c_werror_flag" ||
13120 test ! -s conftest.err
13121 } && test -s conftest$ac_exeext &&
13122 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013123 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013124else
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013126sed 's/^/| /' conftest.$ac_ext >&5
13127
Martin v. Löwiseba40652007-08-30 20:10:57 +000013128 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013130
13131rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013133LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013135{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13136echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013137if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013138 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013139fi
13140 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013141
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013142case "$ac_sys_system" in
13143BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013144{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13145echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013146if test "${ac_cv_lib_net_socket+set}" = set; then
13147 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013148else
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013150LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013151cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013152/* confdefs.h. */
13153_ACEOF
13154cat confdefs.h >>conftest.$ac_ext
13155cat >>conftest.$ac_ext <<_ACEOF
13156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013157
Martin v. Löwiseba40652007-08-30 20:10:57 +000013158/* Override any GCC internal prototype to avoid an error.
13159 Use char because int might match the return type of a GCC
13160 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013161#ifdef __cplusplus
13162extern "C"
13163#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013164char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013165int
13166main ()
13167{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013168return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 ;
13170 return 0;
13171}
13172_ACEOF
13173rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013174if { (ac_try="$ac_link"
13175case "(($ac_try" in
13176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13177 *) ac_try_echo=$ac_try;;
13178esac
13179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13180 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013182 grep -v '^ *+' conftest.er1 >conftest.err
13183 rm -f conftest.er1
13184 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013186 (exit $ac_status); } && {
13187 test -z "$ac_c_werror_flag" ||
13188 test ! -s conftest.err
13189 } && test -s conftest$ac_exeext &&
13190 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013192else
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013194sed 's/^/| /' conftest.$ac_ext >&5
13195
Martin v. Löwiseba40652007-08-30 20:10:57 +000013196 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013198
13199rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013201LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013203{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13204echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013205if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013206 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013207fi
13208 # BeOS
13209;;
13210esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013211
Martin v. Löwiseba40652007-08-30 20:10:57 +000013212{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13213echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
Martin v. Löwiseba40652007-08-30 20:10:57 +000013215# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013216if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013217 withval=$with_libs;
13218{ echo "$as_me:$LINENO: result: $withval" >&5
13219echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013220LIBS="$withval $LIBS"
13221
13222else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013223 { echo "$as_me:$LINENO: result: no" >&5
13224echo "${ECHO_T}no" >&6; }
13225fi
13226
Guido van Rossum7f43da71994-08-01 12:15:30 +000013227
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013228# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013229{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13230echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013231
Martin v. Löwiseba40652007-08-30 20:10:57 +000013232# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013233if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013234 withval=$with_system_ffi;
13235fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013236
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013237
Martin v. Löwiseba40652007-08-30 20:10:57 +000013238{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13239echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013240
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013241# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013242
13243
Martin v. Löwiseba40652007-08-30 20:10:57 +000013244{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13245echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013246
Martin v. Löwiseba40652007-08-30 20:10:57 +000013247# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013248if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013249 withval=$with_signal_module;
13250fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013251
13252
13253if test -z "$with_signal_module"
13254then with_signal_module="yes"
13255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013256{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13257echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013258
13259if test "${with_signal_module}" = "yes"; then
13260 USE_SIGNAL_MODULE=""
13261 SIGNAL_OBJS=""
13262else
13263 USE_SIGNAL_MODULE="#"
13264 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13265fi
13266
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013267# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013268
Barry Warsawc0d24d82000-06-29 16:12:00 +000013269USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013270
Martin v. Löwiseba40652007-08-30 20:10:57 +000013271{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13272echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Guido van Rossumec2f0731997-01-22 20:54:01 +000013274
Martin v. Löwiseba40652007-08-30 20:10:57 +000013275# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013276if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013277 withval=$with_dec_threads;
13278{ echo "$as_me:$LINENO: result: $withval" >&5
13279echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013280LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013281if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013282 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013283fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013284else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013285 { echo "$as_me:$LINENO: result: no" >&5
13286echo "${ECHO_T}no" >&6; }
13287fi
13288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289
13290# Templates for things AC_DEFINEd more than once.
13291# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013292
13293
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
13295
13296
13297
13298
Martin v. Löwiseba40652007-08-30 20:10:57 +000013299{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13300echo $ECHO_N "checking for --with-threads... $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-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013303if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013304 withval=$with_threads;
13305fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013306
13307
Barry Warsawc0d24d82000-06-29 16:12:00 +000013308# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013309
Martin v. Löwiseba40652007-08-30 20:10:57 +000013310# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013311if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013312 withval=$with_thread; with_threads=$with_thread
13313fi
13314
Barry Warsawc0d24d82000-06-29 16:12:00 +000013315
13316if test -z "$with_threads"
13317then with_threads="yes"
13318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013319{ echo "$as_me:$LINENO: result: $with_threads" >&5
13320echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013321
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013322
Barry Warsawc0d24d82000-06-29 16:12:00 +000013323if test "$with_threads" = "no"
13324then
13325 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013326elif test "$ac_cv_pthread_is_default" = yes
13327then
Martin v. Löwis11437992002-04-12 09:54:03 +000013328 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013329#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013330_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013331
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013332 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013333 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013334#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013335_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013336
13337 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013339elif test "$ac_cv_kpthread" = "yes"
13340then
13341 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013342 if test "$ac_cv_cxx_thread" = "yes"; then
13343 CXX="$CXX -Kpthread"
13344 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013346#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013347_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013348
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013349 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013350 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013351elif test "$ac_cv_kthread" = "yes"
13352then
13353 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013354 if test "$ac_cv_cxx_thread" = "yes"; then
13355 CXX="$CXX -Kthread"
13356 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013357 cat >>confdefs.h <<\_ACEOF
13358#define WITH_THREAD 1
13359_ACEOF
13360
13361 posix_threads=yes
13362 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013363elif test "$ac_cv_pthread" = "yes"
13364then
13365 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013366 if test "$ac_cv_cxx_thread" = "yes"; then
13367 CXX="$CXX -pthread"
13368 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013369 cat >>confdefs.h <<\_ACEOF
13370#define WITH_THREAD 1
13371_ACEOF
13372
13373 posix_threads=yes
13374 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013375else
13376 if test ! -z "$with_threads" -a -d "$with_threads"
13377 then LDFLAGS="$LDFLAGS -L$with_threads"
13378 fi
13379 if test ! -z "$withval" -a -d "$withval"
13380 then LDFLAGS="$LDFLAGS -L$withval"
13381 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013382
13383 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013384 # define _POSIX_THREADS in unistd.h. Some apparently don't
13385 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013386 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13387echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013389/* confdefs.h. */
13390_ACEOF
13391cat confdefs.h >>conftest.$ac_ext
13392cat >>conftest.$ac_ext <<_ACEOF
13393/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013394
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013395#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013396#ifdef _POSIX_THREADS
13397yes
13398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013399
13400_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013401if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013402 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013403 unistd_defines_pthreads=yes
13404else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013405 unistd_defines_pthreads=no
13406fi
13407rm -f conftest*
13408
Martin v. Löwiseba40652007-08-30 20:10:57 +000013409 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13410echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013413#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013414_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013417 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13418echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013419if test "${ac_cv_header_cthreads_h+set}" = set; then
13420 echo $ECHO_N "(cached) $ECHO_C" >&6
13421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013422{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13423echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013424else
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13427echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013428cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013429/* confdefs.h. */
13430_ACEOF
13431cat confdefs.h >>conftest.$ac_ext
13432cat >>conftest.$ac_ext <<_ACEOF
13433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013434$ac_includes_default
13435#include <cthreads.h>
13436_ACEOF
13437rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013438if { (ac_try="$ac_compile"
13439case "(($ac_try" in
13440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13441 *) ac_try_echo=$ac_try;;
13442esac
13443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013446 grep -v '^ *+' conftest.er1 >conftest.err
13447 rm -f conftest.er1
13448 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013450 (exit $ac_status); } && {
13451 test -z "$ac_c_werror_flag" ||
13452 test ! -s conftest.err
13453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 ac_header_compiler=yes
13455else
13456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013457sed 's/^/| /' conftest.$ac_ext >&5
13458
Martin v. Löwiseba40652007-08-30 20:10:57 +000013459 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013461
13462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13463{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13464echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013465
13466# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013467{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13468echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013470/* confdefs.h. */
13471_ACEOF
13472cat confdefs.h >>conftest.$ac_ext
13473cat >>conftest.$ac_ext <<_ACEOF
13474/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013475#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013476_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013477if { (ac_try="$ac_cpp conftest.$ac_ext"
13478case "(($ac_try" in
13479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13480 *) ac_try_echo=$ac_try;;
13481esac
13482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13483 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013485 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013486 rm -f conftest.er1
13487 cat conftest.err >&5
13488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013489 (exit $ac_status); } >/dev/null && {
13490 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13491 test ! -s conftest.err
13492 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 ac_header_preproc=yes
13494else
13495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013496sed 's/^/| /' conftest.$ac_ext >&5
13497
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013502{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13503echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013504
13505# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013506case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13507 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013508 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13509echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013510 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13511echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13512 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013513 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013514 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013515 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13516echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013517 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13518echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13519 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13520echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13521 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13522echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013523 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13524echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013525 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13526echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013527 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013528## ------------------------------------------------ ##
13529## Report this to http://www.python.org/python-bugs ##
13530## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013531_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013532 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013533 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013534esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013535{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13536echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013537if test "${ac_cv_header_cthreads_h+set}" = set; then
13538 echo $ECHO_N "(cached) $ECHO_C" >&6
13539else
13540 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013542{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13543echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013544
13545fi
13546if test $ac_cv_header_cthreads_h = yes; then
13547 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013548#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013549_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013550
Martin v. Löwis11437992002-04-12 09:54:03 +000013551 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013552#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013553_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013554
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
13556cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013557#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013558_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013559
13560 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013561 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013562else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013563
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013565 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13566echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013567if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13568 echo $ECHO_N "(cached) $ECHO_C" >&6
13569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013570{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13571echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013572else
Martin v. Löwis11437992002-04-12 09:54:03 +000013573 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013574{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13575echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013577/* confdefs.h. */
13578_ACEOF
13579cat confdefs.h >>conftest.$ac_ext
13580cat >>conftest.$ac_ext <<_ACEOF
13581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013582$ac_includes_default
13583#include <mach/cthreads.h>
13584_ACEOF
13585rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013586if { (ac_try="$ac_compile"
13587case "(($ac_try" in
13588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13589 *) ac_try_echo=$ac_try;;
13590esac
13591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013594 grep -v '^ *+' conftest.er1 >conftest.err
13595 rm -f conftest.er1
13596 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013598 (exit $ac_status); } && {
13599 test -z "$ac_c_werror_flag" ||
13600 test ! -s conftest.err
13601 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ac_header_compiler=yes
13603else
13604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013605sed 's/^/| /' conftest.$ac_ext >&5
13606
Martin v. Löwiseba40652007-08-30 20:10:57 +000013607 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013609
13610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13611{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13612echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013613
13614# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013615{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13616echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013618/* confdefs.h. */
13619_ACEOF
13620cat confdefs.h >>conftest.$ac_ext
13621cat >>conftest.$ac_ext <<_ACEOF
13622/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013623#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013624_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013625if { (ac_try="$ac_cpp conftest.$ac_ext"
13626case "(($ac_try" in
13627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13628 *) ac_try_echo=$ac_try;;
13629esac
13630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013632 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013633 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013634 rm -f conftest.er1
13635 cat conftest.err >&5
13636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013637 (exit $ac_status); } >/dev/null && {
13638 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13639 test ! -s conftest.err
13640 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013641 ac_header_preproc=yes
13642else
13643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013644sed 's/^/| /' conftest.$ac_ext >&5
13645
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013648
Martin v. Löwis11437992002-04-12 09:54:03 +000013649rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013650{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13651echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
13653# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013654case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13655 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013656 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13657echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013658 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13659echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13660 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013661 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013662 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013663 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13664echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013665 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13666echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13667 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13668echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13669 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13670echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013671 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13672echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013673 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13674echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013675 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013676## ------------------------------------------------ ##
13677## Report this to http://www.python.org/python-bugs ##
13678## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013679_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013680 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013681 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013682esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013683{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13684echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013685if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13686 echo $ECHO_N "(cached) $ECHO_C" >&6
13687else
13688 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013690{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13691echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013692
13693fi
13694if test $ac_cv_header_mach_cthreads_h = yes; then
13695 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013696#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013697_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013698
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013700#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013701_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013702
Martin v. Löwis11437992002-04-12 09:54:03 +000013703
13704cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013705#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013706_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013707
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013708 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013709else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013710
Martin v. Löwiseba40652007-08-30 20:10:57 +000013711 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13712echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013713
Martin v. Löwiseba40652007-08-30 20:10:57 +000013714# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013715if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013716 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13717echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013718 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013719#define WITH_THREAD 1
13720_ACEOF
13721
13722
13723cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013724#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013725_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013726
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013727 LIBS="-lpth $LIBS"
13728 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013729else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013730 { echo "$as_me:$LINENO: result: no" >&5
13731echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013732
13733 # Just looking for pthread_create in libpthread is not enough:
13734 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13735 # So we really have to include pthread.h, and then link.
13736 _libs=$LIBS
13737 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013738 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13739echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013741/* confdefs.h. */
13742_ACEOF
13743cat confdefs.h >>conftest.$ac_ext
13744cat >>conftest.$ac_ext <<_ACEOF
13745/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013746#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013747
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013748void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013749int
13750main ()
13751{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013752
13753pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013754 ;
13755 return 0;
13756}
13757_ACEOF
13758rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013759if { (ac_try="$ac_link"
13760case "(($ac_try" in
13761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13762 *) ac_try_echo=$ac_try;;
13763esac
13764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13765 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013767 grep -v '^ *+' conftest.er1 >conftest.err
13768 rm -f conftest.er1
13769 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013771 (exit $ac_status); } && {
13772 test -z "$ac_c_werror_flag" ||
13773 test ! -s conftest.err
13774 } && test -s conftest$ac_exeext &&
13775 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013776
Martin v. Löwiseba40652007-08-30 20:10:57 +000013777 { echo "$as_me:$LINENO: result: yes" >&5
13778echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013780#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013781_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013782
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013783 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013784 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013785else
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013787sed 's/^/| /' conftest.$ac_ext >&5
13788
Martin v. Löwis11437992002-04-12 09:54:03 +000013789
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013790 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013791 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13792echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013793if test "${ac_cv_func_pthread_detach+set}" = set; then
13794 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013795else
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013797/* confdefs.h. */
13798_ACEOF
13799cat confdefs.h >>conftest.$ac_ext
13800cat >>conftest.$ac_ext <<_ACEOF
13801/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013802/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13803 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13804#define pthread_detach innocuous_pthread_detach
13805
Guido van Rossumad678af1998-10-02 14:42:15 +000013806/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013807 which can conflict with char pthread_detach (); below.
13808 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013809 <limits.h> exists even on freestanding compilers. */
13810
13811#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013812# include <limits.h>
13813#else
13814# include <assert.h>
13815#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013816
13817#undef pthread_detach
13818
Martin v. Löwiseba40652007-08-30 20:10:57 +000013819/* Override any GCC internal prototype to avoid an error.
13820 Use char because int might match the return type of a GCC
13821 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013822#ifdef __cplusplus
13823extern "C"
13824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013825char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013826/* The GNU C library defines this for functions which it implements
13827 to always fail with ENOSYS. Some functions are actually named
13828 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013829#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013830choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013831#endif
13832
Skip Montanaro6dead952003-09-25 14:50:04 +000013833int
13834main ()
13835{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013836return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 ;
13838 return 0;
13839}
13840_ACEOF
13841rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013842if { (ac_try="$ac_link"
13843case "(($ac_try" in
13844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13845 *) ac_try_echo=$ac_try;;
13846esac
13847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13848 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013850 grep -v '^ *+' conftest.er1 >conftest.err
13851 rm -f conftest.er1
13852 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013854 (exit $ac_status); } && {
13855 test -z "$ac_c_werror_flag" ||
13856 test ! -s conftest.err
13857 } && test -s conftest$ac_exeext &&
13858 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013860else
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013862sed 's/^/| /' conftest.$ac_ext >&5
13863
Martin v. Löwiseba40652007-08-30 20:10:57 +000013864 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013866
13867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013868 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013870{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13871echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013872if test $ac_cv_func_pthread_detach = yes; then
13873 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013874#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013875_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013876
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013877 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013878 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013879else
Guido van Rossumad678af1998-10-02 14:42:15 +000013880
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013881 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013882 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13883echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013884if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13885 echo $ECHO_N "(cached) $ECHO_C" >&6
13886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013887{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13888echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013889else
13890 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13892echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013893cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013894/* confdefs.h. */
13895_ACEOF
13896cat confdefs.h >>conftest.$ac_ext
13897cat >>conftest.$ac_ext <<_ACEOF
13898/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013899$ac_includes_default
13900#include <atheos/threads.h>
13901_ACEOF
13902rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903if { (ac_try="$ac_compile"
13904case "(($ac_try" in
13905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13906 *) ac_try_echo=$ac_try;;
13907esac
13908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013911 grep -v '^ *+' conftest.er1 >conftest.err
13912 rm -f conftest.er1
13913 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915 (exit $ac_status); } && {
13916 test -z "$ac_c_werror_flag" ||
13917 test ! -s conftest.err
13918 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013919 ac_header_compiler=yes
13920else
13921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013922sed 's/^/| /' conftest.$ac_ext >&5
13923
Martin v. Löwiseba40652007-08-30 20:10:57 +000013924 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926
13927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13928{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13929echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013930
13931# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013932{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13933echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013935/* confdefs.h. */
13936_ACEOF
13937cat confdefs.h >>conftest.$ac_ext
13938cat >>conftest.$ac_ext <<_ACEOF
13939/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013940#include <atheos/threads.h>
13941_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013942if { (ac_try="$ac_cpp conftest.$ac_ext"
13943case "(($ac_try" in
13944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13945 *) ac_try_echo=$ac_try;;
13946esac
13947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13948 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013949 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013950 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013951 rm -f conftest.er1
13952 cat conftest.err >&5
13953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013954 (exit $ac_status); } >/dev/null && {
13955 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13956 test ! -s conftest.err
13957 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013958 ac_header_preproc=yes
13959else
13960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013961sed 's/^/| /' conftest.$ac_ext >&5
13962
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013963 ac_header_preproc=no
13964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013965
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013966rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013967{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13968echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013969
13970# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013971case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13972 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013973 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13974echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013975 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13976echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13977 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013978 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013979 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013980 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
13981echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013982 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
13983echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
13984 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
13985echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
13986 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
13987echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013988 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
13989echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013990 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
13991echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013993## ------------------------------------------------ ##
13994## Report this to http://www.python.org/python-bugs ##
13995## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013996_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013998 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013999esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014000{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14001echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014002if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14003 echo $ECHO_N "(cached) $ECHO_C" >&6
14004else
14005 ac_cv_header_atheos_threads_h=$ac_header_preproc
14006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014007{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14008echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014009
14010fi
14011if test $ac_cv_header_atheos_threads_h = yes; then
14012 cat >>confdefs.h <<\_ACEOF
14013#define WITH_THREAD 1
14014_ACEOF
14015
14016
14017cat >>confdefs.h <<\_ACEOF
14018#define ATHEOS_THREADS 1
14019_ACEOF
14020
14021 THREADOBJ="Python/thread.o"
14022else
14023
Martin v. Löwis11437992002-04-12 09:54:03 +000014024 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014025 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14026echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014027if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14028 echo $ECHO_N "(cached) $ECHO_C" >&6
14029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014030{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14031echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014032else
Martin v. Löwis11437992002-04-12 09:54:03 +000014033 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014034{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14035echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014036cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014037/* confdefs.h. */
14038_ACEOF
14039cat confdefs.h >>conftest.$ac_ext
14040cat >>conftest.$ac_ext <<_ACEOF
14041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014042$ac_includes_default
14043#include <kernel/OS.h>
14044_ACEOF
14045rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014046if { (ac_try="$ac_compile"
14047case "(($ac_try" in
14048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14049 *) ac_try_echo=$ac_try;;
14050esac
14051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014054 grep -v '^ *+' conftest.er1 >conftest.err
14055 rm -f conftest.er1
14056 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014058 (exit $ac_status); } && {
14059 test -z "$ac_c_werror_flag" ||
14060 test ! -s conftest.err
14061 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014062 ac_header_compiler=yes
14063else
14064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014065sed 's/^/| /' conftest.$ac_ext >&5
14066
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014069
14070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14071{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14072echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014073
14074# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014075{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14076echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014078/* confdefs.h. */
14079_ACEOF
14080cat confdefs.h >>conftest.$ac_ext
14081cat >>conftest.$ac_ext <<_ACEOF
14082/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014083#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014084_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014085if { (ac_try="$ac_cpp conftest.$ac_ext"
14086case "(($ac_try" in
14087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14088 *) ac_try_echo=$ac_try;;
14089esac
14090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14091 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014093 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 rm -f conftest.er1
14095 cat conftest.err >&5
14096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014097 (exit $ac_status); } >/dev/null && {
14098 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14099 test ! -s conftest.err
14100 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 ac_header_preproc=yes
14102else
14103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014104sed 's/^/| /' conftest.$ac_ext >&5
14105
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014108
Martin v. Löwis11437992002-04-12 09:54:03 +000014109rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014110{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14111echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014112
Martin v. Löwis11437992002-04-12 09:54:03 +000014113# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014114case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14115 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14117echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014118 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14119echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14120 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014121 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014122 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014123 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14124echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014125 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14126echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14127 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14128echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14129 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14130echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014131 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14132echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014133 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14134echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014135 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014136## ------------------------------------------------ ##
14137## Report this to http://www.python.org/python-bugs ##
14138## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014139_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014140 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014141 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014142esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014143{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14144echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014145if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14146 echo $ECHO_N "(cached) $ECHO_C" >&6
14147else
14148 ac_cv_header_kernel_OS_h=$ac_header_preproc
14149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014150{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14151echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014152
14153fi
14154if test $ac_cv_header_kernel_OS_h = yes; then
14155 cat >>confdefs.h <<\_ACEOF
14156#define WITH_THREAD 1
14157_ACEOF
14158
14159
14160cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014161#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014162_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014163
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014164 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014165else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014166
Martin v. Löwiseba40652007-08-30 20:10:57 +000014167 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14168echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014169if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014171else
Martin v. Löwis11437992002-04-12 09:54:03 +000014172 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014173LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014175/* confdefs.h. */
14176_ACEOF
14177cat confdefs.h >>conftest.$ac_ext
14178cat >>conftest.$ac_ext <<_ACEOF
14179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014180
Martin v. Löwiseba40652007-08-30 20:10:57 +000014181/* Override any GCC internal prototype to avoid an error.
14182 Use char because int might match the return type of a GCC
14183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014184#ifdef __cplusplus
14185extern "C"
14186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014187char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014188int
14189main ()
14190{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014191return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 ;
14193 return 0;
14194}
14195_ACEOF
14196rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014197if { (ac_try="$ac_link"
14198case "(($ac_try" in
14199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14200 *) ac_try_echo=$ac_try;;
14201esac
14202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14203 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014205 grep -v '^ *+' conftest.er1 >conftest.err
14206 rm -f conftest.er1
14207 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014209 (exit $ac_status); } && {
14210 test -z "$ac_c_werror_flag" ||
14211 test ! -s conftest.err
14212 } && test -s conftest$ac_exeext &&
14213 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014214 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014215else
Martin v. Löwis11437992002-04-12 09:54:03 +000014216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014217sed 's/^/| /' conftest.$ac_ext >&5
14218
Martin v. Löwiseba40652007-08-30 20:10:57 +000014219 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014221
14222rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014224LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014226{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14227echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014228if test $ac_cv_lib_pthreads_pthread_create = yes; then
14229 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014230#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014231_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014232
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014233 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014234 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014235 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014236else
Greg Steinadf63d62000-07-05 10:38:09 +000014237
Martin v. Löwiseba40652007-08-30 20:10:57 +000014238 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14239echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014240if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14241 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014242else
Martin v. Löwis11437992002-04-12 09:54:03 +000014243 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014244LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014246/* confdefs.h. */
14247_ACEOF
14248cat confdefs.h >>conftest.$ac_ext
14249cat >>conftest.$ac_ext <<_ACEOF
14250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
Martin v. Löwiseba40652007-08-30 20:10:57 +000014252/* Override any GCC internal prototype to avoid an error.
14253 Use char because int might match the return type of a GCC
14254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014255#ifdef __cplusplus
14256extern "C"
14257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014258char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014259int
14260main ()
14261{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014262return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014263 ;
14264 return 0;
14265}
14266_ACEOF
14267rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014268if { (ac_try="$ac_link"
14269case "(($ac_try" in
14270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14271 *) ac_try_echo=$ac_try;;
14272esac
14273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14274 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014276 grep -v '^ *+' conftest.er1 >conftest.err
14277 rm -f conftest.er1
14278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014280 (exit $ac_status); } && {
14281 test -z "$ac_c_werror_flag" ||
14282 test ! -s conftest.err
14283 } && test -s conftest$ac_exeext &&
14284 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014286else
Martin v. Löwis11437992002-04-12 09:54:03 +000014287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014288sed 's/^/| /' conftest.$ac_ext >&5
14289
Martin v. Löwiseba40652007-08-30 20:10:57 +000014290 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014292
14293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014294 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014295LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014297{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14298echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014299if test $ac_cv_lib_c_r_pthread_create = yes; then
14300 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014301#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014302_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014303
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014304 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014305 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014306 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014307else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014308
Martin v. Löwiseba40652007-08-30 20:10:57 +000014309 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14310echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014311if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014313else
Martin v. Löwis11437992002-04-12 09:54:03 +000014314 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014315LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014316cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014317/* confdefs.h. */
14318_ACEOF
14319cat confdefs.h >>conftest.$ac_ext
14320cat >>conftest.$ac_ext <<_ACEOF
14321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014322
Martin v. Löwiseba40652007-08-30 20:10:57 +000014323/* Override any GCC internal prototype to avoid an error.
14324 Use char because int might match the return type of a GCC
14325 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014326#ifdef __cplusplus
14327extern "C"
14328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014329char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014330int
14331main ()
14332{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014333return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 ;
14335 return 0;
14336}
14337_ACEOF
14338rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014339if { (ac_try="$ac_link"
14340case "(($ac_try" in
14341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14342 *) ac_try_echo=$ac_try;;
14343esac
14344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14345 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014347 grep -v '^ *+' conftest.er1 >conftest.err
14348 rm -f conftest.er1
14349 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014351 (exit $ac_status); } && {
14352 test -z "$ac_c_werror_flag" ||
14353 test ! -s conftest.err
14354 } && test -s conftest$ac_exeext &&
14355 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014357else
Martin v. Löwis11437992002-04-12 09:54:03 +000014358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014359sed 's/^/| /' conftest.$ac_ext >&5
14360
Martin v. Löwiseba40652007-08-30 20:10:57 +000014361 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014363
14364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014366LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014368{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14369echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014370if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14371 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014372#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014373_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014374
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014375 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014376 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014377 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014378else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014379
Martin v. Löwiseba40652007-08-30 20:10:57 +000014380 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14381echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014382if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14383 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014384else
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014386LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014387cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014388/* confdefs.h. */
14389_ACEOF
14390cat confdefs.h >>conftest.$ac_ext
14391cat >>conftest.$ac_ext <<_ACEOF
14392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014393
Martin v. Löwiseba40652007-08-30 20:10:57 +000014394/* Override any GCC internal prototype to avoid an error.
14395 Use char because int might match the return type of a GCC
14396 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014397#ifdef __cplusplus
14398extern "C"
14399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014400char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014401int
14402main ()
14403{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014404return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 ;
14406 return 0;
14407}
14408_ACEOF
14409rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014410if { (ac_try="$ac_link"
14411case "(($ac_try" in
14412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14413 *) ac_try_echo=$ac_try;;
14414esac
14415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14416 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014418 grep -v '^ *+' conftest.er1 >conftest.err
14419 rm -f conftest.er1
14420 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014422 (exit $ac_status); } && {
14423 test -z "$ac_c_werror_flag" ||
14424 test ! -s conftest.err
14425 } && test -s conftest$ac_exeext &&
14426 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014428else
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014430sed 's/^/| /' conftest.$ac_ext >&5
14431
Martin v. Löwiseba40652007-08-30 20:10:57 +000014432 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014434
14435rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014437LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014439{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14440echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014441if test $ac_cv_lib_cma_pthread_create = yes; then
14442 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014443#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014444_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014445
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014446 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014447 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014448 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014449else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014450
Martin v. Löwis130fb172001-07-19 11:00:41 +000014451 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014452fi
14453
Guido van Rossum627b2d71993-12-24 10:39:16 +000014454
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014455fi
14456
Guido van Rossum0be3e491997-05-22 20:33:33 +000014457fi
14458
Guido van Rossum49545951997-12-02 19:28:29 +000014459fi
14460
Guido van Rossumb93a8621998-05-07 13:27:32 +000014461fi
14462
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014463
Michael W. Hudson54241132001-12-07 15:38:26 +000014464fi
14465
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014466
14467fi
14468
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014470
14471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014472 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014473fi
14474
Martin v. Löwis11437992002-04-12 09:54:03 +000014475fi
14476
14477
14478fi
14479
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014480
Michael W. Hudson54241132001-12-07 15:38:26 +000014481
Martin v. Löwiseba40652007-08-30 20:10:57 +000014482 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14483echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014484if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14485 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014486else
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014488LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014490/* confdefs.h. */
14491_ACEOF
14492cat confdefs.h >>conftest.$ac_ext
14493cat >>conftest.$ac_ext <<_ACEOF
14494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014495
Martin v. Löwiseba40652007-08-30 20:10:57 +000014496/* Override any GCC internal prototype to avoid an error.
14497 Use char because int might match the return type of a GCC
14498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014499#ifdef __cplusplus
14500extern "C"
14501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014502char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014503int
14504main ()
14505{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014506return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014507 ;
14508 return 0;
14509}
14510_ACEOF
14511rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014512if { (ac_try="$ac_link"
14513case "(($ac_try" in
14514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14515 *) ac_try_echo=$ac_try;;
14516esac
14517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14518 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014520 grep -v '^ *+' conftest.er1 >conftest.err
14521 rm -f conftest.er1
14522 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014524 (exit $ac_status); } && {
14525 test -z "$ac_c_werror_flag" ||
14526 test ! -s conftest.err
14527 } && test -s conftest$ac_exeext &&
14528 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014530else
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014532sed 's/^/| /' conftest.$ac_ext >&5
14533
Martin v. Löwiseba40652007-08-30 20:10:57 +000014534 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014536
14537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014539LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14542echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014543if test $ac_cv_lib_mpc_usconfig = yes; then
14544 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014545#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014546_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014547
Martin v. Löwis130fb172001-07-19 11:00:41 +000014548 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014549 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014550 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014551fi
14552
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014553
Neal Norwitza978ab02002-11-02 16:58:05 +000014554 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014555 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14556echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014557if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014559else
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014561LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014562cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014563/* confdefs.h. */
14564_ACEOF
14565cat confdefs.h >>conftest.$ac_ext
14566cat >>conftest.$ac_ext <<_ACEOF
14567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014568
Martin v. Löwiseba40652007-08-30 20:10:57 +000014569/* Override any GCC internal prototype to avoid an error.
14570 Use char because int might match the return type of a GCC
14571 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014572#ifdef __cplusplus
14573extern "C"
14574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014575char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014576int
14577main ()
14578{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014579return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014580 ;
14581 return 0;
14582}
14583_ACEOF
14584rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014585if { (ac_try="$ac_link"
14586case "(($ac_try" in
14587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14588 *) ac_try_echo=$ac_try;;
14589esac
14590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14591 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014593 grep -v '^ *+' conftest.er1 >conftest.err
14594 rm -f conftest.er1
14595 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597 (exit $ac_status); } && {
14598 test -z "$ac_c_werror_flag" ||
14599 test ! -s conftest.err
14600 } && test -s conftest$ac_exeext &&
14601 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014603else
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014605sed 's/^/| /' conftest.$ac_ext >&5
14606
Martin v. Löwiseba40652007-08-30 20:10:57 +000014607 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014609
14610rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014612LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014614{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14615echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014616if test $ac_cv_lib_thread_thr_create = yes; then
14617 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014618#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014619_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014620
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014621 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014622 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014623 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014624fi
14625
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014626 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014627
Martin v. Löwis130fb172001-07-19 11:00:41 +000014628 if test "$USE_THREAD_MODULE" != "#"
14629 then
14630 # If the above checks didn't disable threads, (at least) OSF1
14631 # needs this '-threads' argument during linking.
14632 case $ac_sys_system in
14633 OSF1) LDLAST=-threads;;
14634 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014635 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014636fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014637
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014638if test "$posix_threads" = "yes"; then
14639 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014640
14641cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014642#define _POSIX_THREADS 1
14643_ACEOF
14644
14645 fi
14646
14647 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14648 case $ac_sys_system/$ac_sys_release in
14649 SunOS/5.6)
14650cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014651#define HAVE_PTHREAD_DESTRUCTOR 1
14652_ACEOF
14653
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014654 ;;
14655 SunOS/5.8)
14656cat >>confdefs.h <<\_ACEOF
14657#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14658_ACEOF
14659
14660 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014661 AIX/5)
14662cat >>confdefs.h <<\_ACEOF
14663#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14664_ACEOF
14665
14666 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014667 esac
14668
Martin v. Löwiseba40652007-08-30 20:10:57 +000014669 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14670echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014671 if test "${ac_cv_pthread_system_supported+set}" = set; then
14672 echo $ECHO_N "(cached) $ECHO_C" >&6
14673else
14674 if test "$cross_compiling" = yes; then
14675 ac_cv_pthread_system_supported=no
14676else
14677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014678/* confdefs.h. */
14679_ACEOF
14680cat confdefs.h >>conftest.$ac_ext
14681cat >>conftest.$ac_ext <<_ACEOF
14682/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014683#include <pthread.h>
14684 void *foo(void *parm) {
14685 return NULL;
14686 }
14687 main() {
14688 pthread_attr_t attr;
14689 pthread_t id;
14690 if (pthread_attr_init(&attr)) exit(-1);
14691 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14692 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14693 exit(0);
14694 }
14695_ACEOF
14696rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014697if { (ac_try="$ac_link"
14698case "(($ac_try" in
14699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14700 *) ac_try_echo=$ac_try;;
14701esac
14702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14703 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014704 ac_status=$?
14705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14706 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014707 { (case "(($ac_try" in
14708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14709 *) ac_try_echo=$ac_try;;
14710esac
14711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14712 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014713 ac_status=$?
14714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14715 (exit $ac_status); }; }; then
14716 ac_cv_pthread_system_supported=yes
14717else
14718 echo "$as_me: program exited with status $ac_status" >&5
14719echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014720sed 's/^/| /' conftest.$ac_ext >&5
14721
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014722( exit $ac_status )
14723ac_cv_pthread_system_supported=no
14724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014725rm -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 +000014726fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014727
Martin v. Löwiseba40652007-08-30 20:10:57 +000014728
14729
Guido van Rossum627b2d71993-12-24 10:39:16 +000014730fi
14731
Martin v. Löwiseba40652007-08-30 20:10:57 +000014732 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14733echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014734 if test "$ac_cv_pthread_system_supported" = "yes"; then
14735
14736cat >>confdefs.h <<\_ACEOF
14737#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14738_ACEOF
14739
14740 fi
14741
14742for ac_func in pthread_sigmask
14743do
14744as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014745{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14746echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14747if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014748 echo $ECHO_N "(cached) $ECHO_C" >&6
14749else
14750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014751/* confdefs.h. */
14752_ACEOF
14753cat confdefs.h >>conftest.$ac_ext
14754cat >>conftest.$ac_ext <<_ACEOF
14755/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014756/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14757 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14758#define $ac_func innocuous_$ac_func
14759
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014760/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014761 which can conflict with char $ac_func (); below.
14762 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014763 <limits.h> exists even on freestanding compilers. */
14764
14765#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014766# include <limits.h>
14767#else
14768# include <assert.h>
14769#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014770
14771#undef $ac_func
14772
Martin v. Löwiseba40652007-08-30 20:10:57 +000014773/* Override any GCC internal prototype to avoid an error.
14774 Use char because int might match the return type of a GCC
14775 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014776#ifdef __cplusplus
14777extern "C"
14778#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014779char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014780/* The GNU C library defines this for functions which it implements
14781 to always fail with ENOSYS. Some functions are actually named
14782 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014783#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014784choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014785#endif
14786
Skip Montanaro6dead952003-09-25 14:50:04 +000014787int
14788main ()
14789{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014790return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014791 ;
14792 return 0;
14793}
14794_ACEOF
14795rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014796if { (ac_try="$ac_link"
14797case "(($ac_try" in
14798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14799 *) ac_try_echo=$ac_try;;
14800esac
14801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14802 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014804 grep -v '^ *+' conftest.er1 >conftest.err
14805 rm -f conftest.er1
14806 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014808 (exit $ac_status); } && {
14809 test -z "$ac_c_werror_flag" ||
14810 test ! -s conftest.err
14811 } && test -s conftest$ac_exeext &&
14812 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014813 eval "$as_ac_var=yes"
14814else
14815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014816sed 's/^/| /' conftest.$ac_ext >&5
14817
Martin v. Löwiseba40652007-08-30 20:10:57 +000014818 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014820
14821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014824ac_res=`eval echo '${'$as_ac_var'}'`
14825 { echo "$as_me:$LINENO: result: $ac_res" >&5
14826echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014827if test `eval echo '${'$as_ac_var'}'` = yes; then
14828 cat >>confdefs.h <<_ACEOF
14829#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14830_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014831 case $ac_sys_system in
14832 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014833
Jason Tishlerfac083d2003-07-22 15:20:49 +000014834cat >>confdefs.h <<\_ACEOF
14835#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14836_ACEOF
14837
14838 ;;
14839 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014840fi
14841done
14842
14843fi
14844
14845
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014846# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014847
14848
Martin v. Löwiseba40652007-08-30 20:10:57 +000014849{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14850echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14851# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014852if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014853 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014854 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014855 { echo "$as_me:$LINENO: result: no" >&5
14856echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014857 ipv6=no
14858 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014859 *) { echo "$as_me:$LINENO: result: yes" >&5
14860echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014862#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014863_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014864
14865 ipv6=yes
14866 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014867 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014868else
Martin v. Löwis11437992002-04-12 09:54:03 +000014869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014870 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014871 { echo "$as_me:$LINENO: result: no" >&5
14872echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014873 ipv6=no
14874
14875else
Martin v. Löwis11437992002-04-12 09:54:03 +000014876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014877/* confdefs.h. */
14878_ACEOF
14879cat confdefs.h >>conftest.$ac_ext
14880cat >>conftest.$ac_ext <<_ACEOF
14881/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014882 /* AF_INET6 available check */
14883#include <sys/types.h>
14884#include <sys/socket.h>
14885main()
14886{
14887 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14888 exit(1);
14889 else
14890 exit(0);
14891}
14892
Martin v. Löwis11437992002-04-12 09:54:03 +000014893_ACEOF
14894rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014895if { (ac_try="$ac_link"
14896case "(($ac_try" in
14897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14898 *) ac_try_echo=$ac_try;;
14899esac
14900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14901 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 ac_status=$?
14903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14904 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014905 { (case "(($ac_try" in
14906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14907 *) ac_try_echo=$ac_try;;
14908esac
14909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14910 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 ac_status=$?
14912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14913 (exit $ac_status); }; }; then
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öwisa2ac6022001-08-09 11:40:14 +000014916 ipv6=yes
14917else
Martin v. Löwis11437992002-04-12 09:54:03 +000014918 echo "$as_me: program exited with status $ac_status" >&5
14919echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014920sed 's/^/| /' conftest.$ac_ext >&5
14921
Martin v. Löwis11437992002-04-12 09:54:03 +000014922( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014923{ echo "$as_me:$LINENO: result: no" >&5
14924echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014925 ipv6=no
14926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014927rm -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 +000014928fi
14929
Martin v. Löwiseba40652007-08-30 20:10:57 +000014930
14931
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014932if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014933 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14934echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014936/* confdefs.h. */
14937_ACEOF
14938cat confdefs.h >>conftest.$ac_ext
14939cat >>conftest.$ac_ext <<_ACEOF
14940/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014941#include <sys/types.h>
14942#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014943int
14944main ()
14945{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014946struct sockaddr_in6 x;
14947x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014948 ;
14949 return 0;
14950}
14951_ACEOF
14952rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014953if { (ac_try="$ac_compile"
14954case "(($ac_try" in
14955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14956 *) ac_try_echo=$ac_try;;
14957esac
14958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014961 grep -v '^ *+' conftest.er1 >conftest.err
14962 rm -f conftest.er1
14963 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965 (exit $ac_status); } && {
14966 test -z "$ac_c_werror_flag" ||
14967 test ! -s conftest.err
14968 } && test -s conftest.$ac_objext; then
14969 { echo "$as_me:$LINENO: result: yes" >&5
14970echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014971 ipv6=yes
14972else
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014974sed 's/^/| /' conftest.$ac_ext >&5
14975
Martin v. Löwiseba40652007-08-30 20:10:57 +000014976 { echo "$as_me:$LINENO: result: no" >&5
14977echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014978 ipv6=no
14979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980
14981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014982fi
14983
14984if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014986#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014987_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014988
14989fi
14990
Martin v. Löwiseba40652007-08-30 20:10:57 +000014991fi
14992
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014993
14994ipv6type=unknown
14995ipv6lib=none
14996ipv6trylibc=no
14997
14998if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014999 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15000echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015001 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15002 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015003 case $i in
15004 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015006/* confdefs.h. */
15007_ACEOF
15008cat confdefs.h >>conftest.$ac_ext
15009cat >>conftest.$ac_ext <<_ACEOF
15010/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015011
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015012#include <netinet/in.h>
15013#ifdef IPV6_INRIA_VERSION
15014yes
15015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015016_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015018 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015019 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015020fi
15021rm -f conftest*
15022
15023 ;;
15024 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015026/* confdefs.h. */
15027_ACEOF
15028cat confdefs.h >>conftest.$ac_ext
15029cat >>conftest.$ac_ext <<_ACEOF
15030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015032#include <netinet/in.h>
15033#ifdef __KAME__
15034yes
15035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015036_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015038 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015039 ipv6type=$i;
15040 ipv6lib=inet6
15041 ipv6libdir=/usr/local/v6/lib
15042 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015043fi
15044rm -f conftest*
15045
15046 ;;
15047 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015049/* confdefs.h. */
15050_ACEOF
15051cat confdefs.h >>conftest.$ac_ext
15052cat >>conftest.$ac_ext <<_ACEOF
15053/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015054
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015055#include <features.h>
15056#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15057yes
15058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015059_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015061 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015062 ipv6type=$i;
15063 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015064fi
15065rm -f conftest*
15066
15067 ;;
15068 linux-inet6)
15069 if test -d /usr/inet6; then
15070 ipv6type=$i
15071 ipv6lib=inet6
15072 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015073 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015074 fi
15075 ;;
15076 solaris)
15077 if test -f /etc/netconfig; then
15078 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15079 ipv6type=$i
15080 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015081 fi
15082 fi
15083 ;;
15084 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015086/* confdefs.h. */
15087_ACEOF
15088cat confdefs.h >>conftest.$ac_ext
15089cat >>conftest.$ac_ext <<_ACEOF
15090/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015091
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015092#include <sys/param.h>
15093#ifdef _TOSHIBA_INET6
15094yes
15095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015096_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015098 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015099 ipv6type=$i;
15100 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015101 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015102fi
15103rm -f conftest*
15104
15105 ;;
15106 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015108/* confdefs.h. */
15109_ACEOF
15110cat confdefs.h >>conftest.$ac_ext
15111cat >>conftest.$ac_ext <<_ACEOF
15112/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015113
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015114#include </usr/local/v6/include/sys/v6config.h>
15115#ifdef __V6D__
15116yes
15117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015118_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015120 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015121 ipv6type=$i;
15122 ipv6lib=v6;
15123 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015124 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015125fi
15126rm -f conftest*
15127
15128 ;;
15129 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015131/* confdefs.h. */
15132_ACEOF
15133cat confdefs.h >>conftest.$ac_ext
15134cat >>conftest.$ac_ext <<_ACEOF
15135/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015136
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015137#include <sys/param.h>
15138#ifdef _ZETA_MINAMI_INET6
15139yes
15140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015141_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015143 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015144 ipv6type=$i;
15145 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015146 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015147fi
15148rm -f conftest*
15149
15150 ;;
15151 esac
15152 if test "$ipv6type" != "unknown"; then
15153 break
15154 fi
15155 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015156 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15157echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015158fi
15159
15160if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15161 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15162 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15163 echo "using lib$ipv6lib"
15164 else
15165 if test $ipv6trylibc = "yes"; then
15166 echo "using libc"
15167 else
15168 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15169 echo "You need to fetch lib$ipv6lib.a from appropriate"
15170 echo 'ipv6 kit and compile beforehand.'
15171 exit 1
15172 fi
15173 fi
15174fi
15175
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015176# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015177{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15178echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015179
Martin v. Löwiseba40652007-08-30 20:10:57 +000015180# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015181if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015182 withval=$with_doc_strings;
15183fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015184
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015185
15186if test -z "$with_doc_strings"
15187then with_doc_strings="yes"
15188fi
15189if test "$with_doc_strings" != "no"
15190then
15191
15192cat >>confdefs.h <<\_ACEOF
15193#define WITH_DOC_STRINGS 1
15194_ACEOF
15195
15196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15198echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015199
Neil Schemenauera35c6882001-02-27 04:45:05 +000015200# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15202echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015203
Martin v. Löwiseba40652007-08-30 20:10:57 +000015204# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015205if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015206 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015207if test "$withval" != no
15208then
15209
15210cat >>confdefs.h <<\_ACEOF
15211#define WITH_TSC 1
15212_ACEOF
15213
Martin v. Löwiseba40652007-08-30 20:10:57 +000015214 { echo "$as_me:$LINENO: result: yes" >&5
15215echo "${ECHO_T}yes" >&6; }
15216else { echo "$as_me:$LINENO: result: no" >&5
15217echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015218fi
15219else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220 { echo "$as_me:$LINENO: result: no" >&5
15221echo "${ECHO_T}no" >&6; }
15222fi
15223
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015224
15225# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15227echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015228
Martin v. Löwiseba40652007-08-30 20:10:57 +000015229# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015230if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015231 withval=$with_pymalloc;
15232fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015233
Neil Schemenauera35c6882001-02-27 04:45:05 +000015234
Neil Schemenauer16c22972002-03-22 15:34:49 +000015235if test -z "$with_pymalloc"
15236then with_pymalloc="yes"
15237fi
15238if test "$with_pymalloc" != "no"
15239then
Martin v. Löwis11437992002-04-12 09:54:03 +000015240
15241cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015242#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015243_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015244
15245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015246{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15247echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015248
Barry Warsawef82cd72000-06-30 16:21:01 +000015249# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15251echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015252
Martin v. Löwiseba40652007-08-30 20:10:57 +000015253# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015254if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015255 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015256if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015257then
15258
15259cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015260#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015261_ACEOF
15262
Martin v. Löwiseba40652007-08-30 20:10:57 +000015263 { echo "$as_me:$LINENO: result: yes" >&5
15264echo "${ECHO_T}yes" >&6; }
15265else { echo "$as_me:$LINENO: result: no" >&5
15266echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015267fi
15268else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269 { echo "$as_me:$LINENO: result: no" >&5
15270echo "${ECHO_T}no" >&6; }
15271fi
15272
Barry Warsawef82cd72000-06-30 16:21:01 +000015273
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015274# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015275
Guido van Rossum98935bf2001-09-05 19:13:16 +000015276DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015277
Guido van Rossume97ee181999-12-20 21:27:22 +000015278# the dlopen() function means we might want to use dynload_shlib.o. some
15279# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015280
Thomas Wouters3a584202000-08-05 23:28:51 +000015281for ac_func in dlopen
15282do
Martin v. Löwis11437992002-04-12 09:54:03 +000015283as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015284{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15285echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15286if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015288else
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015290/* confdefs.h. */
15291_ACEOF
15292cat confdefs.h >>conftest.$ac_ext
15293cat >>conftest.$ac_ext <<_ACEOF
15294/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015295/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15296 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15297#define $ac_func innocuous_$ac_func
15298
Guido van Rossume97ee181999-12-20 21:27:22 +000015299/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015300 which can conflict with char $ac_func (); below.
15301 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015302 <limits.h> exists even on freestanding compilers. */
15303
15304#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015305# include <limits.h>
15306#else
15307# include <assert.h>
15308#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015309
15310#undef $ac_func
15311
Martin v. Löwiseba40652007-08-30 20:10:57 +000015312/* Override any GCC internal prototype to avoid an error.
15313 Use char because int might match the return type of a GCC
15314 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015315#ifdef __cplusplus
15316extern "C"
15317#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015318char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015319/* The GNU C library defines this for functions which it implements
15320 to always fail with ENOSYS. Some functions are actually named
15321 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015323choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015324#endif
15325
Skip Montanaro6dead952003-09-25 14:50:04 +000015326int
15327main ()
15328{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015329return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015330 ;
15331 return 0;
15332}
15333_ACEOF
15334rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015335if { (ac_try="$ac_link"
15336case "(($ac_try" in
15337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15338 *) ac_try_echo=$ac_try;;
15339esac
15340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15341 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015343 grep -v '^ *+' conftest.er1 >conftest.err
15344 rm -f conftest.er1
15345 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015347 (exit $ac_status); } && {
15348 test -z "$ac_c_werror_flag" ||
15349 test ! -s conftest.err
15350 } && test -s conftest$ac_exeext &&
15351 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015352 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015353else
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015355sed 's/^/| /' conftest.$ac_ext >&5
15356
Martin v. Löwiseba40652007-08-30 20:10:57 +000015357 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015359
15360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015361 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015363ac_res=`eval echo '${'$as_ac_var'}'`
15364 { echo "$as_me:$LINENO: result: $ac_res" >&5
15365echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015366if test `eval echo '${'$as_ac_var'}'` = yes; then
15367 cat >>confdefs.h <<_ACEOF
15368#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15369_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015370
Guido van Rossume97ee181999-12-20 21:27:22 +000015371fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015372done
Guido van Rossume97ee181999-12-20 21:27:22 +000015373
Michael W. Hudson54241132001-12-07 15:38:26 +000015374
Guido van Rossume97ee181999-12-20 21:27:22 +000015375# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15376# loading of modules.
15377
Martin v. Löwiseba40652007-08-30 20:10:57 +000015378{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15379echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015380if test -z "$DYNLOADFILE"
15381then
15382 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015383 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15384 if test "$ac_cv_func_dlopen" = yes
15385 then DYNLOADFILE="dynload_shlib.o"
15386 else DYNLOADFILE="dynload_aix.o"
15387 fi
15388 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015389 BeOS*) DYNLOADFILE="dynload_beos.o";;
15390 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015391 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15392 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015393 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015394 *)
15395 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15396 # out any dynamic loading
15397 if test "$ac_cv_func_dlopen" = yes
15398 then DYNLOADFILE="dynload_shlib.o"
15399 else DYNLOADFILE="dynload_stub.o"
15400 fi
15401 ;;
15402 esac
15403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15405echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015406if test "$DYNLOADFILE" != "dynload_stub.o"
15407then
Martin v. Löwis11437992002-04-12 09:54:03 +000015408
15409cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015410#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015411_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015412
15413fi
15414
Neil Schemenauer4e425612001-06-19 15:44:15 +000015415# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15416
Michael W. Hudson54241132001-12-07 15:38:26 +000015417
Martin v. Löwiseba40652007-08-30 20:10:57 +000015418{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15419echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015420if test -z "$MACHDEP_OBJS"
15421then
Jack Jansene578a632001-08-15 01:27:14 +000015422 MACHDEP_OBJS=$extra_machdep_objs
15423else
15424 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015426{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15427echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015428
Guido van Rossum627b2d71993-12-24 10:39:16 +000015429# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
Martin v. Löwisd6320502004-08-12 13:45:08 +000015501
Martin v. Löwisc3001752005-01-23 09:27:24 +000015502
15503
Neal Norwitz05a45592006-03-20 06:30:08 +000015504
15505
Martin v. Löwis382abef2007-02-19 10:55:19 +000015506
15507
Christian Heimes36281872007-11-30 21:11:28 +000015508
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015509for ac_func in alarm bind_textdomain_codeset chown clock confstr \
Christian Heimes36281872007-11-30 21:11:28 +000015510 ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015511 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015512 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015513 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015514 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015515 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015516 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015517 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015518 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015519 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015520 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015521do
Martin v. Löwis11437992002-04-12 09:54:03 +000015522as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015523{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15524echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15525if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015526 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015527else
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015529/* confdefs.h. */
15530_ACEOF
15531cat confdefs.h >>conftest.$ac_ext
15532cat >>conftest.$ac_ext <<_ACEOF
15533/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015534/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15535 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15536#define $ac_func innocuous_$ac_func
15537
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015538/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015539 which can conflict with char $ac_func (); below.
15540 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015541 <limits.h> exists even on freestanding compilers. */
15542
15543#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015544# include <limits.h>
15545#else
15546# include <assert.h>
15547#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015548
15549#undef $ac_func
15550
Martin v. Löwiseba40652007-08-30 20:10:57 +000015551/* Override any GCC internal prototype to avoid an error.
15552 Use char because int might match the return type of a GCC
15553 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015554#ifdef __cplusplus
15555extern "C"
15556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015557char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015558/* The GNU C library defines this for functions which it implements
15559 to always fail with ENOSYS. Some functions are actually named
15560 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015561#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015562choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015563#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015564
Skip Montanaro6dead952003-09-25 14:50:04 +000015565int
15566main ()
15567{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015568return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015569 ;
15570 return 0;
15571}
15572_ACEOF
15573rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015574if { (ac_try="$ac_link"
15575case "(($ac_try" in
15576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15577 *) ac_try_echo=$ac_try;;
15578esac
15579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15580 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015582 grep -v '^ *+' conftest.er1 >conftest.err
15583 rm -f conftest.er1
15584 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015586 (exit $ac_status); } && {
15587 test -z "$ac_c_werror_flag" ||
15588 test ! -s conftest.err
15589 } && test -s conftest$ac_exeext &&
15590 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015592else
Martin v. Löwis11437992002-04-12 09:54:03 +000015593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015594sed 's/^/| /' conftest.$ac_ext >&5
15595
Martin v. Löwiseba40652007-08-30 20:10:57 +000015596 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015598
15599rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015600 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015602ac_res=`eval echo '${'$as_ac_var'}'`
15603 { echo "$as_me:$LINENO: result: $ac_res" >&5
15604echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015605if test `eval echo '${'$as_ac_var'}'` = yes; then
15606 cat >>confdefs.h <<_ACEOF
15607#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15608_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015609
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015610fi
15611done
15612
Michael W. Hudson54241132001-12-07 15:38:26 +000015613
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015614# For some functions, having a definition is not sufficient, since
15615# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015616{ echo "$as_me:$LINENO: checking for chroot" >&5
15617echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015619/* confdefs.h. */
15620_ACEOF
15621cat confdefs.h >>conftest.$ac_ext
15622cat >>conftest.$ac_ext <<_ACEOF
15623/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015624#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015625int
15626main ()
15627{
15628void *x=chroot
15629 ;
15630 return 0;
15631}
15632_ACEOF
15633rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015634if { (ac_try="$ac_compile"
15635case "(($ac_try" in
15636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15637 *) ac_try_echo=$ac_try;;
15638esac
15639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15640 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015641 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015642 grep -v '^ *+' conftest.er1 >conftest.err
15643 rm -f conftest.er1
15644 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015646 (exit $ac_status); } && {
15647 test -z "$ac_c_werror_flag" ||
15648 test ! -s conftest.err
15649 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015650
15651cat >>confdefs.h <<\_ACEOF
15652#define HAVE_CHROOT 1
15653_ACEOF
15654
Martin v. Löwiseba40652007-08-30 20:10:57 +000015655 { echo "$as_me:$LINENO: result: yes" >&5
15656echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015657else
15658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015659sed 's/^/| /' conftest.$ac_ext >&5
15660
Martin v. Löwiseba40652007-08-30 20:10:57 +000015661 { echo "$as_me:$LINENO: result: no" >&5
15662echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015663
15664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015665
15666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15667{ echo "$as_me:$LINENO: checking for link" >&5
15668echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015670/* confdefs.h. */
15671_ACEOF
15672cat confdefs.h >>conftest.$ac_ext
15673cat >>conftest.$ac_ext <<_ACEOF
15674/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015675#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015676int
15677main ()
15678{
15679void *x=link
15680 ;
15681 return 0;
15682}
15683_ACEOF
15684rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015685if { (ac_try="$ac_compile"
15686case "(($ac_try" in
15687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15688 *) ac_try_echo=$ac_try;;
15689esac
15690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15691 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015693 grep -v '^ *+' conftest.er1 >conftest.err
15694 rm -f conftest.er1
15695 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015697 (exit $ac_status); } && {
15698 test -z "$ac_c_werror_flag" ||
15699 test ! -s conftest.err
15700 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015701
15702cat >>confdefs.h <<\_ACEOF
15703#define HAVE_LINK 1
15704_ACEOF
15705
Martin v. Löwiseba40652007-08-30 20:10:57 +000015706 { echo "$as_me:$LINENO: result: yes" >&5
15707echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015708else
15709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015710sed 's/^/| /' conftest.$ac_ext >&5
15711
Martin v. Löwiseba40652007-08-30 20:10:57 +000015712 { echo "$as_me:$LINENO: result: no" >&5
15713echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015714
15715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015716
15717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15718{ echo "$as_me:$LINENO: checking for symlink" >&5
15719echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015720cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015721/* confdefs.h. */
15722_ACEOF
15723cat confdefs.h >>conftest.$ac_ext
15724cat >>conftest.$ac_ext <<_ACEOF
15725/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015726#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015727int
15728main ()
15729{
15730void *x=symlink
15731 ;
15732 return 0;
15733}
15734_ACEOF
15735rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015736if { (ac_try="$ac_compile"
15737case "(($ac_try" in
15738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15739 *) ac_try_echo=$ac_try;;
15740esac
15741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015744 grep -v '^ *+' conftest.er1 >conftest.err
15745 rm -f conftest.er1
15746 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015748 (exit $ac_status); } && {
15749 test -z "$ac_c_werror_flag" ||
15750 test ! -s conftest.err
15751 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015752
15753cat >>confdefs.h <<\_ACEOF
15754#define HAVE_SYMLINK 1
15755_ACEOF
15756
Martin v. Löwiseba40652007-08-30 20:10:57 +000015757 { echo "$as_me:$LINENO: result: yes" >&5
15758echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015759else
15760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015761sed 's/^/| /' conftest.$ac_ext >&5
15762
Martin v. Löwiseba40652007-08-30 20:10:57 +000015763 { echo "$as_me:$LINENO: result: no" >&5
15764echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015765
15766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015767
15768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15769{ echo "$as_me:$LINENO: checking for fchdir" >&5
15770echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015771cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015772/* confdefs.h. */
15773_ACEOF
15774cat confdefs.h >>conftest.$ac_ext
15775cat >>conftest.$ac_ext <<_ACEOF
15776/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015777#include <unistd.h>
15778int
15779main ()
15780{
15781void *x=fchdir
15782 ;
15783 return 0;
15784}
15785_ACEOF
15786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015787if { (ac_try="$ac_compile"
15788case "(($ac_try" in
15789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15790 *) ac_try_echo=$ac_try;;
15791esac
15792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015795 grep -v '^ *+' conftest.er1 >conftest.err
15796 rm -f conftest.er1
15797 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015799 (exit $ac_status); } && {
15800 test -z "$ac_c_werror_flag" ||
15801 test ! -s conftest.err
15802 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015803
15804cat >>confdefs.h <<\_ACEOF
15805#define HAVE_FCHDIR 1
15806_ACEOF
15807
Martin v. Löwiseba40652007-08-30 20:10:57 +000015808 { echo "$as_me:$LINENO: result: yes" >&5
15809echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015810else
15811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015812sed 's/^/| /' conftest.$ac_ext >&5
15813
Martin v. Löwiseba40652007-08-30 20:10:57 +000015814 { echo "$as_me:$LINENO: result: no" >&5
15815echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015816
15817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818
15819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15820{ echo "$as_me:$LINENO: checking for fsync" >&5
15821echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015822cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015823/* confdefs.h. */
15824_ACEOF
15825cat confdefs.h >>conftest.$ac_ext
15826cat >>conftest.$ac_ext <<_ACEOF
15827/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015828#include <unistd.h>
15829int
15830main ()
15831{
15832void *x=fsync
15833 ;
15834 return 0;
15835}
15836_ACEOF
15837rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015838if { (ac_try="$ac_compile"
15839case "(($ac_try" in
15840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15841 *) ac_try_echo=$ac_try;;
15842esac
15843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015846 grep -v '^ *+' conftest.er1 >conftest.err
15847 rm -f conftest.er1
15848 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850 (exit $ac_status); } && {
15851 test -z "$ac_c_werror_flag" ||
15852 test ! -s conftest.err
15853 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015854
15855cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015856#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015857_ACEOF
15858
Martin v. Löwiseba40652007-08-30 20:10:57 +000015859 { echo "$as_me:$LINENO: result: yes" >&5
15860echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015861else
15862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015863sed 's/^/| /' conftest.$ac_ext >&5
15864
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865 { echo "$as_me:$LINENO: result: no" >&5
15866echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015867
15868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015869
15870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15871{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15872echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015873cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015874/* confdefs.h. */
15875_ACEOF
15876cat confdefs.h >>conftest.$ac_ext
15877cat >>conftest.$ac_ext <<_ACEOF
15878/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015879#include <unistd.h>
15880int
15881main ()
15882{
15883void *x=fdatasync
15884 ;
15885 return 0;
15886}
15887_ACEOF
15888rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015889if { (ac_try="$ac_compile"
15890case "(($ac_try" in
15891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15892 *) ac_try_echo=$ac_try;;
15893esac
15894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015897 grep -v '^ *+' conftest.er1 >conftest.err
15898 rm -f conftest.er1
15899 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901 (exit $ac_status); } && {
15902 test -z "$ac_c_werror_flag" ||
15903 test ! -s conftest.err
15904 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015905
15906cat >>confdefs.h <<\_ACEOF
15907#define HAVE_FDATASYNC 1
15908_ACEOF
15909
Martin v. Löwiseba40652007-08-30 20:10:57 +000015910 { echo "$as_me:$LINENO: result: yes" >&5
15911echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015912else
15913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015914sed 's/^/| /' conftest.$ac_ext >&5
15915
Martin v. Löwiseba40652007-08-30 20:10:57 +000015916 { echo "$as_me:$LINENO: result: no" >&5
15917echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015918
15919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015920
15921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015922{ echo "$as_me:$LINENO: checking for epoll" >&5
15923echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
15924cat >conftest.$ac_ext <<_ACEOF
15925/* confdefs.h. */
15926_ACEOF
15927cat confdefs.h >>conftest.$ac_ext
15928cat >>conftest.$ac_ext <<_ACEOF
15929/* end confdefs.h. */
15930#include <sys/epoll.h>
15931int
15932main ()
15933{
15934void *x=epoll_create
15935 ;
15936 return 0;
15937}
15938_ACEOF
15939rm -f conftest.$ac_objext
15940if { (ac_try="$ac_compile"
15941case "(($ac_try" in
15942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15943 *) ac_try_echo=$ac_try;;
15944esac
15945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15946 (eval "$ac_compile") 2>conftest.er1
15947 ac_status=$?
15948 grep -v '^ *+' conftest.er1 >conftest.err
15949 rm -f conftest.er1
15950 cat conftest.err >&5
15951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15952 (exit $ac_status); } && {
15953 test -z "$ac_c_werror_flag" ||
15954 test ! -s conftest.err
15955 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015956
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015957cat >>confdefs.h <<\_ACEOF
15958#define HAVE_EPOLL 1
15959_ACEOF
15960
15961 { echo "$as_me:$LINENO: result: yes" >&5
15962echo "${ECHO_T}yes" >&6; }
15963else
15964 echo "$as_me: failed program was:" >&5
15965sed 's/^/| /' conftest.$ac_ext >&5
15966
15967 { echo "$as_me:$LINENO: result: no" >&5
15968echo "${ECHO_T}no" >&6; }
15969
15970fi
15971
15972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15973{ echo "$as_me:$LINENO: checking for kqueue" >&5
15974echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
15975cat >conftest.$ac_ext <<_ACEOF
15976/* confdefs.h. */
15977_ACEOF
15978cat confdefs.h >>conftest.$ac_ext
15979cat >>conftest.$ac_ext <<_ACEOF
15980/* end confdefs.h. */
15981
15982#include <sys/types.h>
15983#include <sys/event.h>
15984
15985int
15986main ()
15987{
15988int x=kqueue()
15989 ;
15990 return 0;
15991}
15992_ACEOF
15993rm -f conftest.$ac_objext
15994if { (ac_try="$ac_compile"
15995case "(($ac_try" in
15996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15997 *) ac_try_echo=$ac_try;;
15998esac
15999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16000 (eval "$ac_compile") 2>conftest.er1
16001 ac_status=$?
16002 grep -v '^ *+' conftest.er1 >conftest.err
16003 rm -f conftest.er1
16004 cat conftest.err >&5
16005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16006 (exit $ac_status); } && {
16007 test -z "$ac_c_werror_flag" ||
16008 test ! -s conftest.err
16009 } && test -s conftest.$ac_objext; then
16010
16011cat >>confdefs.h <<\_ACEOF
16012#define HAVE_KQUEUE 1
16013_ACEOF
16014
16015 { echo "$as_me:$LINENO: result: yes" >&5
16016echo "${ECHO_T}yes" >&6; }
16017else
16018 echo "$as_me: failed program was:" >&5
16019sed 's/^/| /' conftest.$ac_ext >&5
16020
16021 { echo "$as_me:$LINENO: result: no" >&5
16022echo "${ECHO_T}no" >&6; }
16023
16024fi
16025
16026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016027# On some systems (eg. FreeBSD 5), we would find a definition of the
16028# functions ctermid_r, setgroups in the library, but no prototype
16029# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16030# address to avoid compiler warnings and potential miscompilations
16031# because of the missing prototypes.
16032
Martin v. Löwiseba40652007-08-30 20:10:57 +000016033{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16034echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016036/* confdefs.h. */
16037_ACEOF
16038cat confdefs.h >>conftest.$ac_ext
16039cat >>conftest.$ac_ext <<_ACEOF
16040/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016041
16042#include "confdefs.h"
16043#include <stdio.h>
16044
Martin v. Löwisd5843682002-11-21 20:41:28 +000016045int
16046main ()
16047{
16048void* p = ctermid_r
16049 ;
16050 return 0;
16051}
16052_ACEOF
16053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016054if { (ac_try="$ac_compile"
16055case "(($ac_try" in
16056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16057 *) ac_try_echo=$ac_try;;
16058esac
16059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016062 grep -v '^ *+' conftest.er1 >conftest.err
16063 rm -f conftest.er1
16064 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016066 (exit $ac_status); } && {
16067 test -z "$ac_c_werror_flag" ||
16068 test ! -s conftest.err
16069 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016070
16071cat >>confdefs.h <<\_ACEOF
16072#define HAVE_CTERMID_R 1
16073_ACEOF
16074
Martin v. Löwiseba40652007-08-30 20:10:57 +000016075 { echo "$as_me:$LINENO: result: yes" >&5
16076echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016077else
16078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016079sed 's/^/| /' conftest.$ac_ext >&5
16080
Martin v. Löwiseba40652007-08-30 20:10:57 +000016081 { echo "$as_me:$LINENO: result: no" >&5
16082echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016083
16084fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016085
Martin v. Löwiseba40652007-08-30 20:10:57 +000016086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16087
16088{ echo "$as_me:$LINENO: checking for flock" >&5
16089echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016091/* confdefs.h. */
16092_ACEOF
16093cat confdefs.h >>conftest.$ac_ext
16094cat >>conftest.$ac_ext <<_ACEOF
16095/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016096
16097#include "confdefs.h"
16098#include <sys/file.h>
16099
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016100int
16101main ()
16102{
16103void* p = flock
16104 ;
16105 return 0;
16106}
16107_ACEOF
16108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016109if { (ac_try="$ac_compile"
16110case "(($ac_try" in
16111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16112 *) ac_try_echo=$ac_try;;
16113esac
16114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016117 grep -v '^ *+' conftest.er1 >conftest.err
16118 rm -f conftest.er1
16119 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016121 (exit $ac_status); } && {
16122 test -z "$ac_c_werror_flag" ||
16123 test ! -s conftest.err
16124 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016125
16126cat >>confdefs.h <<\_ACEOF
16127#define HAVE_FLOCK 1
16128_ACEOF
16129
Martin v. Löwiseba40652007-08-30 20:10:57 +000016130 { echo "$as_me:$LINENO: result: yes" >&5
16131echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016132else
16133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016134sed 's/^/| /' conftest.$ac_ext >&5
16135
Martin v. Löwiseba40652007-08-30 20:10:57 +000016136 { echo "$as_me:$LINENO: result: no" >&5
16137echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016138
16139fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016140
Martin v. Löwiseba40652007-08-30 20:10:57 +000016141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16142
16143{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16144echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016146/* confdefs.h. */
16147_ACEOF
16148cat confdefs.h >>conftest.$ac_ext
16149cat >>conftest.$ac_ext <<_ACEOF
16150/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016151
16152#include "confdefs.h"
16153#include <unistd.h>
16154
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016155int
16156main ()
16157{
16158void* p = getpagesize
16159 ;
16160 return 0;
16161}
16162_ACEOF
16163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016164if { (ac_try="$ac_compile"
16165case "(($ac_try" in
16166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16167 *) ac_try_echo=$ac_try;;
16168esac
16169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016172 grep -v '^ *+' conftest.er1 >conftest.err
16173 rm -f conftest.er1
16174 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016176 (exit $ac_status); } && {
16177 test -z "$ac_c_werror_flag" ||
16178 test ! -s conftest.err
16179 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016180
16181cat >>confdefs.h <<\_ACEOF
16182#define HAVE_GETPAGESIZE 1
16183_ACEOF
16184
Martin v. Löwiseba40652007-08-30 20:10:57 +000016185 { echo "$as_me:$LINENO: result: yes" >&5
16186echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016187else
16188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016189sed 's/^/| /' conftest.$ac_ext >&5
16190
Martin v. Löwiseba40652007-08-30 20:10:57 +000016191 { echo "$as_me:$LINENO: result: no" >&5
16192echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016193
16194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016195
16196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016197
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016198for ac_prog in true
16199do
16200 # Extract the first word of "$ac_prog", so it can be a program name with args.
16201set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016202{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16203echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016204if test "${ac_cv_prog_TRUE+set}" = set; then
16205 echo $ECHO_N "(cached) $ECHO_C" >&6
16206else
16207 if test -n "$TRUE"; then
16208 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16209else
16210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16211for as_dir in $PATH
16212do
16213 IFS=$as_save_IFS
16214 test -z "$as_dir" && as_dir=.
16215 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016216 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 +000016217 ac_cv_prog_TRUE="$ac_prog"
16218 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16219 break 2
16220 fi
16221done
16222done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016223IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016224
16225fi
16226fi
16227TRUE=$ac_cv_prog_TRUE
16228if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016229 { echo "$as_me:$LINENO: result: $TRUE" >&5
16230echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016231else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016232 { echo "$as_me:$LINENO: result: no" >&5
16233echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016234fi
16235
Martin v. Löwiseba40652007-08-30 20:10:57 +000016236
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016237 test -n "$TRUE" && break
16238done
16239test -n "$TRUE" || TRUE="/bin/true"
16240
16241
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16243echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016244if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16245 echo $ECHO_N "(cached) $ECHO_C" >&6
16246else
16247 ac_check_lib_save_LIBS=$LIBS
16248LIBS="-lc $LIBS"
16249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016250/* confdefs.h. */
16251_ACEOF
16252cat confdefs.h >>conftest.$ac_ext
16253cat >>conftest.$ac_ext <<_ACEOF
16254/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016255
Martin v. Löwiseba40652007-08-30 20:10:57 +000016256/* Override any GCC internal prototype to avoid an error.
16257 Use char because int might match the return type of a GCC
16258 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016259#ifdef __cplusplus
16260extern "C"
16261#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016262char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016263int
16264main ()
16265{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016267 ;
16268 return 0;
16269}
16270_ACEOF
16271rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016272if { (ac_try="$ac_link"
16273case "(($ac_try" in
16274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16275 *) ac_try_echo=$ac_try;;
16276esac
16277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16278 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016280 grep -v '^ *+' conftest.er1 >conftest.err
16281 rm -f conftest.er1
16282 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016284 (exit $ac_status); } && {
16285 test -z "$ac_c_werror_flag" ||
16286 test ! -s conftest.err
16287 } && test -s conftest$ac_exeext &&
16288 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016289 ac_cv_lib_c_inet_aton=yes
16290else
16291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016292sed 's/^/| /' conftest.$ac_ext >&5
16293
Martin v. Löwiseba40652007-08-30 20:10:57 +000016294 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016296
16297rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016299LIBS=$ac_check_lib_save_LIBS
16300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016301{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16302echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016303if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016304 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016305else
16306
Martin v. Löwiseba40652007-08-30 20:10:57 +000016307{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16308echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016309if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16310 echo $ECHO_N "(cached) $ECHO_C" >&6
16311else
16312 ac_check_lib_save_LIBS=$LIBS
16313LIBS="-lresolv $LIBS"
16314cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016315/* confdefs.h. */
16316_ACEOF
16317cat confdefs.h >>conftest.$ac_ext
16318cat >>conftest.$ac_ext <<_ACEOF
16319/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016320
Martin v. Löwiseba40652007-08-30 20:10:57 +000016321/* Override any GCC internal prototype to avoid an error.
16322 Use char because int might match the return type of a GCC
16323 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016324#ifdef __cplusplus
16325extern "C"
16326#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016327char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016328int
16329main ()
16330{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016331return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016332 ;
16333 return 0;
16334}
16335_ACEOF
16336rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016337if { (ac_try="$ac_link"
16338case "(($ac_try" in
16339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16340 *) ac_try_echo=$ac_try;;
16341esac
16342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16343 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016345 grep -v '^ *+' conftest.er1 >conftest.err
16346 rm -f conftest.er1
16347 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016349 (exit $ac_status); } && {
16350 test -z "$ac_c_werror_flag" ||
16351 test ! -s conftest.err
16352 } && test -s conftest$ac_exeext &&
16353 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016354 ac_cv_lib_resolv_inet_aton=yes
16355else
16356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016357sed 's/^/| /' conftest.$ac_ext >&5
16358
Martin v. Löwiseba40652007-08-30 20:10:57 +000016359 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016361
16362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016363 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016364LIBS=$ac_check_lib_save_LIBS
16365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016366{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16367echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016368if test $ac_cv_lib_resolv_inet_aton = yes; then
16369 cat >>confdefs.h <<_ACEOF
16370#define HAVE_LIBRESOLV 1
16371_ACEOF
16372
16373 LIBS="-lresolv $LIBS"
16374
16375fi
16376
16377
16378fi
16379
16380
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016381# On Tru64, chflags seems to be present, but calling it will
16382# exit Python
16383{ echo "$as_me:$LINENO: checking for chflags" >&5
16384echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16385if test "$cross_compiling" = yes; then
16386 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16387See \`config.log' for more details." >&5
16388echo "$as_me: error: cannot run test program while cross compiling
16389See \`config.log' for more details." >&2;}
16390 { (exit 1); exit 1; }; }
16391else
16392 cat >conftest.$ac_ext <<_ACEOF
16393/* confdefs.h. */
16394_ACEOF
16395cat confdefs.h >>conftest.$ac_ext
16396cat >>conftest.$ac_ext <<_ACEOF
16397/* end confdefs.h. */
16398
16399#include <sys/stat.h>
16400#include <unistd.h>
16401int main(int argc, char*argv[])
16402{
16403 if(chflags(argv[0], 0) != 0)
16404 return 1;
16405 return 0;
16406}
16407
16408_ACEOF
16409rm -f conftest$ac_exeext
16410if { (ac_try="$ac_link"
16411case "(($ac_try" in
16412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16413 *) ac_try_echo=$ac_try;;
16414esac
16415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16416 (eval "$ac_link") 2>&5
16417 ac_status=$?
16418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16420 { (case "(($ac_try" in
16421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16422 *) ac_try_echo=$ac_try;;
16423esac
16424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16425 (eval "$ac_try") 2>&5
16426 ac_status=$?
16427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16428 (exit $ac_status); }; }; then
16429
16430cat >>confdefs.h <<\_ACEOF
16431#define HAVE_CHFLAGS 1
16432_ACEOF
16433
16434 { echo "$as_me:$LINENO: result: yes" >&5
16435echo "${ECHO_T}yes" >&6; }
16436else
16437 echo "$as_me: program exited with status $ac_status" >&5
16438echo "$as_me: failed program was:" >&5
16439sed 's/^/| /' conftest.$ac_ext >&5
16440
16441( exit $ac_status )
16442{ echo "$as_me:$LINENO: result: no" >&5
16443echo "${ECHO_T}no" >&6; }
16444
16445fi
16446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16447fi
16448
16449
16450
16451{ echo "$as_me:$LINENO: checking for lchflags" >&5
16452echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16453if test "$cross_compiling" = yes; then
16454 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16455See \`config.log' for more details." >&5
16456echo "$as_me: error: cannot run test program while cross compiling
16457See \`config.log' for more details." >&2;}
16458 { (exit 1); exit 1; }; }
16459else
16460 cat >conftest.$ac_ext <<_ACEOF
16461/* confdefs.h. */
16462_ACEOF
16463cat confdefs.h >>conftest.$ac_ext
16464cat >>conftest.$ac_ext <<_ACEOF
16465/* end confdefs.h. */
16466
16467#include <sys/stat.h>
16468#include <unistd.h>
16469int main(int argc, char*argv[])
16470{
16471 if(lchflags(argv[0], 0) != 0)
16472 return 1;
16473 return 0;
16474}
16475
16476_ACEOF
16477rm -f conftest$ac_exeext
16478if { (ac_try="$ac_link"
16479case "(($ac_try" in
16480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16481 *) ac_try_echo=$ac_try;;
16482esac
16483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16484 (eval "$ac_link") 2>&5
16485 ac_status=$?
16486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16487 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16488 { (case "(($ac_try" in
16489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16490 *) ac_try_echo=$ac_try;;
16491esac
16492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16493 (eval "$ac_try") 2>&5
16494 ac_status=$?
16495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16496 (exit $ac_status); }; }; then
16497
16498cat >>confdefs.h <<\_ACEOF
16499#define HAVE_LCHFLAGS 1
16500_ACEOF
16501
16502 { echo "$as_me:$LINENO: result: yes" >&5
16503echo "${ECHO_T}yes" >&6; }
16504else
16505 echo "$as_me: program exited with status $ac_status" >&5
16506echo "$as_me: failed program was:" >&5
16507sed 's/^/| /' conftest.$ac_ext >&5
16508
16509( exit $ac_status )
16510{ echo "$as_me:$LINENO: result: no" >&5
16511echo "${ECHO_T}no" >&6; }
16512
16513fi
16514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16515fi
16516
16517
16518
Ronald Oussorenf8752642006-07-06 10:13:35 +000016519case $ac_sys_system/$ac_sys_release in
16520Darwin/*)
16521 _CUR_CFLAGS="${CFLAGS}"
16522 _CUR_LDFLAGS="${LDFLAGS}"
16523 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16524 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16525 ;;
16526esac
16527
Martin v. Löwiseba40652007-08-30 20:10:57 +000016528{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16529echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016530if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16531 echo $ECHO_N "(cached) $ECHO_C" >&6
16532else
16533 ac_check_lib_save_LIBS=$LIBS
16534LIBS="-lz $LIBS"
16535cat >conftest.$ac_ext <<_ACEOF
16536/* confdefs.h. */
16537_ACEOF
16538cat confdefs.h >>conftest.$ac_ext
16539cat >>conftest.$ac_ext <<_ACEOF
16540/* end confdefs.h. */
16541
Martin v. Löwiseba40652007-08-30 20:10:57 +000016542/* Override any GCC internal prototype to avoid an error.
16543 Use char because int might match the return type of a GCC
16544 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016545#ifdef __cplusplus
16546extern "C"
16547#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016548char inflateCopy ();
16549int
16550main ()
16551{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016552return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016553 ;
16554 return 0;
16555}
16556_ACEOF
16557rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016558if { (ac_try="$ac_link"
16559case "(($ac_try" in
16560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16561 *) ac_try_echo=$ac_try;;
16562esac
16563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16564 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016565 ac_status=$?
16566 grep -v '^ *+' conftest.er1 >conftest.err
16567 rm -f conftest.er1
16568 cat conftest.err >&5
16569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016570 (exit $ac_status); } && {
16571 test -z "$ac_c_werror_flag" ||
16572 test ! -s conftest.err
16573 } && test -s conftest$ac_exeext &&
16574 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016575 ac_cv_lib_z_inflateCopy=yes
16576else
16577 echo "$as_me: failed program was:" >&5
16578sed 's/^/| /' conftest.$ac_ext >&5
16579
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016582
16583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016584 conftest$ac_exeext conftest.$ac_ext
16585LIBS=$ac_check_lib_save_LIBS
16586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16588echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016589if test $ac_cv_lib_z_inflateCopy = yes; then
16590
16591cat >>confdefs.h <<\_ACEOF
16592#define HAVE_ZLIB_COPY 1
16593_ACEOF
16594
16595fi
16596
16597
Ronald Oussorenf8752642006-07-06 10:13:35 +000016598case $ac_sys_system/$ac_sys_release in
16599Darwin/*)
16600 CFLAGS="${_CUR_CFLAGS}"
16601 LDFLAGS="${_CUR_LDFLAGS}"
16602 ;;
16603esac
16604
Martin v. Löwiseba40652007-08-30 20:10:57 +000016605{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16606echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016608/* confdefs.h. */
16609_ACEOF
16610cat confdefs.h >>conftest.$ac_ext
16611cat >>conftest.$ac_ext <<_ACEOF
16612/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016613
16614#include "confdefs.h"
16615#include <netdb.h>
16616
Martin v. Löwise9416172003-05-03 10:12:45 +000016617int
16618main ()
16619{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016620void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016621 ;
16622 return 0;
16623}
16624_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016625rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016626if { (ac_try="$ac_link"
16627case "(($ac_try" in
16628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16629 *) ac_try_echo=$ac_try;;
16630esac
16631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16632 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016634 grep -v '^ *+' conftest.er1 >conftest.err
16635 rm -f conftest.er1
16636 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016638 (exit $ac_status); } && {
16639 test -z "$ac_c_werror_flag" ||
16640 test ! -s conftest.err
16641 } && test -s conftest$ac_exeext &&
16642 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016643
16644cat >>confdefs.h <<\_ACEOF
16645#define HAVE_HSTRERROR 1
16646_ACEOF
16647
Martin v. Löwiseba40652007-08-30 20:10:57 +000016648 { echo "$as_me:$LINENO: result: yes" >&5
16649echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016650else
16651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016652sed 's/^/| /' conftest.$ac_ext >&5
16653
Martin v. Löwiseba40652007-08-30 20:10:57 +000016654 { echo "$as_me:$LINENO: result: no" >&5
16655echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016656
16657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016658
16659rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016661
Martin v. Löwiseba40652007-08-30 20:10:57 +000016662{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16663echo $ECHO_N "checking for inet_aton... $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"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016672#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016673#include <sys/socket.h>
16674#include <netinet/in.h>
16675#include <arpa/inet.h>
16676
Martin v. Löwise9416172003-05-03 10:12:45 +000016677int
16678main ()
16679{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016680void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016681 ;
16682 return 0;
16683}
16684_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016685rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016686if { (ac_try="$ac_link"
16687case "(($ac_try" in
16688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16689 *) ac_try_echo=$ac_try;;
16690esac
16691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16692 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016694 grep -v '^ *+' conftest.er1 >conftest.err
16695 rm -f conftest.er1
16696 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016698 (exit $ac_status); } && {
16699 test -z "$ac_c_werror_flag" ||
16700 test ! -s conftest.err
16701 } && test -s conftest$ac_exeext &&
16702 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016703
16704cat >>confdefs.h <<\_ACEOF
16705#define HAVE_INET_ATON 1
16706_ACEOF
16707
Martin v. Löwiseba40652007-08-30 20:10:57 +000016708 { echo "$as_me:$LINENO: result: yes" >&5
16709echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016710else
16711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016712sed 's/^/| /' conftest.$ac_ext >&5
16713
Martin v. Löwiseba40652007-08-30 20:10:57 +000016714 { echo "$as_me:$LINENO: result: no" >&5
16715echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016716
16717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016718
16719rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016721
Martin v. Löwiseba40652007-08-30 20:10:57 +000016722{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16723echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016724cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016725/* confdefs.h. */
16726_ACEOF
16727cat confdefs.h >>conftest.$ac_ext
16728cat >>conftest.$ac_ext <<_ACEOF
16729/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016730
16731#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016732#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016733#include <sys/socket.h>
16734#include <netinet/in.h>
16735#include <arpa/inet.h>
16736
Martin v. Löwise9416172003-05-03 10:12:45 +000016737int
16738main ()
16739{
16740void* p = inet_pton
16741 ;
16742 return 0;
16743}
16744_ACEOF
16745rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016746if { (ac_try="$ac_compile"
16747case "(($ac_try" in
16748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16749 *) ac_try_echo=$ac_try;;
16750esac
16751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16752 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016754 grep -v '^ *+' conftest.er1 >conftest.err
16755 rm -f conftest.er1
16756 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016758 (exit $ac_status); } && {
16759 test -z "$ac_c_werror_flag" ||
16760 test ! -s conftest.err
16761 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016762
16763cat >>confdefs.h <<\_ACEOF
16764#define HAVE_INET_PTON 1
16765_ACEOF
16766
Martin v. Löwiseba40652007-08-30 20:10:57 +000016767 { echo "$as_me:$LINENO: result: yes" >&5
16768echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016769else
16770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016771sed 's/^/| /' conftest.$ac_ext >&5
16772
Martin v. Löwiseba40652007-08-30 20:10:57 +000016773 { echo "$as_me:$LINENO: result: no" >&5
16774echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016775
16776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016777
16778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016779
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016780# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016781{ echo "$as_me:$LINENO: checking for setgroups" >&5
16782echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016783cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016784/* confdefs.h. */
16785_ACEOF
16786cat confdefs.h >>conftest.$ac_ext
16787cat >>conftest.$ac_ext <<_ACEOF
16788/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016789
16790#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016791#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016792#ifdef HAVE_GRP_H
16793#include <grp.h>
16794#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016795
Martin v. Löwisd5843682002-11-21 20:41:28 +000016796int
16797main ()
16798{
16799void* p = setgroups
16800 ;
16801 return 0;
16802}
16803_ACEOF
16804rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016805if { (ac_try="$ac_compile"
16806case "(($ac_try" in
16807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16808 *) ac_try_echo=$ac_try;;
16809esac
16810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016813 grep -v '^ *+' conftest.er1 >conftest.err
16814 rm -f conftest.er1
16815 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016817 (exit $ac_status); } && {
16818 test -z "$ac_c_werror_flag" ||
16819 test ! -s conftest.err
16820 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016821
16822cat >>confdefs.h <<\_ACEOF
16823#define HAVE_SETGROUPS 1
16824_ACEOF
16825
Martin v. Löwiseba40652007-08-30 20:10:57 +000016826 { echo "$as_me:$LINENO: result: yes" >&5
16827echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016828else
16829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016830sed 's/^/| /' conftest.$ac_ext >&5
16831
Martin v. Löwiseba40652007-08-30 20:10:57 +000016832 { echo "$as_me:$LINENO: result: no" >&5
16833echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016834
16835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016836
16837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016838
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016839# check for openpty and forkpty
16840
Martin v. Löwis11437992002-04-12 09:54:03 +000016841
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016842for ac_func in openpty
16843do
Martin v. Löwis11437992002-04-12 09:54:03 +000016844as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016845{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16846echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16847if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016849else
Martin v. Löwis11437992002-04-12 09:54:03 +000016850 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016851/* confdefs.h. */
16852_ACEOF
16853cat confdefs.h >>conftest.$ac_ext
16854cat >>conftest.$ac_ext <<_ACEOF
16855/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016856/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16857 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16858#define $ac_func innocuous_$ac_func
16859
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016860/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016861 which can conflict with char $ac_func (); below.
16862 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016863 <limits.h> exists even on freestanding compilers. */
16864
16865#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016866# include <limits.h>
16867#else
16868# include <assert.h>
16869#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016870
16871#undef $ac_func
16872
Martin v. Löwiseba40652007-08-30 20:10:57 +000016873/* Override any GCC internal prototype to avoid an error.
16874 Use char because int might match the return type of a GCC
16875 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016876#ifdef __cplusplus
16877extern "C"
16878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016879char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016880/* The GNU C library defines this for functions which it implements
16881 to always fail with ENOSYS. Some functions are actually named
16882 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016883#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016884choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016885#endif
16886
Skip Montanaro6dead952003-09-25 14:50:04 +000016887int
16888main ()
16889{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016890return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016891 ;
16892 return 0;
16893}
16894_ACEOF
16895rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016896if { (ac_try="$ac_link"
16897case "(($ac_try" in
16898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16899 *) ac_try_echo=$ac_try;;
16900esac
16901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16902 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016904 grep -v '^ *+' conftest.er1 >conftest.err
16905 rm -f conftest.er1
16906 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016908 (exit $ac_status); } && {
16909 test -z "$ac_c_werror_flag" ||
16910 test ! -s conftest.err
16911 } && test -s conftest$ac_exeext &&
16912 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016914else
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016916sed 's/^/| /' conftest.$ac_ext >&5
16917
Martin v. Löwiseba40652007-08-30 20:10:57 +000016918 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016920
16921rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016922 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016924ac_res=`eval echo '${'$as_ac_var'}'`
16925 { echo "$as_me:$LINENO: result: $ac_res" >&5
16926echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016927if test `eval echo '${'$as_ac_var'}'` = yes; then
16928 cat >>confdefs.h <<_ACEOF
16929#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16930_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016931
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016932else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016933 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16934echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016935if test "${ac_cv_lib_util_openpty+set}" = set; then
16936 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016937else
Martin v. Löwis11437992002-04-12 09:54:03 +000016938 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016939LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016940cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016941/* confdefs.h. */
16942_ACEOF
16943cat confdefs.h >>conftest.$ac_ext
16944cat >>conftest.$ac_ext <<_ACEOF
16945/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016946
Martin v. Löwiseba40652007-08-30 20:10:57 +000016947/* Override any GCC internal prototype to avoid an error.
16948 Use char because int might match the return type of a GCC
16949 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016950#ifdef __cplusplus
16951extern "C"
16952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016953char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016954int
16955main ()
16956{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016957return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016958 ;
16959 return 0;
16960}
16961_ACEOF
16962rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016963if { (ac_try="$ac_link"
16964case "(($ac_try" in
16965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16966 *) ac_try_echo=$ac_try;;
16967esac
16968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16969 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016971 grep -v '^ *+' conftest.er1 >conftest.err
16972 rm -f conftest.er1
16973 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016975 (exit $ac_status); } && {
16976 test -z "$ac_c_werror_flag" ||
16977 test ! -s conftest.err
16978 } && test -s conftest$ac_exeext &&
16979 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016980 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016981else
Martin v. Löwis11437992002-04-12 09:54:03 +000016982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016983sed 's/^/| /' conftest.$ac_ext >&5
16984
Martin v. Löwiseba40652007-08-30 20:10:57 +000016985 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016987
16988rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016989 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016990LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016992{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
16993echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016994if test $ac_cv_lib_util_openpty = yes; then
16995 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016996#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016997_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016998 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016999else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017000 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17001echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017002if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17003 echo $ECHO_N "(cached) $ECHO_C" >&6
17004else
17005 ac_check_lib_save_LIBS=$LIBS
17006LIBS="-lbsd $LIBS"
17007cat >conftest.$ac_ext <<_ACEOF
17008/* confdefs.h. */
17009_ACEOF
17010cat confdefs.h >>conftest.$ac_ext
17011cat >>conftest.$ac_ext <<_ACEOF
17012/* end confdefs.h. */
17013
Martin v. Löwiseba40652007-08-30 20:10:57 +000017014/* Override any GCC internal prototype to avoid an error.
17015 Use char because int might match the return type of a GCC
17016 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017017#ifdef __cplusplus
17018extern "C"
17019#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017020char openpty ();
17021int
17022main ()
17023{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017024return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017025 ;
17026 return 0;
17027}
17028_ACEOF
17029rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017030if { (ac_try="$ac_link"
17031case "(($ac_try" in
17032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17033 *) ac_try_echo=$ac_try;;
17034esac
17035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17036 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017037 ac_status=$?
17038 grep -v '^ *+' conftest.er1 >conftest.err
17039 rm -f conftest.er1
17040 cat conftest.err >&5
17041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017042 (exit $ac_status); } && {
17043 test -z "$ac_c_werror_flag" ||
17044 test ! -s conftest.err
17045 } && test -s conftest$ac_exeext &&
17046 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017047 ac_cv_lib_bsd_openpty=yes
17048else
17049 echo "$as_me: failed program was:" >&5
17050sed 's/^/| /' conftest.$ac_ext >&5
17051
Martin v. Löwiseba40652007-08-30 20:10:57 +000017052 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017054
17055rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017056 conftest$ac_exeext conftest.$ac_ext
17057LIBS=$ac_check_lib_save_LIBS
17058fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017059{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17060echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017061if test $ac_cv_lib_bsd_openpty = yes; then
17062 cat >>confdefs.h <<\_ACEOF
17063#define HAVE_OPENPTY 1
17064_ACEOF
17065 LIBS="$LIBS -lbsd"
17066fi
17067
17068
17069fi
17070
Fred Drake8cef4cf2000-06-28 16:40:38 +000017071
17072fi
17073done
17074
Martin v. Löwis11437992002-04-12 09:54:03 +000017075
Fred Drake8cef4cf2000-06-28 16:40:38 +000017076for ac_func in forkpty
17077do
Martin v. Löwis11437992002-04-12 09:54:03 +000017078as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017079{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17080echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17081if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017082 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017083else
Martin v. Löwis11437992002-04-12 09:54:03 +000017084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017085/* confdefs.h. */
17086_ACEOF
17087cat confdefs.h >>conftest.$ac_ext
17088cat >>conftest.$ac_ext <<_ACEOF
17089/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017090/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17091 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17092#define $ac_func innocuous_$ac_func
17093
Fred Drake8cef4cf2000-06-28 16:40:38 +000017094/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017095 which can conflict with char $ac_func (); below.
17096 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017097 <limits.h> exists even on freestanding compilers. */
17098
17099#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017100# include <limits.h>
17101#else
17102# include <assert.h>
17103#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017104
17105#undef $ac_func
17106
Martin v. Löwiseba40652007-08-30 20:10:57 +000017107/* Override any GCC internal prototype to avoid an error.
17108 Use char because int might match the return type of a GCC
17109 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017110#ifdef __cplusplus
17111extern "C"
17112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017113char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017114/* The GNU C library defines this for functions which it implements
17115 to always fail with ENOSYS. Some functions are actually named
17116 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017117#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017118choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017119#endif
17120
Skip Montanaro6dead952003-09-25 14:50:04 +000017121int
17122main ()
17123{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017124return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017125 ;
17126 return 0;
17127}
17128_ACEOF
17129rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017130if { (ac_try="$ac_link"
17131case "(($ac_try" in
17132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17133 *) ac_try_echo=$ac_try;;
17134esac
17135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17136 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017138 grep -v '^ *+' conftest.er1 >conftest.err
17139 rm -f conftest.er1
17140 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017142 (exit $ac_status); } && {
17143 test -z "$ac_c_werror_flag" ||
17144 test ! -s conftest.err
17145 } && test -s conftest$ac_exeext &&
17146 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017147 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017148else
Martin v. Löwis11437992002-04-12 09:54:03 +000017149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017150sed 's/^/| /' conftest.$ac_ext >&5
17151
Martin v. Löwiseba40652007-08-30 20:10:57 +000017152 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017154
17155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017156 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017158ac_res=`eval echo '${'$as_ac_var'}'`
17159 { echo "$as_me:$LINENO: result: $ac_res" >&5
17160echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017161if test `eval echo '${'$as_ac_var'}'` = yes; then
17162 cat >>confdefs.h <<_ACEOF
17163#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17164_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017165
Fred Drake8cef4cf2000-06-28 16:40:38 +000017166else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017167 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17168echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017169if test "${ac_cv_lib_util_forkpty+set}" = set; then
17170 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017171else
Martin v. Löwis11437992002-04-12 09:54:03 +000017172 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017173LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017175/* confdefs.h. */
17176_ACEOF
17177cat confdefs.h >>conftest.$ac_ext
17178cat >>conftest.$ac_ext <<_ACEOF
17179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017180
Martin v. Löwiseba40652007-08-30 20:10:57 +000017181/* Override any GCC internal prototype to avoid an error.
17182 Use char because int might match the return type of a GCC
17183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017184#ifdef __cplusplus
17185extern "C"
17186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017187char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017188int
17189main ()
17190{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017191return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017192 ;
17193 return 0;
17194}
17195_ACEOF
17196rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017197if { (ac_try="$ac_link"
17198case "(($ac_try" in
17199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17200 *) ac_try_echo=$ac_try;;
17201esac
17202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17203 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017205 grep -v '^ *+' conftest.er1 >conftest.err
17206 rm -f conftest.er1
17207 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017209 (exit $ac_status); } && {
17210 test -z "$ac_c_werror_flag" ||
17211 test ! -s conftest.err
17212 } && test -s conftest$ac_exeext &&
17213 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017214 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017215else
Martin v. Löwis11437992002-04-12 09:54:03 +000017216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017217sed 's/^/| /' conftest.$ac_ext >&5
17218
Martin v. Löwiseba40652007-08-30 20:10:57 +000017219 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017221
17222rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017224LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017226{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17227echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017228if test $ac_cv_lib_util_forkpty = yes; then
17229 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017230#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017231_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017232 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017233else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017234 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17235echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017236if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17237 echo $ECHO_N "(cached) $ECHO_C" >&6
17238else
17239 ac_check_lib_save_LIBS=$LIBS
17240LIBS="-lbsd $LIBS"
17241cat >conftest.$ac_ext <<_ACEOF
17242/* confdefs.h. */
17243_ACEOF
17244cat confdefs.h >>conftest.$ac_ext
17245cat >>conftest.$ac_ext <<_ACEOF
17246/* end confdefs.h. */
17247
Martin v. Löwiseba40652007-08-30 20:10:57 +000017248/* Override any GCC internal prototype to avoid an error.
17249 Use char because int might match the return type of a GCC
17250 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017251#ifdef __cplusplus
17252extern "C"
17253#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017254char forkpty ();
17255int
17256main ()
17257{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017258return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017259 ;
17260 return 0;
17261}
17262_ACEOF
17263rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017264if { (ac_try="$ac_link"
17265case "(($ac_try" in
17266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17267 *) ac_try_echo=$ac_try;;
17268esac
17269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17270 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017271 ac_status=$?
17272 grep -v '^ *+' conftest.er1 >conftest.err
17273 rm -f conftest.er1
17274 cat conftest.err >&5
17275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017276 (exit $ac_status); } && {
17277 test -z "$ac_c_werror_flag" ||
17278 test ! -s conftest.err
17279 } && test -s conftest$ac_exeext &&
17280 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017281 ac_cv_lib_bsd_forkpty=yes
17282else
17283 echo "$as_me: failed program was:" >&5
17284sed 's/^/| /' conftest.$ac_ext >&5
17285
Martin v. Löwiseba40652007-08-30 20:10:57 +000017286 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017288
17289rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017290 conftest$ac_exeext conftest.$ac_ext
17291LIBS=$ac_check_lib_save_LIBS
17292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017293{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17294echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017295if test $ac_cv_lib_bsd_forkpty = yes; then
17296 cat >>confdefs.h <<\_ACEOF
17297#define HAVE_FORKPTY 1
17298_ACEOF
17299 LIBS="$LIBS -lbsd"
17300fi
17301
17302
17303fi
17304
Fred Drake8cef4cf2000-06-28 16:40:38 +000017305
17306fi
17307done
17308
Jack Jansendd19cf82001-12-06 22:36:17 +000017309
Brett Cannonaa5778d2008-03-18 04:09:00 +000017310# Stuff for expat.
17311
17312for ac_func in memmove
17313do
17314as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17315{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17316echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17317if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17318 echo $ECHO_N "(cached) $ECHO_C" >&6
17319else
17320 cat >conftest.$ac_ext <<_ACEOF
17321/* confdefs.h. */
17322_ACEOF
17323cat confdefs.h >>conftest.$ac_ext
17324cat >>conftest.$ac_ext <<_ACEOF
17325/* end confdefs.h. */
17326/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17327 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17328#define $ac_func innocuous_$ac_func
17329
17330/* System header to define __stub macros and hopefully few prototypes,
17331 which can conflict with char $ac_func (); below.
17332 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17333 <limits.h> exists even on freestanding compilers. */
17334
17335#ifdef __STDC__
17336# include <limits.h>
17337#else
17338# include <assert.h>
17339#endif
17340
17341#undef $ac_func
17342
17343/* Override any GCC internal prototype to avoid an error.
17344 Use char because int might match the return type of a GCC
17345 builtin and then its argument prototype would still apply. */
17346#ifdef __cplusplus
17347extern "C"
17348#endif
17349char $ac_func ();
17350/* The GNU C library defines this for functions which it implements
17351 to always fail with ENOSYS. Some functions are actually named
17352 something starting with __ and the normal name is an alias. */
17353#if defined __stub_$ac_func || defined __stub___$ac_func
17354choke me
17355#endif
17356
17357int
17358main ()
17359{
17360return $ac_func ();
17361 ;
17362 return 0;
17363}
17364_ACEOF
17365rm -f conftest.$ac_objext conftest$ac_exeext
17366if { (ac_try="$ac_link"
17367case "(($ac_try" in
17368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17369 *) ac_try_echo=$ac_try;;
17370esac
17371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17372 (eval "$ac_link") 2>conftest.er1
17373 ac_status=$?
17374 grep -v '^ *+' conftest.er1 >conftest.err
17375 rm -f conftest.er1
17376 cat conftest.err >&5
17377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17378 (exit $ac_status); } && {
17379 test -z "$ac_c_werror_flag" ||
17380 test ! -s conftest.err
17381 } && test -s conftest$ac_exeext &&
17382 $as_test_x conftest$ac_exeext; then
17383 eval "$as_ac_var=yes"
17384else
17385 echo "$as_me: failed program was:" >&5
17386sed 's/^/| /' conftest.$ac_ext >&5
17387
17388 eval "$as_ac_var=no"
17389fi
17390
17391rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17392 conftest$ac_exeext conftest.$ac_ext
17393fi
17394ac_res=`eval echo '${'$as_ac_var'}'`
17395 { echo "$as_me:$LINENO: result: $ac_res" >&5
17396echo "${ECHO_T}$ac_res" >&6; }
17397if test `eval echo '${'$as_ac_var'}'` = yes; then
17398 cat >>confdefs.h <<_ACEOF
17399#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17400_ACEOF
17401
17402fi
17403done
17404
17405
Michael W. Hudson54241132001-12-07 15:38:26 +000017406# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017407
17408
17409
17410
17411
17412
Fred Drake8cef4cf2000-06-28 16:40:38 +000017413for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17414do
Martin v. Löwis11437992002-04-12 09:54:03 +000017415as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017416{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17417echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17418if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017419 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017420else
Martin v. Löwis11437992002-04-12 09:54:03 +000017421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017422/* confdefs.h. */
17423_ACEOF
17424cat confdefs.h >>conftest.$ac_ext
17425cat >>conftest.$ac_ext <<_ACEOF
17426/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017427/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17428 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17429#define $ac_func innocuous_$ac_func
17430
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017431/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017432 which can conflict with char $ac_func (); below.
17433 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017434 <limits.h> exists even on freestanding compilers. */
17435
17436#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017437# include <limits.h>
17438#else
17439# include <assert.h>
17440#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017441
17442#undef $ac_func
17443
Martin v. Löwiseba40652007-08-30 20:10:57 +000017444/* Override any GCC internal prototype to avoid an error.
17445 Use char because int might match the return type of a GCC
17446 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017447#ifdef __cplusplus
17448extern "C"
17449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017450char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017451/* The GNU C library defines this for functions which it implements
17452 to always fail with ENOSYS. Some functions are actually named
17453 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017454#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017455choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017456#endif
17457
Skip Montanaro6dead952003-09-25 14:50:04 +000017458int
17459main ()
17460{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017461return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017462 ;
17463 return 0;
17464}
17465_ACEOF
17466rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017467if { (ac_try="$ac_link"
17468case "(($ac_try" in
17469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17470 *) ac_try_echo=$ac_try;;
17471esac
17472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17473 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017475 grep -v '^ *+' conftest.er1 >conftest.err
17476 rm -f conftest.er1
17477 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017479 (exit $ac_status); } && {
17480 test -z "$ac_c_werror_flag" ||
17481 test ! -s conftest.err
17482 } && test -s conftest$ac_exeext &&
17483 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017484 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017485else
Martin v. Löwis11437992002-04-12 09:54:03 +000017486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017487sed 's/^/| /' conftest.$ac_ext >&5
17488
Martin v. Löwiseba40652007-08-30 20:10:57 +000017489 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017491
17492rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017493 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017495ac_res=`eval echo '${'$as_ac_var'}'`
17496 { echo "$as_me:$LINENO: result: $ac_res" >&5
17497echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017498if test `eval echo '${'$as_ac_var'}'` = yes; then
17499 cat >>confdefs.h <<_ACEOF
17500#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17501_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017502
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017503fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017504done
17505
Michael W. Hudson54241132001-12-07 15:38:26 +000017506
Martin v. Löwis11437992002-04-12 09:54:03 +000017507
17508
17509
Brett Cannonaa5778d2008-03-18 04:09:00 +000017510for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017511do
Martin v. Löwis11437992002-04-12 09:54:03 +000017512as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017513{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17514echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17515if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017516 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017517else
Martin v. Löwis11437992002-04-12 09:54:03 +000017518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017519/* confdefs.h. */
17520_ACEOF
17521cat confdefs.h >>conftest.$ac_ext
17522cat >>conftest.$ac_ext <<_ACEOF
17523/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017524/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17525 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17526#define $ac_func innocuous_$ac_func
17527
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017528/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017529 which can conflict with char $ac_func (); below.
17530 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017531 <limits.h> exists even on freestanding compilers. */
17532
17533#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017534# include <limits.h>
17535#else
17536# include <assert.h>
17537#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017538
17539#undef $ac_func
17540
Martin v. Löwiseba40652007-08-30 20:10:57 +000017541/* Override any GCC internal prototype to avoid an error.
17542 Use char because int might match the return type of a GCC
17543 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017544#ifdef __cplusplus
17545extern "C"
17546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017547char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017548/* The GNU C library defines this for functions which it implements
17549 to always fail with ENOSYS. Some functions are actually named
17550 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017551#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017552choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017553#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017554
Skip Montanaro6dead952003-09-25 14:50:04 +000017555int
17556main ()
17557{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017558return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017559 ;
17560 return 0;
17561}
17562_ACEOF
17563rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017564if { (ac_try="$ac_link"
17565case "(($ac_try" in
17566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17567 *) ac_try_echo=$ac_try;;
17568esac
17569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17570 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017572 grep -v '^ *+' conftest.er1 >conftest.err
17573 rm -f conftest.er1
17574 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017576 (exit $ac_status); } && {
17577 test -z "$ac_c_werror_flag" ||
17578 test ! -s conftest.err
17579 } && test -s conftest$ac_exeext &&
17580 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017581 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017582else
Martin v. Löwis11437992002-04-12 09:54:03 +000017583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017584sed 's/^/| /' conftest.$ac_ext >&5
17585
Martin v. Löwiseba40652007-08-30 20:10:57 +000017586 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017588
17589rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017592ac_res=`eval echo '${'$as_ac_var'}'`
17593 { echo "$as_me:$LINENO: result: $ac_res" >&5
17594echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017595if test `eval echo '${'$as_ac_var'}'` = yes; then
17596 cat >>confdefs.h <<_ACEOF
17597#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17598_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017599
Martin v. Löwis1142de32002-03-29 16:28:31 +000017600else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017601 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017602 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017603 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17604 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017605esac
17606
Martin v. Löwis1142de32002-03-29 16:28:31 +000017607fi
17608done
17609
17610
Martin v. Löwis11437992002-04-12 09:54:03 +000017611
Martin v. Löwis1142de32002-03-29 16:28:31 +000017612for ac_func in getpgrp
17613do
Martin v. Löwis11437992002-04-12 09:54:03 +000017614as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017615{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17616echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17617if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017618 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017619else
Martin v. Löwis11437992002-04-12 09:54:03 +000017620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017621/* confdefs.h. */
17622_ACEOF
17623cat confdefs.h >>conftest.$ac_ext
17624cat >>conftest.$ac_ext <<_ACEOF
17625/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017626/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17627 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17628#define $ac_func innocuous_$ac_func
17629
Martin v. Löwis1142de32002-03-29 16:28:31 +000017630/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017631 which can conflict with char $ac_func (); below.
17632 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017633 <limits.h> exists even on freestanding compilers. */
17634
17635#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017636# include <limits.h>
17637#else
17638# include <assert.h>
17639#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017640
17641#undef $ac_func
17642
Martin v. Löwiseba40652007-08-30 20:10:57 +000017643/* Override any GCC internal prototype to avoid an error.
17644 Use char because int might match the return type of a GCC
17645 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017646#ifdef __cplusplus
17647extern "C"
17648#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017649char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017650/* The GNU C library defines this for functions which it implements
17651 to always fail with ENOSYS. Some functions are actually named
17652 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017653#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017654choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017655#endif
17656
Skip Montanaro6dead952003-09-25 14:50:04 +000017657int
17658main ()
17659{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017660return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017661 ;
17662 return 0;
17663}
17664_ACEOF
17665rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017666if { (ac_try="$ac_link"
17667case "(($ac_try" in
17668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17669 *) ac_try_echo=$ac_try;;
17670esac
17671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17672 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017674 grep -v '^ *+' conftest.er1 >conftest.err
17675 rm -f conftest.er1
17676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017678 (exit $ac_status); } && {
17679 test -z "$ac_c_werror_flag" ||
17680 test ! -s conftest.err
17681 } && test -s conftest$ac_exeext &&
17682 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017683 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017684else
Martin v. Löwis11437992002-04-12 09:54:03 +000017685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017686sed 's/^/| /' conftest.$ac_ext >&5
17687
Martin v. Löwiseba40652007-08-30 20:10:57 +000017688 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017690
17691rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017692 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017694ac_res=`eval echo '${'$as_ac_var'}'`
17695 { echo "$as_me:$LINENO: result: $ac_res" >&5
17696echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017697if test `eval echo '${'$as_ac_var'}'` = yes; then
17698 cat >>confdefs.h <<_ACEOF
17699#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17700_ACEOF
17701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017702/* confdefs.h. */
17703_ACEOF
17704cat confdefs.h >>conftest.$ac_ext
17705cat >>conftest.$ac_ext <<_ACEOF
17706/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017707#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017708int
17709main ()
17710{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017711getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017712 ;
17713 return 0;
17714}
17715_ACEOF
17716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017717if { (ac_try="$ac_compile"
17718case "(($ac_try" in
17719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17720 *) ac_try_echo=$ac_try;;
17721esac
17722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017725 grep -v '^ *+' conftest.er1 >conftest.err
17726 rm -f conftest.er1
17727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017729 (exit $ac_status); } && {
17730 test -z "$ac_c_werror_flag" ||
17731 test ! -s conftest.err
17732 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017733
17734cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017735#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017736_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017737
Martin v. Löwis11437992002-04-12 09:54:03 +000017738
Guido van Rossumf78abae1997-01-21 22:02:36 +000017739else
Martin v. Löwis11437992002-04-12 09:54:03 +000017740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017741sed 's/^/| /' conftest.$ac_ext >&5
17742
Martin v. Löwiseba40652007-08-30 20:10:57 +000017743
Guido van Rossum627b2d71993-12-24 10:39:16 +000017744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017745
17746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017747
Guido van Rossum627b2d71993-12-24 10:39:16 +000017748fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017749done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017750
Jack Jansen150753c2003-03-29 22:07:47 +000017751
17752for ac_func in setpgrp
17753do
17754as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017755{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17756echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17757if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017759else
Martin v. Löwis11437992002-04-12 09:54:03 +000017760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017761/* confdefs.h. */
17762_ACEOF
17763cat confdefs.h >>conftest.$ac_ext
17764cat >>conftest.$ac_ext <<_ACEOF
17765/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017766/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17767 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17768#define $ac_func innocuous_$ac_func
17769
Jack Jansen150753c2003-03-29 22:07:47 +000017770/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017771 which can conflict with char $ac_func (); below.
17772 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017773 <limits.h> exists even on freestanding compilers. */
17774
17775#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017776# include <limits.h>
17777#else
17778# include <assert.h>
17779#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017780
17781#undef $ac_func
17782
Martin v. Löwiseba40652007-08-30 20:10:57 +000017783/* Override any GCC internal prototype to avoid an error.
17784 Use char because int might match the return type of a GCC
17785 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017786#ifdef __cplusplus
17787extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017788#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017789char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017790/* The GNU C library defines this for functions which it implements
17791 to always fail with ENOSYS. Some functions are actually named
17792 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017793#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017794choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017795#endif
17796
Skip Montanaro6dead952003-09-25 14:50:04 +000017797int
17798main ()
17799{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017800return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017801 ;
17802 return 0;
17803}
17804_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017805rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017806if { (ac_try="$ac_link"
17807case "(($ac_try" in
17808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17809 *) ac_try_echo=$ac_try;;
17810esac
17811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17812 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017814 grep -v '^ *+' conftest.er1 >conftest.err
17815 rm -f conftest.er1
17816 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017818 (exit $ac_status); } && {
17819 test -z "$ac_c_werror_flag" ||
17820 test ! -s conftest.err
17821 } && test -s conftest$ac_exeext &&
17822 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017823 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017824else
Jack Jansen150753c2003-03-29 22:07:47 +000017825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017826sed 's/^/| /' conftest.$ac_ext >&5
17827
Martin v. Löwiseba40652007-08-30 20:10:57 +000017828 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017830
17831rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017832 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017834ac_res=`eval echo '${'$as_ac_var'}'`
17835 { echo "$as_me:$LINENO: result: $ac_res" >&5
17836echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017837if test `eval echo '${'$as_ac_var'}'` = yes; then
17838 cat >>confdefs.h <<_ACEOF
17839#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17840_ACEOF
17841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017842/* confdefs.h. */
17843_ACEOF
17844cat confdefs.h >>conftest.$ac_ext
17845cat >>conftest.$ac_ext <<_ACEOF
17846/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017847#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017848int
17849main ()
17850{
17851setpgrp(0,0);
17852 ;
17853 return 0;
17854}
17855_ACEOF
17856rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017857if { (ac_try="$ac_compile"
17858case "(($ac_try" in
17859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17860 *) ac_try_echo=$ac_try;;
17861esac
17862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17863 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017865 grep -v '^ *+' conftest.er1 >conftest.err
17866 rm -f conftest.er1
17867 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017869 (exit $ac_status); } && {
17870 test -z "$ac_c_werror_flag" ||
17871 test ! -s conftest.err
17872 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017873
17874cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017875#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017876_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017877
Jack Jansen150753c2003-03-29 22:07:47 +000017878
17879else
17880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017881sed 's/^/| /' conftest.$ac_ext >&5
17882
Martin v. Löwiseba40652007-08-30 20:10:57 +000017883
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017885
17886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017887
17888fi
17889done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017890
Martin v. Löwis11437992002-04-12 09:54:03 +000017891
Thomas Wouters3a584202000-08-05 23:28:51 +000017892for ac_func in gettimeofday
17893do
Martin v. Löwis11437992002-04-12 09:54:03 +000017894as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017895{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17896echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17897if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017899else
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017901/* confdefs.h. */
17902_ACEOF
17903cat confdefs.h >>conftest.$ac_ext
17904cat >>conftest.$ac_ext <<_ACEOF
17905/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017906/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17907 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17908#define $ac_func innocuous_$ac_func
17909
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017910/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017911 which can conflict with char $ac_func (); below.
17912 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017913 <limits.h> exists even on freestanding compilers. */
17914
17915#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017916# include <limits.h>
17917#else
17918# include <assert.h>
17919#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017920
17921#undef $ac_func
17922
Martin v. Löwiseba40652007-08-30 20:10:57 +000017923/* Override any GCC internal prototype to avoid an error.
17924 Use char because int might match the return type of a GCC
17925 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017926#ifdef __cplusplus
17927extern "C"
17928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017929char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017930/* The GNU C library defines this for functions which it implements
17931 to always fail with ENOSYS. Some functions are actually named
17932 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017933#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017934choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017935#endif
17936
Skip Montanaro6dead952003-09-25 14:50:04 +000017937int
17938main ()
17939{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017940return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017941 ;
17942 return 0;
17943}
17944_ACEOF
17945rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017946if { (ac_try="$ac_link"
17947case "(($ac_try" in
17948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17949 *) ac_try_echo=$ac_try;;
17950esac
17951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17952 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017954 grep -v '^ *+' conftest.er1 >conftest.err
17955 rm -f conftest.er1
17956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017958 (exit $ac_status); } && {
17959 test -z "$ac_c_werror_flag" ||
17960 test ! -s conftest.err
17961 } && test -s conftest$ac_exeext &&
17962 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017963 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017964else
Martin v. Löwis11437992002-04-12 09:54:03 +000017965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017966sed 's/^/| /' conftest.$ac_ext >&5
17967
Martin v. Löwiseba40652007-08-30 20:10:57 +000017968 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017970
17971rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017972 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017974ac_res=`eval echo '${'$as_ac_var'}'`
17975 { echo "$as_me:$LINENO: result: $ac_res" >&5
17976echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017977if test `eval echo '${'$as_ac_var'}'` = yes; then
17978 cat >>confdefs.h <<_ACEOF
17979#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17980_ACEOF
17981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017982/* confdefs.h. */
17983_ACEOF
17984cat confdefs.h >>conftest.$ac_ext
17985cat >>conftest.$ac_ext <<_ACEOF
17986/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017987#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017988int
17989main ()
17990{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017991gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017992 ;
17993 return 0;
17994}
17995_ACEOF
17996rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017997if { (ac_try="$ac_compile"
17998case "(($ac_try" in
17999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18000 *) ac_try_echo=$ac_try;;
18001esac
18002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18003 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018005 grep -v '^ *+' conftest.er1 >conftest.err
18006 rm -f conftest.er1
18007 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018009 (exit $ac_status); } && {
18010 test -z "$ac_c_werror_flag" ||
18011 test ! -s conftest.err
18012 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018013 :
18014else
Martin v. Löwis11437992002-04-12 09:54:03 +000018015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018016sed 's/^/| /' conftest.$ac_ext >&5
18017
Martin v. Löwis11437992002-04-12 09:54:03 +000018018
18019cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018020#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018021_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018022
Martin v. Löwis11437992002-04-12 09:54:03 +000018023
Guido van Rossum627b2d71993-12-24 10:39:16 +000018024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018025
18026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018027
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018028fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018029done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018030
Michael W. Hudson54241132001-12-07 15:38:26 +000018031
Martin v. Löwiseba40652007-08-30 20:10:57 +000018032{ echo "$as_me:$LINENO: checking for major" >&5
18033echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018035/* confdefs.h. */
18036_ACEOF
18037cat confdefs.h >>conftest.$ac_ext
18038cat >>conftest.$ac_ext <<_ACEOF
18039/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018040
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018041#if defined(MAJOR_IN_MKDEV)
18042#include <sys/mkdev.h>
18043#elif defined(MAJOR_IN_SYSMACROS)
18044#include <sys/sysmacros.h>
18045#else
18046#include <sys/types.h>
18047#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018048
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018049int
18050main ()
18051{
18052
18053 makedev(major(0),minor(0));
18054
18055 ;
18056 return 0;
18057}
18058_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018059rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018060if { (ac_try="$ac_link"
18061case "(($ac_try" in
18062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18063 *) ac_try_echo=$ac_try;;
18064esac
18065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18066 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018068 grep -v '^ *+' conftest.er1 >conftest.err
18069 rm -f conftest.er1
18070 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018072 (exit $ac_status); } && {
18073 test -z "$ac_c_werror_flag" ||
18074 test ! -s conftest.err
18075 } && test -s conftest$ac_exeext &&
18076 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018077
18078
18079cat >>confdefs.h <<\_ACEOF
18080#define HAVE_DEVICE_MACROS 1
18081_ACEOF
18082
Martin v. Löwiseba40652007-08-30 20:10:57 +000018083 { echo "$as_me:$LINENO: result: yes" >&5
18084echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018085
18086else
18087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018088sed 's/^/| /' conftest.$ac_ext >&5
18089
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018090
Martin v. Löwiseba40652007-08-30 20:10:57 +000018091 { echo "$as_me:$LINENO: result: no" >&5
18092echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018093
18094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018095
18096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018097 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018098
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018099# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018100# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018101{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18102echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018104/* confdefs.h. */
18105_ACEOF
18106cat confdefs.h >>conftest.$ac_ext
18107cat >>conftest.$ac_ext <<_ACEOF
18108/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018109
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018110#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018111#include <sys/socket.h>
18112#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018113#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018114
Martin v. Löwis11437992002-04-12 09:54:03 +000018115int
18116main ()
18117{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018118
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018119getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018120
Martin v. Löwis11437992002-04-12 09:54:03 +000018121 ;
18122 return 0;
18123}
18124_ACEOF
18125rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018126if { (ac_try="$ac_link"
18127case "(($ac_try" in
18128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18129 *) ac_try_echo=$ac_try;;
18130esac
18131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18132 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018134 grep -v '^ *+' conftest.er1 >conftest.err
18135 rm -f conftest.er1
18136 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018138 (exit $ac_status); } && {
18139 test -z "$ac_c_werror_flag" ||
18140 test ! -s conftest.err
18141 } && test -s conftest$ac_exeext &&
18142 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018143
Martin v. Löwiseba40652007-08-30 20:10:57 +000018144{ echo "$as_me:$LINENO: result: yes" >&5
18145echo "${ECHO_T}yes" >&6; }
18146{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18147echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018148if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018149 { echo "$as_me:$LINENO: result: buggy" >&5
18150echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018151buggygetaddrinfo=yes
18152else
Martin v. Löwis11437992002-04-12 09:54:03 +000018153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018154/* confdefs.h. */
18155_ACEOF
18156cat confdefs.h >>conftest.$ac_ext
18157cat >>conftest.$ac_ext <<_ACEOF
18158/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018159
18160#include <sys/types.h>
18161#include <netdb.h>
18162#include <string.h>
18163#include <sys/socket.h>
18164#include <netinet/in.h>
18165
18166main()
18167{
18168 int passive, gaierr, inet4 = 0, inet6 = 0;
18169 struct addrinfo hints, *ai, *aitop;
18170 char straddr[INET6_ADDRSTRLEN], strport[16];
18171
18172 for (passive = 0; passive <= 1; passive++) {
18173 memset(&hints, 0, sizeof(hints));
18174 hints.ai_family = AF_UNSPEC;
18175 hints.ai_flags = passive ? AI_PASSIVE : 0;
18176 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018177 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018178 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18179 (void)gai_strerror(gaierr);
18180 goto bad;
18181 }
18182 for (ai = aitop; ai; ai = ai->ai_next) {
18183 if (ai->ai_addr == NULL ||
18184 ai->ai_addrlen == 0 ||
18185 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18186 straddr, sizeof(straddr), strport, sizeof(strport),
18187 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18188 goto bad;
18189 }
18190 switch (ai->ai_family) {
18191 case AF_INET:
18192 if (strcmp(strport, "54321") != 0) {
18193 goto bad;
18194 }
18195 if (passive) {
18196 if (strcmp(straddr, "0.0.0.0") != 0) {
18197 goto bad;
18198 }
18199 } else {
18200 if (strcmp(straddr, "127.0.0.1") != 0) {
18201 goto bad;
18202 }
18203 }
18204 inet4++;
18205 break;
18206 case AF_INET6:
18207 if (strcmp(strport, "54321") != 0) {
18208 goto bad;
18209 }
18210 if (passive) {
18211 if (strcmp(straddr, "::") != 0) {
18212 goto bad;
18213 }
18214 } else {
18215 if (strcmp(straddr, "::1") != 0) {
18216 goto bad;
18217 }
18218 }
18219 inet6++;
18220 break;
18221 case AF_UNSPEC:
18222 goto bad;
18223 break;
18224 default:
18225 /* another family support? */
18226 break;
18227 }
18228 }
18229 }
18230
18231 if (!(inet4 == 0 || inet4 == 2))
18232 goto bad;
18233 if (!(inet6 == 0 || inet6 == 2))
18234 goto bad;
18235
18236 if (aitop)
18237 freeaddrinfo(aitop);
18238 exit(0);
18239
18240 bad:
18241 if (aitop)
18242 freeaddrinfo(aitop);
18243 exit(1);
18244}
18245
Martin v. Löwis11437992002-04-12 09:54:03 +000018246_ACEOF
18247rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018248if { (ac_try="$ac_link"
18249case "(($ac_try" in
18250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18251 *) ac_try_echo=$ac_try;;
18252esac
18253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18254 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018255 ac_status=$?
18256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18257 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018258 { (case "(($ac_try" in
18259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18260 *) ac_try_echo=$ac_try;;
18261esac
18262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18263 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018264 ac_status=$?
18265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18266 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018267 { echo "$as_me:$LINENO: result: good" >&5
18268echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018269buggygetaddrinfo=no
18270else
Martin v. Löwis11437992002-04-12 09:54:03 +000018271 echo "$as_me: program exited with status $ac_status" >&5
18272echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018273sed 's/^/| /' conftest.$ac_ext >&5
18274
Martin v. Löwis11437992002-04-12 09:54:03 +000018275( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018276{ echo "$as_me:$LINENO: result: buggy" >&5
18277echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018278buggygetaddrinfo=yes
18279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018280rm -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 +000018281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018282
18283
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018284else
Martin v. Löwis11437992002-04-12 09:54:03 +000018285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018286sed 's/^/| /' conftest.$ac_ext >&5
18287
Martin v. Löwis11437992002-04-12 09:54:03 +000018288
Martin v. Löwiseba40652007-08-30 20:10:57 +000018289{ echo "$as_me:$LINENO: result: no" >&5
18290echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018291buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018292
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018294
18295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018296 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018297
18298if test "$buggygetaddrinfo" = "yes"; then
18299 if test "$ipv6" = "yes"; then
18300 echo 'Fatal: You must get working getaddrinfo() function.'
18301 echo ' or you can specify "--disable-ipv6"'.
18302 exit 1
18303 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018304else
Martin v. Löwis11437992002-04-12 09:54:03 +000018305
18306cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018307#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018308_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018309
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018310fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018311
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018312for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018313do
Martin v. Löwis11437992002-04-12 09:54:03 +000018314as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018315{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18316echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18317if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018319else
Martin v. Löwis11437992002-04-12 09:54:03 +000018320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018321/* confdefs.h. */
18322_ACEOF
18323cat confdefs.h >>conftest.$ac_ext
18324cat >>conftest.$ac_ext <<_ACEOF
18325/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018326/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18327 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18328#define $ac_func innocuous_$ac_func
18329
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018330/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018331 which can conflict with char $ac_func (); below.
18332 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018333 <limits.h> exists even on freestanding compilers. */
18334
18335#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018336# include <limits.h>
18337#else
18338# include <assert.h>
18339#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018340
18341#undef $ac_func
18342
Martin v. Löwiseba40652007-08-30 20:10:57 +000018343/* Override any GCC internal prototype to avoid an error.
18344 Use char because int might match the return type of a GCC
18345 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018346#ifdef __cplusplus
18347extern "C"
18348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018349char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018350/* The GNU C library defines this for functions which it implements
18351 to always fail with ENOSYS. Some functions are actually named
18352 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018353#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018354choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018355#endif
18356
Skip Montanaro6dead952003-09-25 14:50:04 +000018357int
18358main ()
18359{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018360return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018361 ;
18362 return 0;
18363}
18364_ACEOF
18365rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018366if { (ac_try="$ac_link"
18367case "(($ac_try" in
18368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18369 *) ac_try_echo=$ac_try;;
18370esac
18371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18372 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018374 grep -v '^ *+' conftest.er1 >conftest.err
18375 rm -f conftest.er1
18376 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018378 (exit $ac_status); } && {
18379 test -z "$ac_c_werror_flag" ||
18380 test ! -s conftest.err
18381 } && test -s conftest$ac_exeext &&
18382 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018383 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018384else
Martin v. Löwis11437992002-04-12 09:54:03 +000018385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018386sed 's/^/| /' conftest.$ac_ext >&5
18387
Martin v. Löwiseba40652007-08-30 20:10:57 +000018388 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018390
18391rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018392 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018394ac_res=`eval echo '${'$as_ac_var'}'`
18395 { echo "$as_me:$LINENO: result: $ac_res" >&5
18396echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018397if test `eval echo '${'$as_ac_var'}'` = yes; then
18398 cat >>confdefs.h <<_ACEOF
18399#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18400_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018401
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018402fi
18403done
18404
Michael W. Hudson54241132001-12-07 15:38:26 +000018405
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018406# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018407{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18408echo $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 +000018409if test "${ac_cv_header_time+set}" = set; then
18410 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018411else
Martin v. Löwis11437992002-04-12 09:54:03 +000018412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018413/* confdefs.h. */
18414_ACEOF
18415cat confdefs.h >>conftest.$ac_ext
18416cat >>conftest.$ac_ext <<_ACEOF
18417/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018418#include <sys/types.h>
18419#include <sys/time.h>
18420#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018421
Martin v. Löwis11437992002-04-12 09:54:03 +000018422int
18423main ()
18424{
18425if ((struct tm *) 0)
18426return 0;
18427 ;
18428 return 0;
18429}
18430_ACEOF
18431rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018432if { (ac_try="$ac_compile"
18433case "(($ac_try" in
18434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18435 *) ac_try_echo=$ac_try;;
18436esac
18437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018440 grep -v '^ *+' conftest.er1 >conftest.err
18441 rm -f conftest.er1
18442 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018444 (exit $ac_status); } && {
18445 test -z "$ac_c_werror_flag" ||
18446 test ! -s conftest.err
18447 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018448 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018449else
Martin v. Löwis11437992002-04-12 09:54:03 +000018450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018451sed 's/^/| /' conftest.$ac_ext >&5
18452
Martin v. Löwiseba40652007-08-30 20:10:57 +000018453 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018455
18456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018458{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18459echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018460if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018461
18462cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018463#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018464_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018465
18466fi
18467
Martin v. Löwiseba40652007-08-30 20:10:57 +000018468{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18469echo $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 +000018470if test "${ac_cv_struct_tm+set}" = set; then
18471 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018472else
Martin v. Löwis11437992002-04-12 09:54:03 +000018473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018474/* confdefs.h. */
18475_ACEOF
18476cat confdefs.h >>conftest.$ac_ext
18477cat >>conftest.$ac_ext <<_ACEOF
18478/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018479#include <sys/types.h>
18480#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018481
Martin v. Löwis11437992002-04-12 09:54:03 +000018482int
18483main ()
18484{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018485struct tm tm;
18486 int *p = &tm.tm_sec;
18487 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018488 ;
18489 return 0;
18490}
18491_ACEOF
18492rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018493if { (ac_try="$ac_compile"
18494case "(($ac_try" in
18495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18496 *) ac_try_echo=$ac_try;;
18497esac
18498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18499 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018501 grep -v '^ *+' conftest.er1 >conftest.err
18502 rm -f conftest.er1
18503 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018505 (exit $ac_status); } && {
18506 test -z "$ac_c_werror_flag" ||
18507 test ! -s conftest.err
18508 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018509 ac_cv_struct_tm=time.h
18510else
Martin v. Löwis11437992002-04-12 09:54:03 +000018511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018512sed 's/^/| /' conftest.$ac_ext >&5
18513
Martin v. Löwiseba40652007-08-30 20:10:57 +000018514 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018516
18517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018519{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18520echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018521if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018522
18523cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018524#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018525_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018526
18527fi
18528
Martin v. Löwiseba40652007-08-30 20:10:57 +000018529{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18530echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018531if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18532 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018533else
Martin v. Löwis11437992002-04-12 09:54:03 +000018534 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018535/* confdefs.h. */
18536_ACEOF
18537cat confdefs.h >>conftest.$ac_ext
18538cat >>conftest.$ac_ext <<_ACEOF
18539/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018540#include <sys/types.h>
18541#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018542
18543
Martin v. Löwis11437992002-04-12 09:54:03 +000018544int
18545main ()
18546{
18547static struct tm ac_aggr;
18548if (ac_aggr.tm_zone)
18549return 0;
18550 ;
18551 return 0;
18552}
18553_ACEOF
18554rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018555if { (ac_try="$ac_compile"
18556case "(($ac_try" in
18557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18558 *) ac_try_echo=$ac_try;;
18559esac
18560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18561 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018563 grep -v '^ *+' conftest.er1 >conftest.err
18564 rm -f conftest.er1
18565 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018567 (exit $ac_status); } && {
18568 test -z "$ac_c_werror_flag" ||
18569 test ! -s conftest.err
18570 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018571 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018572else
Martin v. Löwis11437992002-04-12 09:54:03 +000018573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018574sed 's/^/| /' conftest.$ac_ext >&5
18575
Martin v. Löwiseba40652007-08-30 20:10:57 +000018576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018577/* confdefs.h. */
18578_ACEOF
18579cat confdefs.h >>conftest.$ac_ext
18580cat >>conftest.$ac_ext <<_ACEOF
18581/* end confdefs.h. */
18582#include <sys/types.h>
18583#include <$ac_cv_struct_tm>
18584
18585
18586int
18587main ()
18588{
18589static struct tm ac_aggr;
18590if (sizeof ac_aggr.tm_zone)
18591return 0;
18592 ;
18593 return 0;
18594}
18595_ACEOF
18596rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018597if { (ac_try="$ac_compile"
18598case "(($ac_try" in
18599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18600 *) ac_try_echo=$ac_try;;
18601esac
18602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18603 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018605 grep -v '^ *+' conftest.er1 >conftest.err
18606 rm -f conftest.er1
18607 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018609 (exit $ac_status); } && {
18610 test -z "$ac_c_werror_flag" ||
18611 test ! -s conftest.err
18612 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018613 ac_cv_member_struct_tm_tm_zone=yes
18614else
18615 echo "$as_me: failed program was:" >&5
18616sed 's/^/| /' conftest.$ac_ext >&5
18617
Martin v. Löwiseba40652007-08-30 20:10:57 +000018618 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018619fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018620
18621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018623
18624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018626{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18627echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018628if test $ac_cv_member_struct_tm_tm_zone = yes; then
18629
18630cat >>confdefs.h <<_ACEOF
18631#define HAVE_STRUCT_TM_TM_ZONE 1
18632_ACEOF
18633
18634
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018635fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018636
Martin v. Löwis11437992002-04-12 09:54:03 +000018637if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18638
18639cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018640#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018641_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018642
18643else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018644 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18645echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18646if test "${ac_cv_have_decl_tzname+set}" = set; then
18647 echo $ECHO_N "(cached) $ECHO_C" >&6
18648else
18649 cat >conftest.$ac_ext <<_ACEOF
18650/* confdefs.h. */
18651_ACEOF
18652cat confdefs.h >>conftest.$ac_ext
18653cat >>conftest.$ac_ext <<_ACEOF
18654/* end confdefs.h. */
18655#include <time.h>
18656
18657int
18658main ()
18659{
18660#ifndef tzname
18661 (void) tzname;
18662#endif
18663
18664 ;
18665 return 0;
18666}
18667_ACEOF
18668rm -f conftest.$ac_objext
18669if { (ac_try="$ac_compile"
18670case "(($ac_try" in
18671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18672 *) ac_try_echo=$ac_try;;
18673esac
18674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18675 (eval "$ac_compile") 2>conftest.er1
18676 ac_status=$?
18677 grep -v '^ *+' conftest.er1 >conftest.err
18678 rm -f conftest.er1
18679 cat conftest.err >&5
18680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18681 (exit $ac_status); } && {
18682 test -z "$ac_c_werror_flag" ||
18683 test ! -s conftest.err
18684 } && test -s conftest.$ac_objext; then
18685 ac_cv_have_decl_tzname=yes
18686else
18687 echo "$as_me: failed program was:" >&5
18688sed 's/^/| /' conftest.$ac_ext >&5
18689
18690 ac_cv_have_decl_tzname=no
18691fi
18692
18693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18694fi
18695{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18696echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18697if test $ac_cv_have_decl_tzname = yes; then
18698
18699cat >>confdefs.h <<_ACEOF
18700#define HAVE_DECL_TZNAME 1
18701_ACEOF
18702
18703
18704else
18705 cat >>confdefs.h <<_ACEOF
18706#define HAVE_DECL_TZNAME 0
18707_ACEOF
18708
18709
18710fi
18711
18712
18713 { echo "$as_me:$LINENO: checking for tzname" >&5
18714echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018715if test "${ac_cv_var_tzname+set}" = set; then
18716 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018717else
Martin v. Löwis11437992002-04-12 09:54:03 +000018718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018719/* confdefs.h. */
18720_ACEOF
18721cat confdefs.h >>conftest.$ac_ext
18722cat >>conftest.$ac_ext <<_ACEOF
18723/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018724#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018725#if !HAVE_DECL_TZNAME
18726extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018728
Martin v. Löwis11437992002-04-12 09:54:03 +000018729int
18730main ()
18731{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018732return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018733 ;
18734 return 0;
18735}
18736_ACEOF
18737rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018738if { (ac_try="$ac_link"
18739case "(($ac_try" in
18740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18741 *) ac_try_echo=$ac_try;;
18742esac
18743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18744 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018746 grep -v '^ *+' conftest.er1 >conftest.err
18747 rm -f conftest.er1
18748 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018750 (exit $ac_status); } && {
18751 test -z "$ac_c_werror_flag" ||
18752 test ! -s conftest.err
18753 } && test -s conftest$ac_exeext &&
18754 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018755 ac_cv_var_tzname=yes
18756else
Martin v. Löwis11437992002-04-12 09:54:03 +000018757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018758sed 's/^/| /' conftest.$ac_ext >&5
18759
Martin v. Löwiseba40652007-08-30 20:10:57 +000018760 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018762
18763rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018764 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018766{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18767echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018768 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018769
18770cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018771#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018772_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018773
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018774 fi
18775fi
18776
Martin v. Löwiseba40652007-08-30 20:10:57 +000018777{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18778echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018779if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18780 echo $ECHO_N "(cached) $ECHO_C" >&6
18781else
18782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018783/* confdefs.h. */
18784_ACEOF
18785cat confdefs.h >>conftest.$ac_ext
18786cat >>conftest.$ac_ext <<_ACEOF
18787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018788$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018789int
18790main ()
18791{
18792static struct stat ac_aggr;
18793if (ac_aggr.st_rdev)
18794return 0;
18795 ;
18796 return 0;
18797}
18798_ACEOF
18799rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018800if { (ac_try="$ac_compile"
18801case "(($ac_try" in
18802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18803 *) ac_try_echo=$ac_try;;
18804esac
18805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018808 grep -v '^ *+' conftest.er1 >conftest.err
18809 rm -f conftest.er1
18810 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018812 (exit $ac_status); } && {
18813 test -z "$ac_c_werror_flag" ||
18814 test ! -s conftest.err
18815 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018816 ac_cv_member_struct_stat_st_rdev=yes
18817else
18818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018819sed 's/^/| /' conftest.$ac_ext >&5
18820
Martin v. Löwiseba40652007-08-30 20:10:57 +000018821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018822/* confdefs.h. */
18823_ACEOF
18824cat confdefs.h >>conftest.$ac_ext
18825cat >>conftest.$ac_ext <<_ACEOF
18826/* end confdefs.h. */
18827$ac_includes_default
18828int
18829main ()
18830{
18831static struct stat ac_aggr;
18832if (sizeof ac_aggr.st_rdev)
18833return 0;
18834 ;
18835 return 0;
18836}
18837_ACEOF
18838rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018839if { (ac_try="$ac_compile"
18840case "(($ac_try" in
18841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18842 *) ac_try_echo=$ac_try;;
18843esac
18844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18845 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018847 grep -v '^ *+' conftest.er1 >conftest.err
18848 rm -f conftest.er1
18849 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018851 (exit $ac_status); } && {
18852 test -z "$ac_c_werror_flag" ||
18853 test ! -s conftest.err
18854 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018855 ac_cv_member_struct_stat_st_rdev=yes
18856else
18857 echo "$as_me: failed program was:" >&5
18858sed 's/^/| /' conftest.$ac_ext >&5
18859
Martin v. Löwiseba40652007-08-30 20:10:57 +000018860 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018862
18863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018865
18866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018868{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18869echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018870if test $ac_cv_member_struct_stat_st_rdev = yes; then
18871
18872cat >>confdefs.h <<_ACEOF
18873#define HAVE_STRUCT_STAT_ST_RDEV 1
18874_ACEOF
18875
18876
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018877fi
18878
Martin v. Löwiseba40652007-08-30 20:10:57 +000018879{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18880echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018881if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18882 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018883else
Martin v. Löwis11437992002-04-12 09:54:03 +000018884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018885/* confdefs.h. */
18886_ACEOF
18887cat confdefs.h >>conftest.$ac_ext
18888cat >>conftest.$ac_ext <<_ACEOF
18889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018890$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018891int
18892main ()
18893{
18894static struct stat ac_aggr;
18895if (ac_aggr.st_blksize)
18896return 0;
18897 ;
18898 return 0;
18899}
18900_ACEOF
18901rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018902if { (ac_try="$ac_compile"
18903case "(($ac_try" in
18904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18905 *) ac_try_echo=$ac_try;;
18906esac
18907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18908 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018910 grep -v '^ *+' conftest.er1 >conftest.err
18911 rm -f conftest.er1
18912 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018914 (exit $ac_status); } && {
18915 test -z "$ac_c_werror_flag" ||
18916 test ! -s conftest.err
18917 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018918 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018919else
Martin v. Löwis11437992002-04-12 09:54:03 +000018920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018921sed 's/^/| /' conftest.$ac_ext >&5
18922
Martin v. Löwiseba40652007-08-30 20:10:57 +000018923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018924/* confdefs.h. */
18925_ACEOF
18926cat confdefs.h >>conftest.$ac_ext
18927cat >>conftest.$ac_ext <<_ACEOF
18928/* end confdefs.h. */
18929$ac_includes_default
18930int
18931main ()
18932{
18933static struct stat ac_aggr;
18934if (sizeof ac_aggr.st_blksize)
18935return 0;
18936 ;
18937 return 0;
18938}
18939_ACEOF
18940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018941if { (ac_try="$ac_compile"
18942case "(($ac_try" in
18943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18944 *) ac_try_echo=$ac_try;;
18945esac
18946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18947 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018949 grep -v '^ *+' conftest.er1 >conftest.err
18950 rm -f conftest.er1
18951 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018953 (exit $ac_status); } && {
18954 test -z "$ac_c_werror_flag" ||
18955 test ! -s conftest.err
18956 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018957 ac_cv_member_struct_stat_st_blksize=yes
18958else
18959 echo "$as_me: failed program was:" >&5
18960sed 's/^/| /' conftest.$ac_ext >&5
18961
Martin v. Löwiseba40652007-08-30 20:10:57 +000018962 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018964
18965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018967
18968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018970{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18971echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018972if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018973
Martin v. Löwis11437992002-04-12 09:54:03 +000018974cat >>confdefs.h <<_ACEOF
18975#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18976_ACEOF
18977
18978
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018979fi
18980
Martin v. Löwiseba40652007-08-30 20:10:57 +000018981{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
18982echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018983if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
18984 echo $ECHO_N "(cached) $ECHO_C" >&6
18985else
18986 cat >conftest.$ac_ext <<_ACEOF
18987/* confdefs.h. */
18988_ACEOF
18989cat confdefs.h >>conftest.$ac_ext
18990cat >>conftest.$ac_ext <<_ACEOF
18991/* end confdefs.h. */
18992$ac_includes_default
18993int
18994main ()
18995{
18996static struct stat ac_aggr;
18997if (ac_aggr.st_flags)
18998return 0;
18999 ;
19000 return 0;
19001}
19002_ACEOF
19003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019004if { (ac_try="$ac_compile"
19005case "(($ac_try" in
19006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19007 *) ac_try_echo=$ac_try;;
19008esac
19009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19010 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019011 ac_status=$?
19012 grep -v '^ *+' conftest.er1 >conftest.err
19013 rm -f conftest.er1
19014 cat conftest.err >&5
19015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019016 (exit $ac_status); } && {
19017 test -z "$ac_c_werror_flag" ||
19018 test ! -s conftest.err
19019 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019020 ac_cv_member_struct_stat_st_flags=yes
19021else
19022 echo "$as_me: failed program was:" >&5
19023sed 's/^/| /' conftest.$ac_ext >&5
19024
Martin v. Löwiseba40652007-08-30 20:10:57 +000019025 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019026/* confdefs.h. */
19027_ACEOF
19028cat confdefs.h >>conftest.$ac_ext
19029cat >>conftest.$ac_ext <<_ACEOF
19030/* end confdefs.h. */
19031$ac_includes_default
19032int
19033main ()
19034{
19035static struct stat ac_aggr;
19036if (sizeof ac_aggr.st_flags)
19037return 0;
19038 ;
19039 return 0;
19040}
19041_ACEOF
19042rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019043if { (ac_try="$ac_compile"
19044case "(($ac_try" in
19045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19046 *) ac_try_echo=$ac_try;;
19047esac
19048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19049 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019050 ac_status=$?
19051 grep -v '^ *+' conftest.er1 >conftest.err
19052 rm -f conftest.er1
19053 cat conftest.err >&5
19054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019055 (exit $ac_status); } && {
19056 test -z "$ac_c_werror_flag" ||
19057 test ! -s conftest.err
19058 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019059 ac_cv_member_struct_stat_st_flags=yes
19060else
19061 echo "$as_me: failed program was:" >&5
19062sed 's/^/| /' conftest.$ac_ext >&5
19063
Martin v. Löwiseba40652007-08-30 20:10:57 +000019064 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019066
19067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019069
19070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019072{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19073echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019074if test $ac_cv_member_struct_stat_st_flags = yes; then
19075
19076cat >>confdefs.h <<_ACEOF
19077#define HAVE_STRUCT_STAT_ST_FLAGS 1
19078_ACEOF
19079
19080
19081fi
19082
Martin v. Löwiseba40652007-08-30 20:10:57 +000019083{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19084echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019085if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19086 echo $ECHO_N "(cached) $ECHO_C" >&6
19087else
19088 cat >conftest.$ac_ext <<_ACEOF
19089/* confdefs.h. */
19090_ACEOF
19091cat confdefs.h >>conftest.$ac_ext
19092cat >>conftest.$ac_ext <<_ACEOF
19093/* end confdefs.h. */
19094$ac_includes_default
19095int
19096main ()
19097{
19098static struct stat ac_aggr;
19099if (ac_aggr.st_gen)
19100return 0;
19101 ;
19102 return 0;
19103}
19104_ACEOF
19105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019106if { (ac_try="$ac_compile"
19107case "(($ac_try" in
19108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19109 *) ac_try_echo=$ac_try;;
19110esac
19111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019113 ac_status=$?
19114 grep -v '^ *+' conftest.er1 >conftest.err
19115 rm -f conftest.er1
19116 cat conftest.err >&5
19117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019118 (exit $ac_status); } && {
19119 test -z "$ac_c_werror_flag" ||
19120 test ! -s conftest.err
19121 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019122 ac_cv_member_struct_stat_st_gen=yes
19123else
19124 echo "$as_me: failed program was:" >&5
19125sed 's/^/| /' conftest.$ac_ext >&5
19126
Martin v. Löwiseba40652007-08-30 20:10:57 +000019127 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019128/* confdefs.h. */
19129_ACEOF
19130cat confdefs.h >>conftest.$ac_ext
19131cat >>conftest.$ac_ext <<_ACEOF
19132/* end confdefs.h. */
19133$ac_includes_default
19134int
19135main ()
19136{
19137static struct stat ac_aggr;
19138if (sizeof ac_aggr.st_gen)
19139return 0;
19140 ;
19141 return 0;
19142}
19143_ACEOF
19144rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019145if { (ac_try="$ac_compile"
19146case "(($ac_try" in
19147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19148 *) ac_try_echo=$ac_try;;
19149esac
19150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019152 ac_status=$?
19153 grep -v '^ *+' conftest.er1 >conftest.err
19154 rm -f conftest.er1
19155 cat conftest.err >&5
19156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019157 (exit $ac_status); } && {
19158 test -z "$ac_c_werror_flag" ||
19159 test ! -s conftest.err
19160 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019161 ac_cv_member_struct_stat_st_gen=yes
19162else
19163 echo "$as_me: failed program was:" >&5
19164sed 's/^/| /' conftest.$ac_ext >&5
19165
Martin v. Löwiseba40652007-08-30 20:10:57 +000019166 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019168
19169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019171
19172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019174{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19175echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019176if test $ac_cv_member_struct_stat_st_gen = yes; then
19177
19178cat >>confdefs.h <<_ACEOF
19179#define HAVE_STRUCT_STAT_ST_GEN 1
19180_ACEOF
19181
19182
19183fi
19184
Martin v. Löwiseba40652007-08-30 20:10:57 +000019185{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19186echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019187if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19188 echo $ECHO_N "(cached) $ECHO_C" >&6
19189else
19190 cat >conftest.$ac_ext <<_ACEOF
19191/* confdefs.h. */
19192_ACEOF
19193cat confdefs.h >>conftest.$ac_ext
19194cat >>conftest.$ac_ext <<_ACEOF
19195/* end confdefs.h. */
19196$ac_includes_default
19197int
19198main ()
19199{
19200static struct stat ac_aggr;
19201if (ac_aggr.st_birthtime)
19202return 0;
19203 ;
19204 return 0;
19205}
19206_ACEOF
19207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019208if { (ac_try="$ac_compile"
19209case "(($ac_try" in
19210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19211 *) ac_try_echo=$ac_try;;
19212esac
19213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019215 ac_status=$?
19216 grep -v '^ *+' conftest.er1 >conftest.err
19217 rm -f conftest.er1
19218 cat conftest.err >&5
19219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019220 (exit $ac_status); } && {
19221 test -z "$ac_c_werror_flag" ||
19222 test ! -s conftest.err
19223 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019224 ac_cv_member_struct_stat_st_birthtime=yes
19225else
19226 echo "$as_me: failed program was:" >&5
19227sed 's/^/| /' conftest.$ac_ext >&5
19228
Martin v. Löwiseba40652007-08-30 20:10:57 +000019229 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019230/* confdefs.h. */
19231_ACEOF
19232cat confdefs.h >>conftest.$ac_ext
19233cat >>conftest.$ac_ext <<_ACEOF
19234/* end confdefs.h. */
19235$ac_includes_default
19236int
19237main ()
19238{
19239static struct stat ac_aggr;
19240if (sizeof ac_aggr.st_birthtime)
19241return 0;
19242 ;
19243 return 0;
19244}
19245_ACEOF
19246rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019247if { (ac_try="$ac_compile"
19248case "(($ac_try" in
19249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19250 *) ac_try_echo=$ac_try;;
19251esac
19252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19253 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019254 ac_status=$?
19255 grep -v '^ *+' conftest.er1 >conftest.err
19256 rm -f conftest.er1
19257 cat conftest.err >&5
19258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019259 (exit $ac_status); } && {
19260 test -z "$ac_c_werror_flag" ||
19261 test ! -s conftest.err
19262 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019263 ac_cv_member_struct_stat_st_birthtime=yes
19264else
19265 echo "$as_me: failed program was:" >&5
19266sed 's/^/| /' conftest.$ac_ext >&5
19267
Martin v. Löwiseba40652007-08-30 20:10:57 +000019268 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019270
19271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019273
19274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019276{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19277echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019278if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19279
19280cat >>confdefs.h <<_ACEOF
19281#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19282_ACEOF
19283
19284
19285fi
19286
Martin v. Löwiseba40652007-08-30 20:10:57 +000019287{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19288echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019289if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19290 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019291else
Martin v. Löwis11437992002-04-12 09:54:03 +000019292 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019293/* confdefs.h. */
19294_ACEOF
19295cat confdefs.h >>conftest.$ac_ext
19296cat >>conftest.$ac_ext <<_ACEOF
19297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019298$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019299int
19300main ()
19301{
19302static struct stat ac_aggr;
19303if (ac_aggr.st_blocks)
19304return 0;
19305 ;
19306 return 0;
19307}
19308_ACEOF
19309rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019310if { (ac_try="$ac_compile"
19311case "(($ac_try" in
19312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19313 *) ac_try_echo=$ac_try;;
19314esac
19315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019318 grep -v '^ *+' conftest.er1 >conftest.err
19319 rm -f conftest.er1
19320 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019322 (exit $ac_status); } && {
19323 test -z "$ac_c_werror_flag" ||
19324 test ! -s conftest.err
19325 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019326 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019327else
Martin v. Löwis11437992002-04-12 09:54:03 +000019328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019329sed 's/^/| /' conftest.$ac_ext >&5
19330
Martin v. Löwiseba40652007-08-30 20:10:57 +000019331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019332/* confdefs.h. */
19333_ACEOF
19334cat confdefs.h >>conftest.$ac_ext
19335cat >>conftest.$ac_ext <<_ACEOF
19336/* end confdefs.h. */
19337$ac_includes_default
19338int
19339main ()
19340{
19341static struct stat ac_aggr;
19342if (sizeof ac_aggr.st_blocks)
19343return 0;
19344 ;
19345 return 0;
19346}
19347_ACEOF
19348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019349if { (ac_try="$ac_compile"
19350case "(($ac_try" in
19351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19352 *) ac_try_echo=$ac_try;;
19353esac
19354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19355 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019357 grep -v '^ *+' conftest.er1 >conftest.err
19358 rm -f conftest.er1
19359 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019361 (exit $ac_status); } && {
19362 test -z "$ac_c_werror_flag" ||
19363 test ! -s conftest.err
19364 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019365 ac_cv_member_struct_stat_st_blocks=yes
19366else
19367 echo "$as_me: failed program was:" >&5
19368sed 's/^/| /' conftest.$ac_ext >&5
19369
Martin v. Löwiseba40652007-08-30 20:10:57 +000019370 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019372
19373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019375
19376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019378{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19379echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019380if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019381
Martin v. Löwis11437992002-04-12 09:54:03 +000019382cat >>confdefs.h <<_ACEOF
19383#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19384_ACEOF
19385
19386
19387cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019388#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019389_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019390
19391else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019392 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019393 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019394 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19395 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019396esac
19397
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019398fi
19399
Michael W. Hudson54241132001-12-07 15:38:26 +000019400
Martin v. Löwis11437992002-04-12 09:54:03 +000019401
Martin v. Löwiseba40652007-08-30 20:10:57 +000019402{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19403echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019404if test "${ac_cv_header_time_altzone+set}" = set; then
19405 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019406else
Martin v. Löwis11437992002-04-12 09:54:03 +000019407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019408/* confdefs.h. */
19409_ACEOF
19410cat confdefs.h >>conftest.$ac_ext
19411cat >>conftest.$ac_ext <<_ACEOF
19412/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019413#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019414int
19415main ()
19416{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019417return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019418 ;
19419 return 0;
19420}
19421_ACEOF
19422rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019423if { (ac_try="$ac_compile"
19424case "(($ac_try" in
19425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19426 *) ac_try_echo=$ac_try;;
19427esac
19428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019431 grep -v '^ *+' conftest.er1 >conftest.err
19432 rm -f conftest.er1
19433 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019435 (exit $ac_status); } && {
19436 test -z "$ac_c_werror_flag" ||
19437 test ! -s conftest.err
19438 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019439 ac_cv_header_time_altzone=yes
19440else
Martin v. Löwis11437992002-04-12 09:54:03 +000019441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019442sed 's/^/| /' conftest.$ac_ext >&5
19443
Martin v. Löwiseba40652007-08-30 20:10:57 +000019444 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019445fi
19446
Martin v. Löwiseba40652007-08-30 20:10:57 +000019447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19448fi
19449
19450{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19451echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019452if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019453
19454cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019455#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019456_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019457
19458fi
19459
Guido van Rossumda88dad1995-01-26 00:46:29 +000019460was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019461{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19462echo $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 +000019463cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019464/* confdefs.h. */
19465_ACEOF
19466cat confdefs.h >>conftest.$ac_ext
19467cat >>conftest.$ac_ext <<_ACEOF
19468/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019469
19470#include <sys/types.h>
19471#include <sys/select.h>
19472#include <sys/time.h>
19473
Martin v. Löwis11437992002-04-12 09:54:03 +000019474int
19475main ()
19476{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019477;
Martin v. Löwis11437992002-04-12 09:54:03 +000019478 ;
19479 return 0;
19480}
19481_ACEOF
19482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019483if { (ac_try="$ac_compile"
19484case "(($ac_try" in
19485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19486 *) ac_try_echo=$ac_try;;
19487esac
19488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019491 grep -v '^ *+' conftest.er1 >conftest.err
19492 rm -f conftest.er1
19493 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019495 (exit $ac_status); } && {
19496 test -z "$ac_c_werror_flag" ||
19497 test ! -s conftest.err
19498 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019499
19500
19501cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019502#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019503_ACEOF
19504
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019505 was_it_defined=yes
19506
Guido van Rossumf78abae1997-01-21 22:02:36 +000019507else
Martin v. Löwis11437992002-04-12 09:54:03 +000019508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019509sed 's/^/| /' conftest.$ac_ext >&5
19510
Brett Cannon19fab762007-06-02 03:02:29 +000019511
Martin v. Löwiseba40652007-08-30 20:10:57 +000019512fi
19513
19514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19515{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19516echo "${ECHO_T}$was_it_defined" >&6; }
19517
19518{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19519echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019520if test "${ac_cv_struct_addrinfo+set}" = set; then
19521 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019522else
Martin v. Löwis11437992002-04-12 09:54:03 +000019523 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019524/* confdefs.h. */
19525_ACEOF
19526cat confdefs.h >>conftest.$ac_ext
19527cat >>conftest.$ac_ext <<_ACEOF
19528/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019529
19530# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019531int
19532main ()
19533{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019534struct addrinfo a
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öwis01dfdb32001-06-23 16:30:13 +000019556 ac_cv_struct_addrinfo=yes
19557else
Martin v. Löwis11437992002-04-12 09:54:03 +000019558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019559sed 's/^/| /' conftest.$ac_ext >&5
19560
Martin v. Löwiseba40652007-08-30 20:10:57 +000019561 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019562fi
19563
Martin v. Löwiseba40652007-08-30 20:10:57 +000019564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19565fi
19566
19567{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19568echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019569if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019570
19571cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019572#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019573_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019574
19575fi
19576
Martin v. Löwiseba40652007-08-30 20:10:57 +000019577{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19578echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019579if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19580 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019581else
Martin v. Löwis11437992002-04-12 09:54:03 +000019582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019583/* confdefs.h. */
19584_ACEOF
19585cat confdefs.h >>conftest.$ac_ext
19586cat >>conftest.$ac_ext <<_ACEOF
19587/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019588
19589# include <sys/types.h>
19590# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019591int
19592main ()
19593{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019594struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019595 ;
19596 return 0;
19597}
19598_ACEOF
19599rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019600if { (ac_try="$ac_compile"
19601case "(($ac_try" in
19602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19603 *) ac_try_echo=$ac_try;;
19604esac
19605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19606 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019608 grep -v '^ *+' conftest.er1 >conftest.err
19609 rm -f conftest.er1
19610 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019612 (exit $ac_status); } && {
19613 test -z "$ac_c_werror_flag" ||
19614 test ! -s conftest.err
19615 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019616 ac_cv_struct_sockaddr_storage=yes
19617else
Martin v. Löwis11437992002-04-12 09:54:03 +000019618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019619sed 's/^/| /' conftest.$ac_ext >&5
19620
Martin v. Löwiseba40652007-08-30 20:10:57 +000019621 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019622fi
19623
Martin v. Löwiseba40652007-08-30 20:10:57 +000019624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19625fi
19626
19627{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19628echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019629if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019630
19631cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019632#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019633_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019634
19635fi
19636
Guido van Rossum627b2d71993-12-24 10:39:16 +000019637# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019638
Michael W. Hudson54241132001-12-07 15:38:26 +000019639
Martin v. Löwiseba40652007-08-30 20:10:57 +000019640{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19641echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019642if test "${ac_cv_c_char_unsigned+set}" = set; then
19643 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019644else
Martin v. Löwis11437992002-04-12 09:54:03 +000019645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019646/* confdefs.h. */
19647_ACEOF
19648cat confdefs.h >>conftest.$ac_ext
19649cat >>conftest.$ac_ext <<_ACEOF
19650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019651$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019652int
19653main ()
19654{
19655static int test_array [1 - 2 * !(((char) -1) < 0)];
19656test_array [0] = 0
19657
19658 ;
19659 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019660}
Martin v. Löwis11437992002-04-12 09:54:03 +000019661_ACEOF
19662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019663if { (ac_try="$ac_compile"
19664case "(($ac_try" in
19665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19666 *) ac_try_echo=$ac_try;;
19667esac
19668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019671 grep -v '^ *+' conftest.er1 >conftest.err
19672 rm -f conftest.er1
19673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019675 (exit $ac_status); } && {
19676 test -z "$ac_c_werror_flag" ||
19677 test ! -s conftest.err
19678 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019679 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019680else
19681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019682sed 's/^/| /' conftest.$ac_ext >&5
19683
Martin v. Löwiseba40652007-08-30 20:10:57 +000019684 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019686
19687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019689{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19690echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019691if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019692 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019693#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019694_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019695
19696fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019697
Martin v. Löwiseba40652007-08-30 20:10:57 +000019698{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19699echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019700if test "${ac_cv_c_const+set}" = set; then
19701 echo $ECHO_N "(cached) $ECHO_C" >&6
19702else
19703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019704/* confdefs.h. */
19705_ACEOF
19706cat confdefs.h >>conftest.$ac_ext
19707cat >>conftest.$ac_ext <<_ACEOF
19708/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019709
Martin v. Löwis11437992002-04-12 09:54:03 +000019710int
19711main ()
19712{
19713/* FIXME: Include the comments suggested by Paul. */
19714#ifndef __cplusplus
19715 /* Ultrix mips cc rejects this. */
19716 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019717 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019718 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019719 char const *const *pcpcc;
19720 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019721 /* NEC SVR4.0.2 mips cc rejects this. */
19722 struct point {int x, y;};
19723 static struct point const zero = {0,0};
19724 /* AIX XL C 1.02.0.0 rejects this.
19725 It does not let you subtract one const X* pointer from another in
19726 an arm of an if-expression whose if-part is not a constant
19727 expression */
19728 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019729 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019730 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019731 ++pcpcc;
19732 ppc = (char**) pcpcc;
19733 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019734 { /* SCO 3.2v4 cc rejects this. */
19735 char *t;
19736 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019737
Martin v. Löwis11437992002-04-12 09:54:03 +000019738 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019739 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019740 }
19741 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19742 int x[] = {25, 17};
19743 const int *foo = &x[0];
19744 ++foo;
19745 }
19746 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19747 typedef const int *iptr;
19748 iptr p = 0;
19749 ++p;
19750 }
19751 { /* AIX XL C 1.02.0.0 rejects this saying
19752 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19753 struct s { int j; const int *ap[3]; };
19754 struct s *b; b->j = 5;
19755 }
19756 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19757 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019758 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019759 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019760 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019761#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019762
Martin v. Löwis11437992002-04-12 09:54:03 +000019763 ;
19764 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019765}
Martin v. Löwis11437992002-04-12 09:54:03 +000019766_ACEOF
19767rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019768if { (ac_try="$ac_compile"
19769case "(($ac_try" in
19770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19771 *) ac_try_echo=$ac_try;;
19772esac
19773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019776 grep -v '^ *+' conftest.er1 >conftest.err
19777 rm -f conftest.er1
19778 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019780 (exit $ac_status); } && {
19781 test -z "$ac_c_werror_flag" ||
19782 test ! -s conftest.err
19783 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019784 ac_cv_c_const=yes
19785else
Martin v. Löwis11437992002-04-12 09:54:03 +000019786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019787sed 's/^/| /' conftest.$ac_ext >&5
19788
Martin v. Löwiseba40652007-08-30 20:10:57 +000019789 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019791
19792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019794{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19795echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019796if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019797
19798cat >>confdefs.h <<\_ACEOF
19799#define const
19800_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019801
19802fi
19803
Michael W. Hudson54241132001-12-07 15:38:26 +000019804
Guido van Rossumda88dad1995-01-26 00:46:29 +000019805works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019806{ echo "$as_me:$LINENO: checking for working volatile" >&5
19807echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019809/* confdefs.h. */
19810_ACEOF
19811cat confdefs.h >>conftest.$ac_ext
19812cat >>conftest.$ac_ext <<_ACEOF
19813/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019814
Martin v. Löwis11437992002-04-12 09:54:03 +000019815int
19816main ()
19817{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019818volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019819 ;
19820 return 0;
19821}
19822_ACEOF
19823rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019824if { (ac_try="$ac_compile"
19825case "(($ac_try" in
19826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19827 *) ac_try_echo=$ac_try;;
19828esac
19829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019832 grep -v '^ *+' conftest.er1 >conftest.err
19833 rm -f conftest.er1
19834 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019836 (exit $ac_status); } && {
19837 test -z "$ac_c_werror_flag" ||
19838 test ! -s conftest.err
19839 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019840 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019841else
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019843sed 's/^/| /' conftest.$ac_ext >&5
19844
Martin v. Löwis11437992002-04-12 09:54:03 +000019845
19846cat >>confdefs.h <<\_ACEOF
19847#define volatile
19848_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019849
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019850
Guido van Rossum627b2d71993-12-24 10:39:16 +000019851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019852
19853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19854{ echo "$as_me:$LINENO: result: $works" >&5
19855echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019856
Guido van Rossumda88dad1995-01-26 00:46:29 +000019857works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019858{ echo "$as_me:$LINENO: checking for working signed char" >&5
19859echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019860cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019861/* confdefs.h. */
19862_ACEOF
19863cat confdefs.h >>conftest.$ac_ext
19864cat >>conftest.$ac_ext <<_ACEOF
19865/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019866
Martin v. Löwis11437992002-04-12 09:54:03 +000019867int
19868main ()
19869{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019870signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019871 ;
19872 return 0;
19873}
19874_ACEOF
19875rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019876if { (ac_try="$ac_compile"
19877case "(($ac_try" in
19878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19879 *) ac_try_echo=$ac_try;;
19880esac
19881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019884 grep -v '^ *+' conftest.er1 >conftest.err
19885 rm -f conftest.er1
19886 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019888 (exit $ac_status); } && {
19889 test -z "$ac_c_werror_flag" ||
19890 test ! -s conftest.err
19891 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019892 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019893else
Martin v. Löwis11437992002-04-12 09:54:03 +000019894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019895sed 's/^/| /' conftest.$ac_ext >&5
19896
Martin v. Löwis11437992002-04-12 09:54:03 +000019897
19898cat >>confdefs.h <<\_ACEOF
19899#define signed
19900_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019901
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019902
Guido van Rossum7f43da71994-08-01 12:15:30 +000019903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019904
19905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19906{ echo "$as_me:$LINENO: result: $works" >&5
19907echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019908
Guido van Rossumda88dad1995-01-26 00:46:29 +000019909have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019910{ echo "$as_me:$LINENO: checking for prototypes" >&5
19911echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019912cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019913/* confdefs.h. */
19914_ACEOF
19915cat confdefs.h >>conftest.$ac_ext
19916cat >>conftest.$ac_ext <<_ACEOF
19917/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019918int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019919int
19920main ()
19921{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019922return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019923 ;
19924 return 0;
19925}
19926_ACEOF
19927rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019928if { (ac_try="$ac_compile"
19929case "(($ac_try" in
19930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19931 *) ac_try_echo=$ac_try;;
19932esac
19933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19934 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019935 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019936 grep -v '^ *+' conftest.er1 >conftest.err
19937 rm -f conftest.er1
19938 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019940 (exit $ac_status); } && {
19941 test -z "$ac_c_werror_flag" ||
19942 test ! -s conftest.err
19943 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019944
19945
19946cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019947#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019948_ACEOF
19949
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019950 have_prototypes=yes
19951
Guido van Rossumf78abae1997-01-21 22:02:36 +000019952else
Martin v. Löwis11437992002-04-12 09:54:03 +000019953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019954sed 's/^/| /' conftest.$ac_ext >&5
19955
Martin v. Löwiseba40652007-08-30 20:10:57 +000019956
Guido van Rossum7f43da71994-08-01 12:15:30 +000019957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019958
19959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19960{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
19961echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019962
Guido van Rossumda88dad1995-01-26 00:46:29 +000019963works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019964{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19965echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019966cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019967/* confdefs.h. */
19968_ACEOF
19969cat confdefs.h >>conftest.$ac_ext
19970cat >>conftest.$ac_ext <<_ACEOF
19971/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019972
19973#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019974int foo(int x, ...) {
19975 va_list va;
19976 va_start(va, x);
19977 va_arg(va, int);
19978 va_arg(va, char *);
19979 va_arg(va, double);
19980 return 0;
19981}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019982
Martin v. Löwis11437992002-04-12 09:54:03 +000019983int
19984main ()
19985{
Guido van Rossum90eea071996-08-30 20:58:57 +000019986return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019987 ;
19988 return 0;
19989}
19990_ACEOF
19991rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019992if { (ac_try="$ac_compile"
19993case "(($ac_try" in
19994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19995 *) ac_try_echo=$ac_try;;
19996esac
19997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19998 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020000 grep -v '^ *+' conftest.er1 >conftest.err
20001 rm -f conftest.er1
20002 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020004 (exit $ac_status); } && {
20005 test -z "$ac_c_werror_flag" ||
20006 test ! -s conftest.err
20007 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020008
20009
20010cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020011#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020012_ACEOF
20013
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020014 works=yes
20015
Guido van Rossumf78abae1997-01-21 22:02:36 +000020016else
Martin v. Löwis11437992002-04-12 09:54:03 +000020017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020018sed 's/^/| /' conftest.$ac_ext >&5
20019
Martin v. Löwiseba40652007-08-30 20:10:57 +000020020
Guido van Rossum627b2d71993-12-24 10:39:16 +000020021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020022
20023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20024{ echo "$as_me:$LINENO: result: $works" >&5
20025echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020026
Martin v. Löwisd6320502004-08-12 13:45:08 +000020027# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020028{ echo "$as_me:$LINENO: checking for socketpair" >&5
20029echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020030cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020031/* confdefs.h. */
20032_ACEOF
20033cat confdefs.h >>conftest.$ac_ext
20034cat >>conftest.$ac_ext <<_ACEOF
20035/* end confdefs.h. */
20036
20037#include <sys/types.h>
20038#include <sys/socket.h>
20039
20040int
20041main ()
20042{
20043void *x=socketpair
20044 ;
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öwisd6320502004-08-12 13:45:08 +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öwisd6320502004-08-12 13:45:08 +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öwisd6320502004-08-12 13:45:08 +000020065
20066cat >>confdefs.h <<\_ACEOF
20067#define HAVE_SOCKETPAIR 1
20068_ACEOF
20069
Martin v. Löwiseba40652007-08-30 20:10:57 +000020070 { echo "$as_me:$LINENO: result: yes" >&5
20071echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020072else
20073 echo "$as_me: failed program was:" >&5
20074sed 's/^/| /' conftest.$ac_ext >&5
20075
Martin v. Löwiseba40652007-08-30 20:10:57 +000020076 { echo "$as_me:$LINENO: result: no" >&5
20077echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020078
20079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020080
20081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020082
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020083# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020084{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20085echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020086cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020087/* confdefs.h. */
20088_ACEOF
20089cat confdefs.h >>conftest.$ac_ext
20090cat >>conftest.$ac_ext <<_ACEOF
20091/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020092#include <sys/types.h>
20093#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020094int
20095main ()
20096{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020097struct sockaddr x;
20098x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020099 ;
20100 return 0;
20101}
20102_ACEOF
20103rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020104if { (ac_try="$ac_compile"
20105case "(($ac_try" in
20106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20107 *) ac_try_echo=$ac_try;;
20108esac
20109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20110 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020112 grep -v '^ *+' conftest.er1 >conftest.err
20113 rm -f conftest.er1
20114 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020116 (exit $ac_status); } && {
20117 test -z "$ac_c_werror_flag" ||
20118 test ! -s conftest.err
20119 } && test -s conftest.$ac_objext; then
20120 { echo "$as_me:$LINENO: result: yes" >&5
20121echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020122
20123cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020124#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020125_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020126
20127else
Martin v. Löwis11437992002-04-12 09:54:03 +000020128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020129sed 's/^/| /' conftest.$ac_ext >&5
20130
Martin v. Löwiseba40652007-08-30 20:10:57 +000020131 { echo "$as_me:$LINENO: result: no" >&5
20132echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020134
20135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020136
Guido van Rossumda88dad1995-01-26 00:46:29 +000020137va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020138{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20139echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020141/* confdefs.h. */
20142_ACEOF
20143cat confdefs.h >>conftest.$ac_ext
20144cat >>conftest.$ac_ext <<_ACEOF
20145/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020146
20147#ifdef HAVE_STDARG_PROTOTYPES
20148#include <stdarg.h>
20149#else
20150#include <varargs.h>
20151#endif
20152
Martin v. Löwis11437992002-04-12 09:54:03 +000020153int
20154main ()
20155{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020156va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020157 ;
20158 return 0;
20159}
20160_ACEOF
20161rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020162if { (ac_try="$ac_compile"
20163case "(($ac_try" in
20164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20165 *) ac_try_echo=$ac_try;;
20166esac
20167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020170 grep -v '^ *+' conftest.er1 >conftest.err
20171 rm -f conftest.er1
20172 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020174 (exit $ac_status); } && {
20175 test -z "$ac_c_werror_flag" ||
20176 test ! -s conftest.err
20177 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020178 :
20179else
Martin v. Löwis11437992002-04-12 09:54:03 +000020180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020181sed 's/^/| /' conftest.$ac_ext >&5
20182
Martin v. Löwis11437992002-04-12 09:54:03 +000020183
20184
20185cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020186#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020187_ACEOF
20188
Guido van Rossumda88dad1995-01-26 00:46:29 +000020189 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020190
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020192
20193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20194{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20195echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020196
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020197# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020198
20199
20200
Martin v. Löwiseba40652007-08-30 20:10:57 +000020201{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20202echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020203if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20204 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020205else
Martin v. Löwis11437992002-04-12 09:54:03 +000020206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020207/* confdefs.h. */
20208_ACEOF
20209cat confdefs.h >>conftest.$ac_ext
20210cat >>conftest.$ac_ext <<_ACEOF
20211/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020212/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20213 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20214#define gethostbyname_r innocuous_gethostbyname_r
20215
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020216/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020217 which can conflict with char gethostbyname_r (); below.
20218 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020219 <limits.h> exists even on freestanding compilers. */
20220
20221#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020222# include <limits.h>
20223#else
20224# include <assert.h>
20225#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020226
20227#undef gethostbyname_r
20228
Martin v. Löwiseba40652007-08-30 20:10:57 +000020229/* Override any GCC internal prototype to avoid an error.
20230 Use char because int might match the return type of a GCC
20231 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020232#ifdef __cplusplus
20233extern "C"
20234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020235char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020236/* The GNU C library defines this for functions which it implements
20237 to always fail with ENOSYS. Some functions are actually named
20238 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020239#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020240choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020241#endif
20242
Skip Montanaro6dead952003-09-25 14:50:04 +000020243int
20244main ()
20245{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020246return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020247 ;
20248 return 0;
20249}
20250_ACEOF
20251rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020252if { (ac_try="$ac_link"
20253case "(($ac_try" in
20254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20255 *) ac_try_echo=$ac_try;;
20256esac
20257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20258 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020260 grep -v '^ *+' conftest.er1 >conftest.err
20261 rm -f conftest.er1
20262 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020264 (exit $ac_status); } && {
20265 test -z "$ac_c_werror_flag" ||
20266 test ! -s conftest.err
20267 } && test -s conftest$ac_exeext &&
20268 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020269 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020270else
Martin v. Löwis11437992002-04-12 09:54:03 +000020271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020272sed 's/^/| /' conftest.$ac_ext >&5
20273
Martin v. Löwiseba40652007-08-30 20:10:57 +000020274 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020276
20277rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020278 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020280{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20281echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020282if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020283
Martin v. Löwis11437992002-04-12 09:54:03 +000020284 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020285#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020286_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020287
Martin v. Löwiseba40652007-08-30 20:10:57 +000020288 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20289echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020290 OLD_CFLAGS=$CFLAGS
20291 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020292 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020293/* confdefs.h. */
20294_ACEOF
20295cat confdefs.h >>conftest.$ac_ext
20296cat >>conftest.$ac_ext <<_ACEOF
20297/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020298
20299# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020300
Martin v. Löwis11437992002-04-12 09:54:03 +000020301int
20302main ()
20303{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020304
20305 char *name;
20306 struct hostent *he, *res;
20307 char buffer[2048];
20308 int buflen = 2048;
20309 int h_errnop;
20310
20311 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020312
20313 ;
20314 return 0;
20315}
20316_ACEOF
20317rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020318if { (ac_try="$ac_compile"
20319case "(($ac_try" in
20320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20321 *) ac_try_echo=$ac_try;;
20322esac
20323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020326 grep -v '^ *+' conftest.er1 >conftest.err
20327 rm -f conftest.er1
20328 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020330 (exit $ac_status); } && {
20331 test -z "$ac_c_werror_flag" ||
20332 test ! -s conftest.err
20333 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020334
20335 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020336#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020337_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020338
Martin v. Löwis11437992002-04-12 09:54:03 +000020339
20340cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020341#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020342_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020343
Martin v. Löwiseba40652007-08-30 20:10:57 +000020344 { echo "$as_me:$LINENO: result: yes" >&5
20345echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020346
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020347else
Martin v. Löwis11437992002-04-12 09:54:03 +000020348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020349sed 's/^/| /' conftest.$ac_ext >&5
20350
Martin v. Löwis11437992002-04-12 09:54:03 +000020351
Martin v. Löwiseba40652007-08-30 20:10:57 +000020352 { echo "$as_me:$LINENO: result: no" >&5
20353echo "${ECHO_T}no" >&6; }
20354 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20355echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020357/* confdefs.h. */
20358_ACEOF
20359cat confdefs.h >>conftest.$ac_ext
20360cat >>conftest.$ac_ext <<_ACEOF
20361/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020362
20363# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020364
Martin v. Löwis11437992002-04-12 09:54:03 +000020365int
20366main ()
20367{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020368
20369 char *name;
20370 struct hostent *he;
20371 char buffer[2048];
20372 int buflen = 2048;
20373 int h_errnop;
20374
20375 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020376
20377 ;
20378 return 0;
20379}
20380_ACEOF
20381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020382if { (ac_try="$ac_compile"
20383case "(($ac_try" in
20384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20385 *) ac_try_echo=$ac_try;;
20386esac
20387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020390 grep -v '^ *+' conftest.er1 >conftest.err
20391 rm -f conftest.er1
20392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020394 (exit $ac_status); } && {
20395 test -z "$ac_c_werror_flag" ||
20396 test ! -s conftest.err
20397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020398
20399 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020400#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020401_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020402
Martin v. Löwis11437992002-04-12 09:54:03 +000020403
20404cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020405#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020406_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020407
Martin v. Löwiseba40652007-08-30 20:10:57 +000020408 { echo "$as_me:$LINENO: result: yes" >&5
20409echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020410
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020411else
Martin v. Löwis11437992002-04-12 09:54:03 +000020412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020413sed 's/^/| /' conftest.$ac_ext >&5
20414
Martin v. Löwis11437992002-04-12 09:54:03 +000020415
Martin v. Löwiseba40652007-08-30 20:10:57 +000020416 { echo "$as_me:$LINENO: result: no" >&5
20417echo "${ECHO_T}no" >&6; }
20418 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20419echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020421/* confdefs.h. */
20422_ACEOF
20423cat confdefs.h >>conftest.$ac_ext
20424cat >>conftest.$ac_ext <<_ACEOF
20425/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020426
20427# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020428
Martin v. Löwis11437992002-04-12 09:54:03 +000020429int
20430main ()
20431{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020432
20433 char *name;
20434 struct hostent *he;
20435 struct hostent_data data;
20436
20437 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020438
20439 ;
20440 return 0;
20441}
20442_ACEOF
20443rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020444if { (ac_try="$ac_compile"
20445case "(($ac_try" in
20446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20447 *) ac_try_echo=$ac_try;;
20448esac
20449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20450 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020452 grep -v '^ *+' conftest.er1 >conftest.err
20453 rm -f conftest.er1
20454 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020456 (exit $ac_status); } && {
20457 test -z "$ac_c_werror_flag" ||
20458 test ! -s conftest.err
20459 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020460
20461 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020462#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020463_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020464
Martin v. Löwis11437992002-04-12 09:54:03 +000020465
20466cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020467#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020468_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020469
Martin v. Löwiseba40652007-08-30 20:10:57 +000020470 { echo "$as_me:$LINENO: result: yes" >&5
20471echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020472
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020473else
Martin v. Löwis11437992002-04-12 09:54:03 +000020474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020475sed 's/^/| /' conftest.$ac_ext >&5
20476
Martin v. Löwis11437992002-04-12 09:54:03 +000020477
Martin v. Löwiseba40652007-08-30 20:10:57 +000020478 { echo "$as_me:$LINENO: result: no" >&5
20479echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020480
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020482
20483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020486
20487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020488
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020490
20491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020492 CFLAGS=$OLD_CFLAGS
20493
20494else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020495
Martin v. Löwis11437992002-04-12 09:54:03 +000020496
20497for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020498do
Martin v. Löwis11437992002-04-12 09:54:03 +000020499as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020500{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20501echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20502if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020503 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020504else
Martin v. Löwis11437992002-04-12 09:54:03 +000020505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020506/* confdefs.h. */
20507_ACEOF
20508cat confdefs.h >>conftest.$ac_ext
20509cat >>conftest.$ac_ext <<_ACEOF
20510/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020511/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20512 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20513#define $ac_func innocuous_$ac_func
20514
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020515/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020516 which can conflict with char $ac_func (); below.
20517 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020518 <limits.h> exists even on freestanding compilers. */
20519
20520#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020521# include <limits.h>
20522#else
20523# include <assert.h>
20524#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020525
20526#undef $ac_func
20527
Martin v. Löwiseba40652007-08-30 20:10:57 +000020528/* Override any GCC internal prototype to avoid an error.
20529 Use char because int might match the return type of a GCC
20530 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020531#ifdef __cplusplus
20532extern "C"
20533#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020534char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020535/* The GNU C library defines this for functions which it implements
20536 to always fail with ENOSYS. Some functions are actually named
20537 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020538#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020539choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020540#endif
20541
Skip Montanaro6dead952003-09-25 14:50:04 +000020542int
20543main ()
20544{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020545return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020546 ;
20547 return 0;
20548}
20549_ACEOF
20550rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020551if { (ac_try="$ac_link"
20552case "(($ac_try" in
20553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20554 *) ac_try_echo=$ac_try;;
20555esac
20556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20557 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020559 grep -v '^ *+' conftest.er1 >conftest.err
20560 rm -f conftest.er1
20561 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020563 (exit $ac_status); } && {
20564 test -z "$ac_c_werror_flag" ||
20565 test ! -s conftest.err
20566 } && test -s conftest$ac_exeext &&
20567 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020568 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020569else
Martin v. Löwis11437992002-04-12 09:54:03 +000020570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020571sed 's/^/| /' conftest.$ac_ext >&5
20572
Martin v. Löwiseba40652007-08-30 20:10:57 +000020573 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020575
20576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020577 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020579ac_res=`eval echo '${'$as_ac_var'}'`
20580 { echo "$as_me:$LINENO: result: $ac_res" >&5
20581echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020582if test `eval echo '${'$as_ac_var'}'` = yes; then
20583 cat >>confdefs.h <<_ACEOF
20584#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20585_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020586
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020587fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020588done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020589
Michael W. Hudson54241132001-12-07 15:38:26 +000020590
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020591fi
20592
Michael W. Hudson54241132001-12-07 15:38:26 +000020593
20594
20595
20596
20597
20598
Guido van Rossum627b2d71993-12-24 10:39:16 +000020599# checks for system services
20600# (none yet)
20601
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020602# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020603{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20604echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020605if test "${ac_cv_func___fpu_control+set}" = set; then
20606 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020607else
Martin v. Löwis11437992002-04-12 09:54:03 +000020608 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020609/* confdefs.h. */
20610_ACEOF
20611cat confdefs.h >>conftest.$ac_ext
20612cat >>conftest.$ac_ext <<_ACEOF
20613/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020614/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20615 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20616#define __fpu_control innocuous___fpu_control
20617
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020618/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020619 which can conflict with char __fpu_control (); below.
20620 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020621 <limits.h> exists even on freestanding compilers. */
20622
20623#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020624# include <limits.h>
20625#else
20626# include <assert.h>
20627#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020628
20629#undef __fpu_control
20630
Martin v. Löwiseba40652007-08-30 20:10:57 +000020631/* Override any GCC internal prototype to avoid an error.
20632 Use char because int might match the return type of a GCC
20633 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020634#ifdef __cplusplus
20635extern "C"
20636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020637char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020638/* The GNU C library defines this for functions which it implements
20639 to always fail with ENOSYS. Some functions are actually named
20640 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020641#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020642choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020643#endif
20644
Skip Montanaro6dead952003-09-25 14:50:04 +000020645int
20646main ()
20647{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020648return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020649 ;
20650 return 0;
20651}
20652_ACEOF
20653rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020654if { (ac_try="$ac_link"
20655case "(($ac_try" in
20656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20657 *) ac_try_echo=$ac_try;;
20658esac
20659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20660 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020662 grep -v '^ *+' conftest.er1 >conftest.err
20663 rm -f conftest.er1
20664 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020666 (exit $ac_status); } && {
20667 test -z "$ac_c_werror_flag" ||
20668 test ! -s conftest.err
20669 } && test -s conftest$ac_exeext &&
20670 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020671 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020672else
Martin v. Löwis11437992002-04-12 09:54:03 +000020673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020674sed 's/^/| /' conftest.$ac_ext >&5
20675
Martin v. Löwiseba40652007-08-30 20:10:57 +000020676 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020678
20679rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020680 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020682{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20683echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020684if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020685 :
20686else
Martin v. Löwis11437992002-04-12 09:54:03 +000020687
Martin v. Löwiseba40652007-08-30 20:10:57 +000020688{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20689echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020690if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20691 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020692else
Martin v. Löwis11437992002-04-12 09:54:03 +000020693 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020694LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020695cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020696/* confdefs.h. */
20697_ACEOF
20698cat confdefs.h >>conftest.$ac_ext
20699cat >>conftest.$ac_ext <<_ACEOF
20700/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020701
Martin v. Löwiseba40652007-08-30 20:10:57 +000020702/* Override any GCC internal prototype to avoid an error.
20703 Use char because int might match the return type of a GCC
20704 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020705#ifdef __cplusplus
20706extern "C"
20707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020708char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020709int
20710main ()
20711{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020712return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020713 ;
20714 return 0;
20715}
20716_ACEOF
20717rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020718if { (ac_try="$ac_link"
20719case "(($ac_try" in
20720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20721 *) ac_try_echo=$ac_try;;
20722esac
20723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20724 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020726 grep -v '^ *+' conftest.er1 >conftest.err
20727 rm -f conftest.er1
20728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020730 (exit $ac_status); } && {
20731 test -z "$ac_c_werror_flag" ||
20732 test ! -s conftest.err
20733 } && test -s conftest$ac_exeext &&
20734 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020735 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020736else
Martin v. Löwis11437992002-04-12 09:54:03 +000020737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020738sed 's/^/| /' conftest.$ac_ext >&5
20739
Martin v. Löwiseba40652007-08-30 20:10:57 +000020740 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020742
20743rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020744 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020745LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020747{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20748echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020749if test $ac_cv_lib_ieee___fpu_control = yes; then
20750 cat >>confdefs.h <<_ACEOF
20751#define HAVE_LIBIEEE 1
20752_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020753
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020754 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020755
Guido van Rossum627b2d71993-12-24 10:39:16 +000020756fi
20757
Michael W. Hudson54241132001-12-07 15:38:26 +000020758
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020759fi
20760
Michael W. Hudson54241132001-12-07 15:38:26 +000020761
Guido van Rossum7f253911997-05-09 02:42:48 +000020762# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020763{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20764echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020765
Martin v. Löwiseba40652007-08-30 20:10:57 +000020766# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020767if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020768 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020769if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020770then
20771
20772cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020773#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020774_ACEOF
20775
Martin v. Löwiseba40652007-08-30 20:10:57 +000020776 { echo "$as_me:$LINENO: result: yes" >&5
20777echo "${ECHO_T}yes" >&6; }
20778else { echo "$as_me:$LINENO: result: no" >&5
20779echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020780fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020781else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020782 { echo "$as_me:$LINENO: result: no" >&5
20783echo "${ECHO_T}no" >&6; }
20784fi
20785
Guido van Rossum7f253911997-05-09 02:42:48 +000020786
Guido van Rossum7f43da71994-08-01 12:15:30 +000020787# check for --with-libm=...
20788
Guido van Rossum563e7081996-09-10 18:20:48 +000020789case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020790Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020791BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020792*) LIBM=-lm
20793esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020794{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20795echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020796
Martin v. Löwiseba40652007-08-30 20:10:57 +000020797# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020798if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020799 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020800if test "$withval" = no
20801then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020802 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20803echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020804elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020805then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020806 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20807echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020808else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20809echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20810 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020811fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020812else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020813 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20814echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20815fi
20816
Guido van Rossum7f43da71994-08-01 12:15:30 +000020817
20818# check for --with-libc=...
20819
Martin v. Löwiseba40652007-08-30 20:10:57 +000020820{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20821echo $ECHO_N "checking for --with-libc=STRING... $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-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020824if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020825 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020826if test "$withval" = no
20827then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020828 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20829echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020830elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020831then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020832 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20833echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020834else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20835echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20836 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020837fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020838else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020839 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20840echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20841fi
20842
Guido van Rossum7f43da71994-08-01 12:15:30 +000020843
Christian Heimes0a8143f2007-12-18 23:22:54 +000020844# ************************************
20845# * Check for mathematical functions *
20846# ************************************
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020847LIBS_SAVE=$LIBS
20848LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000020849
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020850for ac_func in hypot
20851do
Martin v. Löwis11437992002-04-12 09:54:03 +000020852as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020853{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20854echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20855if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020856 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020857else
Martin v. Löwis11437992002-04-12 09:54:03 +000020858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020859/* confdefs.h. */
20860_ACEOF
20861cat confdefs.h >>conftest.$ac_ext
20862cat >>conftest.$ac_ext <<_ACEOF
20863/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020864/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20865 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20866#define $ac_func innocuous_$ac_func
20867
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020868/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020869 which can conflict with char $ac_func (); below.
20870 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020871 <limits.h> exists even on freestanding compilers. */
20872
20873#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020874# include <limits.h>
20875#else
20876# include <assert.h>
20877#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020878
20879#undef $ac_func
20880
Martin v. Löwiseba40652007-08-30 20:10:57 +000020881/* Override any GCC internal prototype to avoid an error.
20882 Use char because int might match the return type of a GCC
20883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020884#ifdef __cplusplus
20885extern "C"
20886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020887char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020888/* The GNU C library defines this for functions which it implements
20889 to always fail with ENOSYS. Some functions are actually named
20890 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020891#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020892choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020893#endif
20894
Skip Montanaro6dead952003-09-25 14:50:04 +000020895int
20896main ()
20897{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020898return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 ;
20900 return 0;
20901}
20902_ACEOF
20903rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020904if { (ac_try="$ac_link"
20905case "(($ac_try" in
20906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20907 *) ac_try_echo=$ac_try;;
20908esac
20909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20910 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020912 grep -v '^ *+' conftest.er1 >conftest.err
20913 rm -f conftest.er1
20914 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020916 (exit $ac_status); } && {
20917 test -z "$ac_c_werror_flag" ||
20918 test ! -s conftest.err
20919 } && test -s conftest$ac_exeext &&
20920 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020921 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020922else
Martin v. Löwis11437992002-04-12 09:54:03 +000020923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020924sed 's/^/| /' conftest.$ac_ext >&5
20925
Martin v. Löwiseba40652007-08-30 20:10:57 +000020926 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020928
20929rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020930 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020932ac_res=`eval echo '${'$as_ac_var'}'`
20933 { echo "$as_me:$LINENO: result: $ac_res" >&5
20934echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020935if test `eval echo '${'$as_ac_var'}'` = yes; then
20936 cat >>confdefs.h <<_ACEOF
20937#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20938_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020939
Michael W. Hudson54241132001-12-07 15:38:26 +000020940else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020941 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020942 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020943 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20944 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020945esac
20946
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020947fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020948done
20949
Michael W. Hudson54241132001-12-07 15:38:26 +000020950
Christian Heimes0a8143f2007-12-18 23:22:54 +000020951
20952
20953
20954
20955
Christian Heimes48723512008-01-20 14:28:28 +000020956
20957
20958
20959
20960
20961for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000020962do
20963as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20964{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20965echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20966if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20967 echo $ECHO_N "(cached) $ECHO_C" >&6
20968else
20969 cat >conftest.$ac_ext <<_ACEOF
20970/* confdefs.h. */
20971_ACEOF
20972cat confdefs.h >>conftest.$ac_ext
20973cat >>conftest.$ac_ext <<_ACEOF
20974/* end confdefs.h. */
20975/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20976 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20977#define $ac_func innocuous_$ac_func
20978
20979/* System header to define __stub macros and hopefully few prototypes,
20980 which can conflict with char $ac_func (); below.
20981 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20982 <limits.h> exists even on freestanding compilers. */
20983
20984#ifdef __STDC__
20985# include <limits.h>
20986#else
20987# include <assert.h>
20988#endif
20989
20990#undef $ac_func
20991
20992/* Override any GCC internal prototype to avoid an error.
20993 Use char because int might match the return type of a GCC
20994 builtin and then its argument prototype would still apply. */
20995#ifdef __cplusplus
20996extern "C"
20997#endif
20998char $ac_func ();
20999/* The GNU C library defines this for functions which it implements
21000 to always fail with ENOSYS. Some functions are actually named
21001 something starting with __ and the normal name is an alias. */
21002#if defined __stub_$ac_func || defined __stub___$ac_func
21003choke me
21004#endif
21005
21006int
21007main ()
21008{
21009return $ac_func ();
21010 ;
21011 return 0;
21012}
21013_ACEOF
21014rm -f conftest.$ac_objext conftest$ac_exeext
21015if { (ac_try="$ac_link"
21016case "(($ac_try" in
21017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21018 *) ac_try_echo=$ac_try;;
21019esac
21020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21021 (eval "$ac_link") 2>conftest.er1
21022 ac_status=$?
21023 grep -v '^ *+' conftest.er1 >conftest.err
21024 rm -f conftest.er1
21025 cat conftest.err >&5
21026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21027 (exit $ac_status); } && {
21028 test -z "$ac_c_werror_flag" ||
21029 test ! -s conftest.err
21030 } && test -s conftest$ac_exeext &&
21031 $as_test_x conftest$ac_exeext; then
21032 eval "$as_ac_var=yes"
21033else
21034 echo "$as_me: failed program was:" >&5
21035sed 's/^/| /' conftest.$ac_ext >&5
21036
21037 eval "$as_ac_var=no"
21038fi
21039
21040rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21041 conftest$ac_exeext conftest.$ac_ext
21042fi
21043ac_res=`eval echo '${'$as_ac_var'}'`
21044 { echo "$as_me:$LINENO: result: $ac_res" >&5
21045echo "${ECHO_T}$ac_res" >&6; }
21046if test `eval echo '${'$as_ac_var'}'` = yes; then
21047 cat >>confdefs.h <<_ACEOF
21048#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21049_ACEOF
21050
21051fi
21052done
21053
21054
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021055LIBS=$LIBS_SAVE
21056
Guido van Rossumef2255b2000-03-10 22:30:29 +000021057# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021058if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021059 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21060echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021061if test "${ac_cv_header_wchar_h+set}" = set; then
21062 echo $ECHO_N "(cached) $ECHO_C" >&6
21063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021064{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21065echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021066else
Martin v. Löwis11437992002-04-12 09:54:03 +000021067 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021068{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21069echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021070cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021071/* confdefs.h. */
21072_ACEOF
21073cat confdefs.h >>conftest.$ac_ext
21074cat >>conftest.$ac_ext <<_ACEOF
21075/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021076$ac_includes_default
21077#include <wchar.h>
21078_ACEOF
21079rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021080if { (ac_try="$ac_compile"
21081case "(($ac_try" in
21082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21083 *) ac_try_echo=$ac_try;;
21084esac
21085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21086 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021088 grep -v '^ *+' conftest.er1 >conftest.err
21089 rm -f conftest.er1
21090 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021092 (exit $ac_status); } && {
21093 test -z "$ac_c_werror_flag" ||
21094 test ! -s conftest.err
21095 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021096 ac_header_compiler=yes
21097else
21098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021099sed 's/^/| /' conftest.$ac_ext >&5
21100
Martin v. Löwiseba40652007-08-30 20:10:57 +000021101 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021103
21104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21105{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21106echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021107
21108# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021109{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21110echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021112/* confdefs.h. */
21113_ACEOF
21114cat confdefs.h >>conftest.$ac_ext
21115cat >>conftest.$ac_ext <<_ACEOF
21116/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021117#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021118_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021119if { (ac_try="$ac_cpp conftest.$ac_ext"
21120case "(($ac_try" in
21121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21122 *) ac_try_echo=$ac_try;;
21123esac
21124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21125 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021126 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021127 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 rm -f conftest.er1
21129 cat conftest.err >&5
21130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021131 (exit $ac_status); } >/dev/null && {
21132 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21133 test ! -s conftest.err
21134 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021135 ac_header_preproc=yes
21136else
21137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021138sed 's/^/| /' conftest.$ac_ext >&5
21139
Martin v. Löwis11437992002-04-12 09:54:03 +000021140 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021142
Martin v. Löwis11437992002-04-12 09:54:03 +000021143rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021144{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21145echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021146
21147# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021148case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21149 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021150 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21151echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021152 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21153echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21154 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021155 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021156 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021157 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21158echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021159 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21160echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21161 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21162echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21163 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21164echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021165 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21166echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021167 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21168echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021169 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021170## ------------------------------------------------ ##
21171## Report this to http://www.python.org/python-bugs ##
21172## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021173_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021174 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021175 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021176esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021177{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21178echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021179if test "${ac_cv_header_wchar_h+set}" = set; then
21180 echo $ECHO_N "(cached) $ECHO_C" >&6
21181else
21182 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021184{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21185echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021186
21187fi
21188if test $ac_cv_header_wchar_h = yes; then
21189
21190
21191cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021192#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021193_ACEOF
21194
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021195 wchar_h="yes"
21196
Guido van Rossumef2255b2000-03-10 22:30:29 +000021197else
Martin v. Löwis11437992002-04-12 09:54:03 +000021198 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021199
21200fi
21201
Michael W. Hudson54241132001-12-07 15:38:26 +000021202
Martin v. Löwis11437992002-04-12 09:54:03 +000021203
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021204# determine wchar_t size
21205if test "$wchar_h" = yes
21206then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021207 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21208echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021209if test "${ac_cv_type_wchar_t+set}" = set; then
21210 echo $ECHO_N "(cached) $ECHO_C" >&6
21211else
21212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021213/* confdefs.h. */
21214_ACEOF
21215cat confdefs.h >>conftest.$ac_ext
21216cat >>conftest.$ac_ext <<_ACEOF
21217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021218#include <wchar.h>
21219
Martin v. Löwiseba40652007-08-30 20:10:57 +000021220typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021221int
21222main ()
21223{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021224if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021225 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021226if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021227 return 0;
21228 ;
21229 return 0;
21230}
21231_ACEOF
21232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233if { (ac_try="$ac_compile"
21234case "(($ac_try" in
21235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21236 *) ac_try_echo=$ac_try;;
21237esac
21238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021241 grep -v '^ *+' conftest.er1 >conftest.err
21242 rm -f conftest.er1
21243 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021245 (exit $ac_status); } && {
21246 test -z "$ac_c_werror_flag" ||
21247 test ! -s conftest.err
21248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021249 ac_cv_type_wchar_t=yes
21250else
21251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021252sed 's/^/| /' conftest.$ac_ext >&5
21253
Martin v. Löwiseba40652007-08-30 20:10:57 +000021254 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021255fi
Brett Cannon19fab762007-06-02 03:02:29 +000021256
Martin v. Löwiseba40652007-08-30 20:10:57 +000021257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21258fi
21259{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21260echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21261
21262# The cast to long int works around a bug in the HP C Compiler
21263# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21264# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21265# This bug is HP SR number 8606223364.
21266{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21267echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021268if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21269 echo $ECHO_N "(cached) $ECHO_C" >&6
21270else
Martin v. Löwis11437992002-04-12 09:54:03 +000021271 if test "$cross_compiling" = yes; then
21272 # Depending upon the size, compute the lo and hi bounds.
21273cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021274/* confdefs.h. */
21275_ACEOF
21276cat confdefs.h >>conftest.$ac_ext
21277cat >>conftest.$ac_ext <<_ACEOF
21278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021279#include <wchar.h>
21280
Martin v. Löwiseba40652007-08-30 20:10:57 +000021281 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021282int
21283main ()
21284{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021285static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021286test_array [0] = 0
21287
21288 ;
21289 return 0;
21290}
21291_ACEOF
21292rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021293if { (ac_try="$ac_compile"
21294case "(($ac_try" in
21295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21296 *) ac_try_echo=$ac_try;;
21297esac
21298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021301 grep -v '^ *+' conftest.er1 >conftest.err
21302 rm -f conftest.er1
21303 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021305 (exit $ac_status); } && {
21306 test -z "$ac_c_werror_flag" ||
21307 test ! -s conftest.err
21308 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021309 ac_lo=0 ac_mid=0
21310 while :; do
21311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021312/* confdefs.h. */
21313_ACEOF
21314cat confdefs.h >>conftest.$ac_ext
21315cat >>conftest.$ac_ext <<_ACEOF
21316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021317#include <wchar.h>
21318
Martin v. Löwiseba40652007-08-30 20:10:57 +000021319 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021320int
21321main ()
21322{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021323static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021324test_array [0] = 0
21325
21326 ;
21327 return 0;
21328}
21329_ACEOF
21330rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021331if { (ac_try="$ac_compile"
21332case "(($ac_try" in
21333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21334 *) ac_try_echo=$ac_try;;
21335esac
21336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21337 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021339 grep -v '^ *+' conftest.er1 >conftest.err
21340 rm -f conftest.er1
21341 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021343 (exit $ac_status); } && {
21344 test -z "$ac_c_werror_flag" ||
21345 test ! -s conftest.err
21346 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021347 ac_hi=$ac_mid; break
21348else
21349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021350sed 's/^/| /' conftest.$ac_ext >&5
21351
Martin v. Löwiseba40652007-08-30 20:10:57 +000021352 ac_lo=`expr $ac_mid + 1`
21353 if test $ac_lo -le $ac_mid; then
21354 ac_lo= ac_hi=
21355 break
21356 fi
21357 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021359
21360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021361 done
21362else
21363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021364sed 's/^/| /' conftest.$ac_ext >&5
21365
Martin v. Löwiseba40652007-08-30 20:10:57 +000021366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021367/* confdefs.h. */
21368_ACEOF
21369cat confdefs.h >>conftest.$ac_ext
21370cat >>conftest.$ac_ext <<_ACEOF
21371/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021372#include <wchar.h>
21373
Martin v. Löwiseba40652007-08-30 20:10:57 +000021374 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021375int
21376main ()
21377{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021378static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021379test_array [0] = 0
21380
21381 ;
21382 return 0;
21383}
21384_ACEOF
21385rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021386if { (ac_try="$ac_compile"
21387case "(($ac_try" in
21388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21389 *) ac_try_echo=$ac_try;;
21390esac
21391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021394 grep -v '^ *+' conftest.er1 >conftest.err
21395 rm -f conftest.er1
21396 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021398 (exit $ac_status); } && {
21399 test -z "$ac_c_werror_flag" ||
21400 test ! -s conftest.err
21401 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021402 ac_hi=-1 ac_mid=-1
21403 while :; do
21404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021405/* confdefs.h. */
21406_ACEOF
21407cat confdefs.h >>conftest.$ac_ext
21408cat >>conftest.$ac_ext <<_ACEOF
21409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021410#include <wchar.h>
21411
Martin v. Löwiseba40652007-08-30 20:10:57 +000021412 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021413int
21414main ()
21415{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021416static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021417test_array [0] = 0
21418
21419 ;
21420 return 0;
21421}
21422_ACEOF
21423rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021424if { (ac_try="$ac_compile"
21425case "(($ac_try" in
21426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21427 *) ac_try_echo=$ac_try;;
21428esac
21429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21430 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021432 grep -v '^ *+' conftest.er1 >conftest.err
21433 rm -f conftest.er1
21434 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021436 (exit $ac_status); } && {
21437 test -z "$ac_c_werror_flag" ||
21438 test ! -s conftest.err
21439 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021440 ac_lo=$ac_mid; break
21441else
21442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021443sed 's/^/| /' conftest.$ac_ext >&5
21444
Martin v. Löwiseba40652007-08-30 20:10:57 +000021445 ac_hi=`expr '(' $ac_mid ')' - 1`
21446 if test $ac_mid -le $ac_hi; then
21447 ac_lo= ac_hi=
21448 break
21449 fi
21450 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021452
21453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021454 done
21455else
21456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021457sed 's/^/| /' conftest.$ac_ext >&5
21458
Martin v. Löwiseba40652007-08-30 20:10:57 +000021459 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021461
21462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021464
21465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021466# Binary search between lo and hi bounds.
21467while test "x$ac_lo" != "x$ac_hi"; do
21468 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021470/* confdefs.h. */
21471_ACEOF
21472cat confdefs.h >>conftest.$ac_ext
21473cat >>conftest.$ac_ext <<_ACEOF
21474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021475#include <wchar.h>
21476
Martin v. Löwiseba40652007-08-30 20:10:57 +000021477 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021478int
21479main ()
21480{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021481static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021482test_array [0] = 0
21483
21484 ;
21485 return 0;
21486}
21487_ACEOF
21488rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021489if { (ac_try="$ac_compile"
21490case "(($ac_try" in
21491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21492 *) ac_try_echo=$ac_try;;
21493esac
21494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021497 grep -v '^ *+' conftest.er1 >conftest.err
21498 rm -f conftest.er1
21499 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021501 (exit $ac_status); } && {
21502 test -z "$ac_c_werror_flag" ||
21503 test ! -s conftest.err
21504 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021505 ac_hi=$ac_mid
21506else
21507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021508sed 's/^/| /' conftest.$ac_ext >&5
21509
Martin v. Löwiseba40652007-08-30 20:10:57 +000021510 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021512
21513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021514done
21515case $ac_lo in
21516?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021517'') if test "$ac_cv_type_wchar_t" = yes; then
21518 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021519See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021520echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021521See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021522 { (exit 77); exit 77; }; }
21523 else
21524 ac_cv_sizeof_wchar_t=0
21525 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021526esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021527else
Martin v. Löwis11437992002-04-12 09:54:03 +000021528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021529/* confdefs.h. */
21530_ACEOF
21531cat confdefs.h >>conftest.$ac_ext
21532cat >>conftest.$ac_ext <<_ACEOF
21533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021534#include <wchar.h>
21535
Martin v. Löwiseba40652007-08-30 20:10:57 +000021536 typedef wchar_t ac__type_sizeof_;
21537static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21538static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021539#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021540#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021541int
21542main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021543{
Martin v. Löwis11437992002-04-12 09:54:03 +000021544
21545 FILE *f = fopen ("conftest.val", "w");
21546 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021547 return 1;
21548 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021549 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021550 long int i = longval ();
21551 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21552 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021553 fprintf (f, "%ld\n", i);
21554 }
21555 else
21556 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021557 unsigned long int i = ulongval ();
21558 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21559 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021560 fprintf (f, "%lu\n", i);
21561 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021562 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021563
21564 ;
21565 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021566}
Martin v. Löwis11437992002-04-12 09:54:03 +000021567_ACEOF
21568rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021569if { (ac_try="$ac_link"
21570case "(($ac_try" in
21571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21572 *) ac_try_echo=$ac_try;;
21573esac
21574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21575 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021576 ac_status=$?
21577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21578 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021579 { (case "(($ac_try" in
21580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21581 *) ac_try_echo=$ac_try;;
21582esac
21583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21584 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021585 ac_status=$?
21586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21587 (exit $ac_status); }; }; then
21588 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021589else
Martin v. Löwis11437992002-04-12 09:54:03 +000021590 echo "$as_me: program exited with status $ac_status" >&5
21591echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021592sed 's/^/| /' conftest.$ac_ext >&5
21593
Martin v. Löwis11437992002-04-12 09:54:03 +000021594( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021595if test "$ac_cv_type_wchar_t" = yes; then
21596 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021597See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021598echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021599See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021600 { (exit 77); exit 77; }; }
21601 else
21602 ac_cv_sizeof_wchar_t=0
21603 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021605rm -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 +000021606fi
21607rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021609{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21610echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21611
21612
21613
Martin v. Löwis11437992002-04-12 09:54:03 +000021614cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021615#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021616_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021617
Michael W. Hudson54241132001-12-07 15:38:26 +000021618
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021619fi
21620
Martin v. Löwiseba40652007-08-30 20:10:57 +000021621{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21622echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021623have_ucs4_tcl=no
21624cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021625/* confdefs.h. */
21626_ACEOF
21627cat confdefs.h >>conftest.$ac_ext
21628cat >>conftest.$ac_ext <<_ACEOF
21629/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021630
21631#include <tcl.h>
21632#if TCL_UTF_MAX != 6
21633# error "NOT UCS4_TCL"
21634#endif
21635int
21636main ()
21637{
21638
21639 ;
21640 return 0;
21641}
21642_ACEOF
21643rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021644if { (ac_try="$ac_compile"
21645case "(($ac_try" in
21646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21647 *) ac_try_echo=$ac_try;;
21648esac
21649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21650 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021652 grep -v '^ *+' conftest.er1 >conftest.err
21653 rm -f conftest.er1
21654 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021656 (exit $ac_status); } && {
21657 test -z "$ac_c_werror_flag" ||
21658 test ! -s conftest.err
21659 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021660
21661
21662cat >>confdefs.h <<\_ACEOF
21663#define HAVE_UCS4_TCL 1
21664_ACEOF
21665
21666 have_ucs4_tcl=yes
21667
21668else
21669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021670sed 's/^/| /' conftest.$ac_ext >&5
21671
Martin v. Löwiseba40652007-08-30 20:10:57 +000021672
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021674
21675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21676{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21677echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021678
Skip Montanaro6dead952003-09-25 14:50:04 +000021679# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021680if test "$wchar_h" = yes
21681then
21682 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021683 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21684echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021685 if test "${ac_cv_wchar_t_signed+set}" = set; then
21686 echo $ECHO_N "(cached) $ECHO_C" >&6
21687else
21688
21689 if test "$cross_compiling" = yes; then
21690 ac_cv_wchar_t_signed=yes
21691else
21692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021693/* confdefs.h. */
21694_ACEOF
21695cat confdefs.h >>conftest.$ac_ext
21696cat >>conftest.$ac_ext <<_ACEOF
21697/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021698
21699 #include <wchar.h>
21700 int main()
21701 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021702 /* Success: exit code 0 */
21703 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021704 }
21705
21706_ACEOF
21707rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021708if { (ac_try="$ac_link"
21709case "(($ac_try" in
21710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21711 *) ac_try_echo=$ac_try;;
21712esac
21713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21714 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021715 ac_status=$?
21716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021718 { (case "(($ac_try" in
21719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21720 *) ac_try_echo=$ac_try;;
21721esac
21722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21723 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021724 ac_status=$?
21725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21726 (exit $ac_status); }; }; then
21727 ac_cv_wchar_t_signed=yes
21728else
21729 echo "$as_me: program exited with status $ac_status" >&5
21730echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021731sed 's/^/| /' conftest.$ac_ext >&5
21732
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021733( exit $ac_status )
21734ac_cv_wchar_t_signed=no
21735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021736rm -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 +000021737fi
21738
Martin v. Löwiseba40652007-08-30 20:10:57 +000021739
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021740fi
21741
Martin v. Löwiseba40652007-08-30 20:10:57 +000021742 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21743echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21744fi
21745
21746{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21747echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21748# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021749if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021750 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021751else
21752 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021753fi
21754
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021755
21756if test $enable_unicode = yes
21757then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021758 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021759 case "$have_ucs4_tcl" in
21760 yes) enable_unicode="ucs4"
21761 ;;
21762 *) enable_unicode="ucs2"
21763 ;;
21764 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021765fi
21766
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021767
21768
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021769case "$enable_unicode" in
21770ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021771 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021772#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021773_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021774
21775 ;;
21776ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021777 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021778#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021779_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021780
21781 ;;
21782esac
21783
Michael W. Hudson54241132001-12-07 15:38:26 +000021784
Martin v. Löwis11437992002-04-12 09:54:03 +000021785
21786
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021787
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021788if test "$enable_unicode" = "no"
21789then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021790 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021791 { echo "$as_me:$LINENO: result: not used" >&5
21792echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021793else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021794 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021795
21796cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021797#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021798_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021799
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021800
21801 # wchar_t is only usable if it maps to an unsigned type
21802 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021803 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021804 then
21805 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021806
Martin v. Löwis11437992002-04-12 09:54:03 +000021807cat >>confdefs.h <<\_ACEOF
21808#define HAVE_USABLE_WCHAR_T 1
21809_ACEOF
21810
21811 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021812#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021813_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021814
21815 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21816 then
21817 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021818 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021819#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021820_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021821
21822 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21823 then
21824 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021825 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021826#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021827_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021828
21829 else
21830 PY_UNICODE_TYPE="no type found"
21831 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021832 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21833echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021834fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021835
21836# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021837{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21838echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021839if test "${ac_cv_c_bigendian+set}" = set; then
21840 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021841else
Martin v. Löwis11437992002-04-12 09:54:03 +000021842 # See if sys/param.h defines the BYTE_ORDER macro.
21843cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021844/* confdefs.h. */
21845_ACEOF
21846cat confdefs.h >>conftest.$ac_ext
21847cat >>conftest.$ac_ext <<_ACEOF
21848/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021849#include <sys/types.h>
21850#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021851
Martin v. Löwis11437992002-04-12 09:54:03 +000021852int
21853main ()
21854{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021855#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21856 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021857 bogus endian macros
21858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021859
21860 ;
21861 return 0;
21862}
21863_ACEOF
21864rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021865if { (ac_try="$ac_compile"
21866case "(($ac_try" in
21867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21868 *) ac_try_echo=$ac_try;;
21869esac
21870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21871 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021873 grep -v '^ *+' conftest.er1 >conftest.err
21874 rm -f conftest.er1
21875 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021877 (exit $ac_status); } && {
21878 test -z "$ac_c_werror_flag" ||
21879 test ! -s conftest.err
21880 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021881 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021882cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021883/* confdefs.h. */
21884_ACEOF
21885cat confdefs.h >>conftest.$ac_ext
21886cat >>conftest.$ac_ext <<_ACEOF
21887/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021888#include <sys/types.h>
21889#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021890
Martin v. Löwis11437992002-04-12 09:54:03 +000021891int
21892main ()
21893{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021894#if BYTE_ORDER != BIG_ENDIAN
21895 not big endian
21896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021897
21898 ;
21899 return 0;
21900}
21901_ACEOF
21902rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021903if { (ac_try="$ac_compile"
21904case "(($ac_try" in
21905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21906 *) ac_try_echo=$ac_try;;
21907esac
21908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021911 grep -v '^ *+' conftest.er1 >conftest.err
21912 rm -f conftest.er1
21913 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021915 (exit $ac_status); } && {
21916 test -z "$ac_c_werror_flag" ||
21917 test ! -s conftest.err
21918 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021919 ac_cv_c_bigendian=yes
21920else
Martin v. Löwis11437992002-04-12 09:54:03 +000021921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021922sed 's/^/| /' conftest.$ac_ext >&5
21923
Martin v. Löwiseba40652007-08-30 20:10:57 +000021924 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021926
21927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021928else
Martin v. Löwis11437992002-04-12 09:54:03 +000021929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021930sed 's/^/| /' conftest.$ac_ext >&5
21931
Martin v. Löwiseba40652007-08-30 20:10:57 +000021932 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000021933if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021934 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000021935 ac_cv_c_bigendian=unknown
21936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021937/* confdefs.h. */
21938_ACEOF
21939cat confdefs.h >>conftest.$ac_ext
21940cat >>conftest.$ac_ext <<_ACEOF
21941/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021942short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
21943short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021944void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021945short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
21946short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021947void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021948int
21949main ()
21950{
21951 _ascii (); _ebcdic ();
21952 ;
21953 return 0;
21954}
21955_ACEOF
21956rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021957if { (ac_try="$ac_compile"
21958case "(($ac_try" in
21959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21960 *) ac_try_echo=$ac_try;;
21961esac
21962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21963 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021965 grep -v '^ *+' conftest.er1 >conftest.err
21966 rm -f conftest.er1
21967 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021969 (exit $ac_status); } && {
21970 test -z "$ac_c_werror_flag" ||
21971 test ! -s conftest.err
21972 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021973 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021974 ac_cv_c_bigendian=yes
21975fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021976if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021977 if test "$ac_cv_c_bigendian" = unknown; then
21978 ac_cv_c_bigendian=no
21979 else
21980 # finding both strings is unlikely to happen, but who knows?
21981 ac_cv_c_bigendian=unknown
21982 fi
21983fi
21984else
21985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021986sed 's/^/| /' conftest.$ac_ext >&5
21987
Martin v. Löwiseba40652007-08-30 20:10:57 +000021988
Martin v. Löwis11437992002-04-12 09:54:03 +000021989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021990
21991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021992else
21993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021994/* confdefs.h. */
21995_ACEOF
21996cat confdefs.h >>conftest.$ac_ext
21997cat >>conftest.$ac_ext <<_ACEOF
21998/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021999$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022000int
22001main ()
22002{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022003
Guido van Rossumef2255b2000-03-10 22:30:29 +000022004 /* Are we little or big endian? From Harbison&Steele. */
22005 union
22006 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022007 long int l;
22008 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022009 } u;
22010 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022011 return u.c[sizeof (long int) - 1] == 1;
22012
22013 ;
22014 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022015}
Martin v. Löwis11437992002-04-12 09:54:03 +000022016_ACEOF
22017rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022018if { (ac_try="$ac_link"
22019case "(($ac_try" in
22020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22021 *) ac_try_echo=$ac_try;;
22022esac
22023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22024 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022025 ac_status=$?
22026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022028 { (case "(($ac_try" in
22029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22030 *) ac_try_echo=$ac_try;;
22031esac
22032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22033 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022034 ac_status=$?
22035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22036 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022037 ac_cv_c_bigendian=no
22038else
Martin v. Löwis11437992002-04-12 09:54:03 +000022039 echo "$as_me: program exited with status $ac_status" >&5
22040echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022041sed 's/^/| /' conftest.$ac_ext >&5
22042
Martin v. Löwis11437992002-04-12 09:54:03 +000022043( exit $ac_status )
22044ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022046rm -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 +000022047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022048
22049
Martin v. Löwis11437992002-04-12 09:54:03 +000022050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022051
22052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022054{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22055echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022056case $ac_cv_c_bigendian in
22057 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022058
Martin v. Löwis11437992002-04-12 09:54:03 +000022059cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022060#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022061_ACEOF
22062 ;;
22063 no)
22064 ;;
22065 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022066 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022067presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022068echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022069presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22070 { (exit 1); exit 1; }; } ;;
22071esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022072
Michael W. Hudson54241132001-12-07 15:38:26 +000022073
Ronald Oussoren988117f2006-04-29 11:31:35 +000022074
22075
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022076# Check whether right shifting a negative integer extends the sign bit
22077# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022078{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22079echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022080if test "${ac_cv_rshift_extends_sign+set}" = set; then
22081 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022082else
Martin v. Löwis11437992002-04-12 09:54:03 +000022083
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022084if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022085 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022086else
Martin v. Löwis11437992002-04-12 09:54:03 +000022087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022088/* confdefs.h. */
22089_ACEOF
22090cat confdefs.h >>conftest.$ac_ext
22091cat >>conftest.$ac_ext <<_ACEOF
22092/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022093
22094int main()
22095{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022096 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022097}
22098
Martin v. Löwis11437992002-04-12 09:54:03 +000022099_ACEOF
22100rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022101if { (ac_try="$ac_link"
22102case "(($ac_try" in
22103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22104 *) ac_try_echo=$ac_try;;
22105esac
22106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22107 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022108 ac_status=$?
22109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22110 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022111 { (case "(($ac_try" in
22112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22113 *) ac_try_echo=$ac_try;;
22114esac
22115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22116 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022117 ac_status=$?
22118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22119 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022120 ac_cv_rshift_extends_sign=yes
22121else
Martin v. Löwis11437992002-04-12 09:54:03 +000022122 echo "$as_me: program exited with status $ac_status" >&5
22123echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022124sed 's/^/| /' conftest.$ac_ext >&5
22125
Martin v. Löwis11437992002-04-12 09:54:03 +000022126( exit $ac_status )
22127ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022129rm -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 +000022130fi
22131
Martin v. Löwiseba40652007-08-30 20:10:57 +000022132
22133fi
22134
22135{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22136echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022137if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022138then
Martin v. Löwis11437992002-04-12 09:54:03 +000022139
22140cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022141#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022142_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022143
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022144fi
22145
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022146# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022147{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22148echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022149if test "${ac_cv_have_getc_unlocked+set}" = set; then
22150 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022151else
Martin v. Löwis11437992002-04-12 09:54:03 +000022152
22153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022154/* confdefs.h. */
22155_ACEOF
22156cat confdefs.h >>conftest.$ac_ext
22157cat >>conftest.$ac_ext <<_ACEOF
22158/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022159#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022160int
22161main ()
22162{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022163
22164 FILE *f = fopen("/dev/null", "r");
22165 flockfile(f);
22166 getc_unlocked(f);
22167 funlockfile(f);
22168
Martin v. Löwis11437992002-04-12 09:54:03 +000022169 ;
22170 return 0;
22171}
22172_ACEOF
22173rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022174if { (ac_try="$ac_link"
22175case "(($ac_try" in
22176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22177 *) ac_try_echo=$ac_try;;
22178esac
22179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22180 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022182 grep -v '^ *+' conftest.er1 >conftest.err
22183 rm -f conftest.er1
22184 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022186 (exit $ac_status); } && {
22187 test -z "$ac_c_werror_flag" ||
22188 test ! -s conftest.err
22189 } && test -s conftest$ac_exeext &&
22190 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022191 ac_cv_have_getc_unlocked=yes
22192else
Martin v. Löwis11437992002-04-12 09:54:03 +000022193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022194sed 's/^/| /' conftest.$ac_ext >&5
22195
Martin v. Löwiseba40652007-08-30 20:10:57 +000022196 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022198
22199rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022200 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022201fi
22202
Martin v. Löwiseba40652007-08-30 20:10:57 +000022203{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22204echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022205if test "$ac_cv_have_getc_unlocked" = yes
22206then
Martin v. Löwis11437992002-04-12 09:54:03 +000022207
22208cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022209#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022210_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022211
22212fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022213
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022214# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022215# save the value of LIBS so we don't actually link Python with readline
22216LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022217
Martin v. Löwiseba40652007-08-30 20:10:57 +000022218{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22219echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022220if test "${ac_cv_lib_readline_readline+set}" = set; then
22221 echo $ECHO_N "(cached) $ECHO_C" >&6
22222else
22223 ac_check_lib_save_LIBS=$LIBS
22224LIBS="-lreadline $LIBS"
22225cat >conftest.$ac_ext <<_ACEOF
22226/* confdefs.h. */
22227_ACEOF
22228cat confdefs.h >>conftest.$ac_ext
22229cat >>conftest.$ac_ext <<_ACEOF
22230/* end confdefs.h. */
22231
Martin v. Löwiseba40652007-08-30 20:10:57 +000022232/* Override any GCC internal prototype to avoid an error.
22233 Use char because int might match the return type of a GCC
22234 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022235#ifdef __cplusplus
22236extern "C"
22237#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022238char readline ();
22239int
22240main ()
22241{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022242return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022243 ;
22244 return 0;
22245}
22246_ACEOF
22247rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022248if { (ac_try="$ac_link"
22249case "(($ac_try" in
22250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22251 *) ac_try_echo=$ac_try;;
22252esac
22253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22254 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022255 ac_status=$?
22256 grep -v '^ *+' conftest.er1 >conftest.err
22257 rm -f conftest.er1
22258 cat conftest.err >&5
22259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022260 (exit $ac_status); } && {
22261 test -z "$ac_c_werror_flag" ||
22262 test ! -s conftest.err
22263 } && test -s conftest$ac_exeext &&
22264 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022265 ac_cv_lib_readline_readline=yes
22266else
22267 echo "$as_me: failed program was:" >&5
22268sed 's/^/| /' conftest.$ac_ext >&5
22269
Martin v. Löwiseba40652007-08-30 20:10:57 +000022270 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022272
22273rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022274 conftest$ac_exeext conftest.$ac_ext
22275LIBS=$ac_check_lib_save_LIBS
22276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022277{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22278echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022279if test $ac_cv_lib_readline_readline = yes; then
22280 cat >>confdefs.h <<_ACEOF
22281#define HAVE_LIBREADLINE 1
22282_ACEOF
22283
22284 LIBS="-lreadline $LIBS"
22285
22286fi
22287
22288if test "$ac_cv_have_readline_readline" = no
22289then
22290
Martin v. Löwiseba40652007-08-30 20:10:57 +000022291{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22292echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022293if test "${ac_cv_lib_termcap_readline+set}" = set; then
22294 echo $ECHO_N "(cached) $ECHO_C" >&6
22295else
22296 ac_check_lib_save_LIBS=$LIBS
22297LIBS="-ltermcap $LIBS"
22298cat >conftest.$ac_ext <<_ACEOF
22299/* confdefs.h. */
22300_ACEOF
22301cat confdefs.h >>conftest.$ac_ext
22302cat >>conftest.$ac_ext <<_ACEOF
22303/* end confdefs.h. */
22304
Martin v. Löwiseba40652007-08-30 20:10:57 +000022305/* Override any GCC internal prototype to avoid an error.
22306 Use char because int might match the return type of a GCC
22307 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022308#ifdef __cplusplus
22309extern "C"
22310#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022311char readline ();
22312int
22313main ()
22314{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022315return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022316 ;
22317 return 0;
22318}
22319_ACEOF
22320rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022321if { (ac_try="$ac_link"
22322case "(($ac_try" in
22323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22324 *) ac_try_echo=$ac_try;;
22325esac
22326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22327 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022328 ac_status=$?
22329 grep -v '^ *+' conftest.er1 >conftest.err
22330 rm -f conftest.er1
22331 cat conftest.err >&5
22332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022333 (exit $ac_status); } && {
22334 test -z "$ac_c_werror_flag" ||
22335 test ! -s conftest.err
22336 } && test -s conftest$ac_exeext &&
22337 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022338 ac_cv_lib_termcap_readline=yes
22339else
22340 echo "$as_me: failed program was:" >&5
22341sed 's/^/| /' conftest.$ac_ext >&5
22342
Martin v. Löwiseba40652007-08-30 20:10:57 +000022343 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022345
22346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022347 conftest$ac_exeext conftest.$ac_ext
22348LIBS=$ac_check_lib_save_LIBS
22349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022350{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22351echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022352if test $ac_cv_lib_termcap_readline = yes; then
22353 cat >>confdefs.h <<_ACEOF
22354#define HAVE_LIBTERMCAP 1
22355_ACEOF
22356
22357 LIBS="-ltermcap $LIBS"
22358
22359fi
22360
22361fi
22362
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022363# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022364{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22365echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022366if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22367 echo $ECHO_N "(cached) $ECHO_C" >&6
22368else
22369 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022370LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022371cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022372/* confdefs.h. */
22373_ACEOF
22374cat confdefs.h >>conftest.$ac_ext
22375cat >>conftest.$ac_ext <<_ACEOF
22376/* end confdefs.h. */
22377
Martin v. Löwiseba40652007-08-30 20:10:57 +000022378/* Override any GCC internal prototype to avoid an error.
22379 Use char because int might match the return type of a GCC
22380 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022381#ifdef __cplusplus
22382extern "C"
22383#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022384char rl_callback_handler_install ();
22385int
22386main ()
22387{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022388return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022389 ;
22390 return 0;
22391}
22392_ACEOF
22393rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022394if { (ac_try="$ac_link"
22395case "(($ac_try" in
22396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22397 *) ac_try_echo=$ac_try;;
22398esac
22399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22400 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022402 grep -v '^ *+' conftest.er1 >conftest.err
22403 rm -f conftest.er1
22404 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022406 (exit $ac_status); } && {
22407 test -z "$ac_c_werror_flag" ||
22408 test ! -s conftest.err
22409 } && test -s conftest$ac_exeext &&
22410 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022411 ac_cv_lib_readline_rl_callback_handler_install=yes
22412else
22413 echo "$as_me: failed program was:" >&5
22414sed 's/^/| /' conftest.$ac_ext >&5
22415
Martin v. Löwiseba40652007-08-30 20:10:57 +000022416 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022418
22419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022420 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022421LIBS=$ac_check_lib_save_LIBS
22422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022423{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22424echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022425if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22426
22427cat >>confdefs.h <<\_ACEOF
22428#define HAVE_RL_CALLBACK 1
22429_ACEOF
22430
22431fi
22432
22433
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022434# check for readline 2.2
22435cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022436/* confdefs.h. */
22437_ACEOF
22438cat confdefs.h >>conftest.$ac_ext
22439cat >>conftest.$ac_ext <<_ACEOF
22440/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022441#include <readline/readline.h>
22442_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022443if { (ac_try="$ac_cpp conftest.$ac_ext"
22444case "(($ac_try" in
22445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22446 *) ac_try_echo=$ac_try;;
22447esac
22448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22449 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022450 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022451 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022452 rm -f conftest.er1
22453 cat conftest.err >&5
22454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022455 (exit $ac_status); } >/dev/null && {
22456 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22457 test ! -s conftest.err
22458 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022459 have_readline=yes
22460else
22461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022462sed 's/^/| /' conftest.$ac_ext >&5
22463
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022464 have_readline=no
22465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022466
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022467rm -f conftest.err conftest.$ac_ext
22468if test $have_readline = yes
22469then
22470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022471/* confdefs.h. */
22472_ACEOF
22473cat confdefs.h >>conftest.$ac_ext
22474cat >>conftest.$ac_ext <<_ACEOF
22475/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022476#include <readline/readline.h>
22477
22478_ACEOF
22479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022480 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022481
22482cat >>confdefs.h <<\_ACEOF
22483#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22484_ACEOF
22485
22486fi
22487rm -f conftest*
22488
22489fi
22490
Martin v. Löwis0daad592001-09-30 21:09:59 +000022491# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022492{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22493echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022494if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22495 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022496else
Martin v. Löwis11437992002-04-12 09:54:03 +000022497 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022498LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022500/* confdefs.h. */
22501_ACEOF
22502cat confdefs.h >>conftest.$ac_ext
22503cat >>conftest.$ac_ext <<_ACEOF
22504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022505
Martin v. Löwiseba40652007-08-30 20:10:57 +000022506/* Override any GCC internal prototype to avoid an error.
22507 Use char because int might match the return type of a GCC
22508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022509#ifdef __cplusplus
22510extern "C"
22511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022512char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022513int
22514main ()
22515{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022516return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022517 ;
22518 return 0;
22519}
22520_ACEOF
22521rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022522if { (ac_try="$ac_link"
22523case "(($ac_try" in
22524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22525 *) ac_try_echo=$ac_try;;
22526esac
22527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022530 grep -v '^ *+' conftest.er1 >conftest.err
22531 rm -f conftest.er1
22532 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022534 (exit $ac_status); } && {
22535 test -z "$ac_c_werror_flag" ||
22536 test ! -s conftest.err
22537 } && test -s conftest$ac_exeext &&
22538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022539 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022540else
Martin v. Löwis11437992002-04-12 09:54:03 +000022541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022542sed 's/^/| /' conftest.$ac_ext >&5
22543
Martin v. Löwiseba40652007-08-30 20:10:57 +000022544 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022546
22547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022549LIBS=$ac_check_lib_save_LIBS
22550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022551{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22552echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022553if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022554
Martin v. Löwis11437992002-04-12 09:54:03 +000022555cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022556#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022557_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022558
Martin v. Löwis0daad592001-09-30 21:09:59 +000022559fi
22560
Michael W. Hudson54241132001-12-07 15:38:26 +000022561
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022562# also in 4.0
22563{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22564echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22565if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22566 echo $ECHO_N "(cached) $ECHO_C" >&6
22567else
22568 ac_check_lib_save_LIBS=$LIBS
22569LIBS="-lreadline $LIBS"
22570cat >conftest.$ac_ext <<_ACEOF
22571/* confdefs.h. */
22572_ACEOF
22573cat confdefs.h >>conftest.$ac_ext
22574cat >>conftest.$ac_ext <<_ACEOF
22575/* end confdefs.h. */
22576
22577/* Override any GCC internal prototype to avoid an error.
22578 Use char because int might match the return type of a GCC
22579 builtin and then its argument prototype would still apply. */
22580#ifdef __cplusplus
22581extern "C"
22582#endif
22583char rl_completion_display_matches_hook ();
22584int
22585main ()
22586{
22587return rl_completion_display_matches_hook ();
22588 ;
22589 return 0;
22590}
22591_ACEOF
22592rm -f conftest.$ac_objext conftest$ac_exeext
22593if { (ac_try="$ac_link"
22594case "(($ac_try" in
22595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22596 *) ac_try_echo=$ac_try;;
22597esac
22598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22599 (eval "$ac_link") 2>conftest.er1
22600 ac_status=$?
22601 grep -v '^ *+' conftest.er1 >conftest.err
22602 rm -f conftest.er1
22603 cat conftest.err >&5
22604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22605 (exit $ac_status); } && {
22606 test -z "$ac_c_werror_flag" ||
22607 test ! -s conftest.err
22608 } && test -s conftest$ac_exeext &&
22609 $as_test_x conftest$ac_exeext; then
22610 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22611else
22612 echo "$as_me: failed program was:" >&5
22613sed 's/^/| /' conftest.$ac_ext >&5
22614
22615 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22616fi
22617
22618rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22619 conftest$ac_exeext conftest.$ac_ext
22620LIBS=$ac_check_lib_save_LIBS
22621fi
22622{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22623echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22624if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22625
22626cat >>confdefs.h <<\_ACEOF
22627#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22628_ACEOF
22629
22630fi
22631
22632
Martin v. Löwis0daad592001-09-30 21:09:59 +000022633# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022634{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22635echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022636if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22637 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022638else
Martin v. Löwis11437992002-04-12 09:54:03 +000022639 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022640LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022641cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022642/* confdefs.h. */
22643_ACEOF
22644cat confdefs.h >>conftest.$ac_ext
22645cat >>conftest.$ac_ext <<_ACEOF
22646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022647
Martin v. Löwiseba40652007-08-30 20:10:57 +000022648/* Override any GCC internal prototype to avoid an error.
22649 Use char because int might match the return type of a GCC
22650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022651#ifdef __cplusplus
22652extern "C"
22653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022654char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022655int
22656main ()
22657{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022658return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022659 ;
22660 return 0;
22661}
22662_ACEOF
22663rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022664if { (ac_try="$ac_link"
22665case "(($ac_try" in
22666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22667 *) ac_try_echo=$ac_try;;
22668esac
22669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22670 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022672 grep -v '^ *+' conftest.er1 >conftest.err
22673 rm -f conftest.er1
22674 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022676 (exit $ac_status); } && {
22677 test -z "$ac_c_werror_flag" ||
22678 test ! -s conftest.err
22679 } && test -s conftest$ac_exeext &&
22680 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022681 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022682else
Martin v. Löwis11437992002-04-12 09:54:03 +000022683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022684sed 's/^/| /' conftest.$ac_ext >&5
22685
Martin v. Löwiseba40652007-08-30 20:10:57 +000022686 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022688
22689rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022691LIBS=$ac_check_lib_save_LIBS
22692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022693{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22694echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022695if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022696
Martin v. Löwis11437992002-04-12 09:54:03 +000022697cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022698#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022699_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022700
Guido van Rossum353ae582001-07-10 16:45:32 +000022701fi
22702
Jack Jansendd19cf82001-12-06 22:36:17 +000022703
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022704# also in readline 4.2
22705cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022706/* confdefs.h. */
22707_ACEOF
22708cat confdefs.h >>conftest.$ac_ext
22709cat >>conftest.$ac_ext <<_ACEOF
22710/* end confdefs.h. */
22711#include <readline/readline.h>
22712_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022713if { (ac_try="$ac_cpp conftest.$ac_ext"
22714case "(($ac_try" in
22715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22716 *) ac_try_echo=$ac_try;;
22717esac
22718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22719 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022720 ac_status=$?
22721 grep -v '^ *+' conftest.er1 >conftest.err
22722 rm -f conftest.er1
22723 cat conftest.err >&5
22724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022725 (exit $ac_status); } >/dev/null && {
22726 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22727 test ! -s conftest.err
22728 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022729 have_readline=yes
22730else
22731 echo "$as_me: failed program was:" >&5
22732sed 's/^/| /' conftest.$ac_ext >&5
22733
22734 have_readline=no
22735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022736
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022737rm -f conftest.err conftest.$ac_ext
22738if test $have_readline = yes
22739then
22740 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022741/* confdefs.h. */
22742_ACEOF
22743cat confdefs.h >>conftest.$ac_ext
22744cat >>conftest.$ac_ext <<_ACEOF
22745/* end confdefs.h. */
22746#include <readline/readline.h>
22747
22748_ACEOF
22749if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22750 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22751
22752cat >>confdefs.h <<\_ACEOF
22753#define HAVE_RL_CATCH_SIGNAL 1
22754_ACEOF
22755
22756fi
22757rm -f conftest*
22758
22759fi
22760
Martin v. Löwis82bca632006-02-10 20:49:30 +000022761# End of readline checks: restore LIBS
22762LIBS=$LIBS_no_readline
22763
Martin v. Löwiseba40652007-08-30 20:10:57 +000022764{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22765echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022766if test "${ac_cv_broken_nice+set}" = set; then
22767 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022768else
Martin v. Löwis11437992002-04-12 09:54:03 +000022769
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022770if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022771 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022772else
Martin v. Löwis11437992002-04-12 09:54:03 +000022773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022774/* confdefs.h. */
22775_ACEOF
22776cat confdefs.h >>conftest.$ac_ext
22777cat >>conftest.$ac_ext <<_ACEOF
22778/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022779
22780int main()
22781{
22782 int val1 = nice(1);
22783 if (val1 != -1 && val1 == nice(2))
22784 exit(0);
22785 exit(1);
22786}
22787
Martin v. Löwis11437992002-04-12 09:54:03 +000022788_ACEOF
22789rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022790if { (ac_try="$ac_link"
22791case "(($ac_try" in
22792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22793 *) ac_try_echo=$ac_try;;
22794esac
22795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22796 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022797 ac_status=$?
22798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022800 { (case "(($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_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022806 ac_status=$?
22807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22808 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022809 ac_cv_broken_nice=yes
22810else
Martin v. Löwis11437992002-04-12 09:54:03 +000022811 echo "$as_me: program exited with status $ac_status" >&5
22812echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022813sed 's/^/| /' conftest.$ac_ext >&5
22814
Martin v. Löwis11437992002-04-12 09:54:03 +000022815( exit $ac_status )
22816ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022818rm -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 +000022819fi
22820
Martin v. Löwiseba40652007-08-30 20:10:57 +000022821
22822fi
22823
22824{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22825echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022826if test "$ac_cv_broken_nice" = yes
22827then
Martin v. Löwis11437992002-04-12 09:54:03 +000022828
22829cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022830#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022831_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022832
22833fi
22834
Martin v. Löwiseba40652007-08-30 20:10:57 +000022835{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22836echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022837if test "$cross_compiling" = yes; then
22838 ac_cv_broken_poll=no
22839else
22840 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022841/* confdefs.h. */
22842_ACEOF
22843cat confdefs.h >>conftest.$ac_ext
22844cat >>conftest.$ac_ext <<_ACEOF
22845/* end confdefs.h. */
22846
22847#include <poll.h>
22848
22849int main (void)
22850 {
22851 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22852
22853 close (42);
22854
22855 int poll_test = poll (&poll_struct, 1, 0);
22856
22857 if (poll_test < 0)
22858 {
22859 exit(0);
22860 }
22861 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22862 {
22863 exit(0);
22864 }
22865 else
22866 {
22867 exit(1);
22868 }
22869 }
22870
22871_ACEOF
22872rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022873if { (ac_try="$ac_link"
22874case "(($ac_try" in
22875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22876 *) ac_try_echo=$ac_try;;
22877esac
22878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22879 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022880 ac_status=$?
22881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22882 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022883 { (case "(($ac_try" in
22884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22885 *) ac_try_echo=$ac_try;;
22886esac
22887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22888 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022889 ac_status=$?
22890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22891 (exit $ac_status); }; }; then
22892 ac_cv_broken_poll=yes
22893else
22894 echo "$as_me: program exited with status $ac_status" >&5
22895echo "$as_me: failed program was:" >&5
22896sed 's/^/| /' conftest.$ac_ext >&5
22897
22898( exit $ac_status )
22899ac_cv_broken_poll=no
22900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022901rm -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 +000022902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022903
22904
22905{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
22906echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022907if test "$ac_cv_broken_poll" = yes
22908then
22909
22910cat >>confdefs.h <<\_ACEOF
22911#define HAVE_BROKEN_POLL 1
22912_ACEOF
22913
22914fi
22915
Brett Cannon43802422005-02-10 20:48:03 +000022916# 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 +000022917# (which is not required by ISO C or UNIX spec) and/or if we support
22918# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000022919{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
22920echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022921if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
22922 echo $ECHO_N "(cached) $ECHO_C" >&6
22923else
22924 cat >conftest.$ac_ext <<_ACEOF
22925/* confdefs.h. */
22926_ACEOF
22927cat confdefs.h >>conftest.$ac_ext
22928cat >>conftest.$ac_ext <<_ACEOF
22929/* end confdefs.h. */
22930#include <sys/types.h>
22931#include <$ac_cv_struct_tm>
22932
22933
22934int
22935main ()
22936{
22937static struct tm ac_aggr;
22938if (ac_aggr.tm_zone)
22939return 0;
22940 ;
22941 return 0;
22942}
22943_ACEOF
22944rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022945if { (ac_try="$ac_compile"
22946case "(($ac_try" in
22947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22948 *) ac_try_echo=$ac_try;;
22949esac
22950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22951 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022952 ac_status=$?
22953 grep -v '^ *+' conftest.er1 >conftest.err
22954 rm -f conftest.er1
22955 cat conftest.err >&5
22956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022957 (exit $ac_status); } && {
22958 test -z "$ac_c_werror_flag" ||
22959 test ! -s conftest.err
22960 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022961 ac_cv_member_struct_tm_tm_zone=yes
22962else
22963 echo "$as_me: failed program was:" >&5
22964sed 's/^/| /' conftest.$ac_ext >&5
22965
Martin v. Löwiseba40652007-08-30 20:10:57 +000022966 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000022967/* confdefs.h. */
22968_ACEOF
22969cat confdefs.h >>conftest.$ac_ext
22970cat >>conftest.$ac_ext <<_ACEOF
22971/* end confdefs.h. */
22972#include <sys/types.h>
22973#include <$ac_cv_struct_tm>
22974
22975
22976int
22977main ()
22978{
22979static struct tm ac_aggr;
22980if (sizeof ac_aggr.tm_zone)
22981return 0;
22982 ;
22983 return 0;
22984}
22985_ACEOF
22986rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022987if { (ac_try="$ac_compile"
22988case "(($ac_try" in
22989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22990 *) ac_try_echo=$ac_try;;
22991esac
22992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22993 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022994 ac_status=$?
22995 grep -v '^ *+' conftest.er1 >conftest.err
22996 rm -f conftest.er1
22997 cat conftest.err >&5
22998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022999 (exit $ac_status); } && {
23000 test -z "$ac_c_werror_flag" ||
23001 test ! -s conftest.err
23002 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023003 ac_cv_member_struct_tm_tm_zone=yes
23004else
23005 echo "$as_me: failed program was:" >&5
23006sed 's/^/| /' conftest.$ac_ext >&5
23007
Martin v. Löwiseba40652007-08-30 20:10:57 +000023008 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023010
23011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023013
23014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023016{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23017echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023018if test $ac_cv_member_struct_tm_tm_zone = yes; then
23019
23020cat >>confdefs.h <<_ACEOF
23021#define HAVE_STRUCT_TM_TM_ZONE 1
23022_ACEOF
23023
23024
23025fi
23026
23027if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23028
23029cat >>confdefs.h <<\_ACEOF
23030#define HAVE_TM_ZONE 1
23031_ACEOF
23032
23033else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023034 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23035echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23036if test "${ac_cv_have_decl_tzname+set}" = set; then
23037 echo $ECHO_N "(cached) $ECHO_C" >&6
23038else
23039 cat >conftest.$ac_ext <<_ACEOF
23040/* confdefs.h. */
23041_ACEOF
23042cat confdefs.h >>conftest.$ac_ext
23043cat >>conftest.$ac_ext <<_ACEOF
23044/* end confdefs.h. */
23045#include <time.h>
23046
23047int
23048main ()
23049{
23050#ifndef tzname
23051 (void) tzname;
23052#endif
23053
23054 ;
23055 return 0;
23056}
23057_ACEOF
23058rm -f conftest.$ac_objext
23059if { (ac_try="$ac_compile"
23060case "(($ac_try" in
23061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23062 *) ac_try_echo=$ac_try;;
23063esac
23064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23065 (eval "$ac_compile") 2>conftest.er1
23066 ac_status=$?
23067 grep -v '^ *+' conftest.er1 >conftest.err
23068 rm -f conftest.er1
23069 cat conftest.err >&5
23070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23071 (exit $ac_status); } && {
23072 test -z "$ac_c_werror_flag" ||
23073 test ! -s conftest.err
23074 } && test -s conftest.$ac_objext; then
23075 ac_cv_have_decl_tzname=yes
23076else
23077 echo "$as_me: failed program was:" >&5
23078sed 's/^/| /' conftest.$ac_ext >&5
23079
23080 ac_cv_have_decl_tzname=no
23081fi
23082
23083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23084fi
23085{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23086echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23087if test $ac_cv_have_decl_tzname = yes; then
23088
23089cat >>confdefs.h <<_ACEOF
23090#define HAVE_DECL_TZNAME 1
23091_ACEOF
23092
23093
23094else
23095 cat >>confdefs.h <<_ACEOF
23096#define HAVE_DECL_TZNAME 0
23097_ACEOF
23098
23099
23100fi
23101
23102
23103 { echo "$as_me:$LINENO: checking for tzname" >&5
23104echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023105if test "${ac_cv_var_tzname+set}" = set; then
23106 echo $ECHO_N "(cached) $ECHO_C" >&6
23107else
23108 cat >conftest.$ac_ext <<_ACEOF
23109/* confdefs.h. */
23110_ACEOF
23111cat confdefs.h >>conftest.$ac_ext
23112cat >>conftest.$ac_ext <<_ACEOF
23113/* end confdefs.h. */
23114#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023115#if !HAVE_DECL_TZNAME
23116extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023117#endif
23118
23119int
23120main ()
23121{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023122return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023123 ;
23124 return 0;
23125}
23126_ACEOF
23127rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023128if { (ac_try="$ac_link"
23129case "(($ac_try" in
23130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23131 *) ac_try_echo=$ac_try;;
23132esac
23133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23134 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023135 ac_status=$?
23136 grep -v '^ *+' conftest.er1 >conftest.err
23137 rm -f conftest.er1
23138 cat conftest.err >&5
23139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023140 (exit $ac_status); } && {
23141 test -z "$ac_c_werror_flag" ||
23142 test ! -s conftest.err
23143 } && test -s conftest$ac_exeext &&
23144 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023145 ac_cv_var_tzname=yes
23146else
23147 echo "$as_me: failed program was:" >&5
23148sed 's/^/| /' conftest.$ac_ext >&5
23149
Martin v. Löwiseba40652007-08-30 20:10:57 +000023150 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023152
23153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023154 conftest$ac_exeext conftest.$ac_ext
23155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023156{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23157echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023158 if test $ac_cv_var_tzname = yes; then
23159
23160cat >>confdefs.h <<\_ACEOF
23161#define HAVE_TZNAME 1
23162_ACEOF
23163
23164 fi
23165fi
23166
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023167
Martin v. Löwis1d459062005-03-14 21:23:33 +000023168# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023169{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23170echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023171if test "${ac_cv_working_tzset+set}" = set; then
23172 echo $ECHO_N "(cached) $ECHO_C" >&6
23173else
23174
23175if test "$cross_compiling" = yes; then
23176 ac_cv_working_tzset=no
23177else
23178 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023179/* confdefs.h. */
23180_ACEOF
23181cat confdefs.h >>conftest.$ac_ext
23182cat >>conftest.$ac_ext <<_ACEOF
23183/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023184
23185#include <stdlib.h>
23186#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023187#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023188
23189#if HAVE_TZNAME
23190extern char *tzname[];
23191#endif
23192
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023193int main()
23194{
Brett Cannon18367812003-09-19 00:59:16 +000023195 /* Note that we need to ensure that not only does tzset(3)
23196 do 'something' with localtime, but it works as documented
23197 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023198 This includes making sure that tzname is set properly if
23199 tm->tm_zone does not exist since it is the alternative way
23200 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023201
23202 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023203 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023204 */
23205
Martin v. Löwis1d459062005-03-14 21:23:33 +000023206 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023207 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23208
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023209 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023210 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023211 if (localtime(&groundhogday)->tm_hour != 0)
23212 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023213#if HAVE_TZNAME
23214 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23215 if (strcmp(tzname[0], "UTC") ||
23216 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23217 exit(1);
23218#endif
Brett Cannon18367812003-09-19 00:59:16 +000023219
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023220 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023221 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023222 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023223 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023224#if HAVE_TZNAME
23225 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23226 exit(1);
23227#endif
Brett Cannon18367812003-09-19 00:59:16 +000023228
23229 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23230 tzset();
23231 if (localtime(&groundhogday)->tm_hour != 11)
23232 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023233#if HAVE_TZNAME
23234 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23235 exit(1);
23236#endif
23237
23238#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023239 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23240 exit(1);
23241 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23242 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023243#endif
Brett Cannon18367812003-09-19 00:59:16 +000023244
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023245 exit(0);
23246}
23247
23248_ACEOF
23249rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023250if { (ac_try="$ac_link"
23251case "(($ac_try" in
23252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23253 *) ac_try_echo=$ac_try;;
23254esac
23255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23256 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023257 ac_status=$?
23258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23259 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023260 { (case "(($ac_try" in
23261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23262 *) ac_try_echo=$ac_try;;
23263esac
23264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23265 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023266 ac_status=$?
23267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23268 (exit $ac_status); }; }; then
23269 ac_cv_working_tzset=yes
23270else
23271 echo "$as_me: program exited with status $ac_status" >&5
23272echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023273sed 's/^/| /' conftest.$ac_ext >&5
23274
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023275( exit $ac_status )
23276ac_cv_working_tzset=no
23277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023278rm -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 +000023279fi
23280
Martin v. Löwiseba40652007-08-30 20:10:57 +000023281
23282fi
23283
23284{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23285echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023286if test "$ac_cv_working_tzset" = yes
23287then
23288
23289cat >>confdefs.h <<\_ACEOF
23290#define HAVE_WORKING_TZSET 1
23291_ACEOF
23292
23293fi
23294
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023295# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023296{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23297echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023298if test "${ac_cv_stat_tv_nsec+set}" = set; then
23299 echo $ECHO_N "(cached) $ECHO_C" >&6
23300else
23301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023302/* confdefs.h. */
23303_ACEOF
23304cat confdefs.h >>conftest.$ac_ext
23305cat >>conftest.$ac_ext <<_ACEOF
23306/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023307#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023308int
23309main ()
23310{
23311
23312struct stat st;
23313st.st_mtim.tv_nsec = 1;
23314
23315 ;
23316 return 0;
23317}
23318_ACEOF
23319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023320if { (ac_try="$ac_compile"
23321case "(($ac_try" in
23322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23323 *) ac_try_echo=$ac_try;;
23324esac
23325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023328 grep -v '^ *+' conftest.er1 >conftest.err
23329 rm -f conftest.er1
23330 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023332 (exit $ac_status); } && {
23333 test -z "$ac_c_werror_flag" ||
23334 test ! -s conftest.err
23335 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023336 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023337else
23338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023339sed 's/^/| /' conftest.$ac_ext >&5
23340
Martin v. Löwiseba40652007-08-30 20:10:57 +000023341 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023342fi
23343
Martin v. Löwiseba40652007-08-30 20:10:57 +000023344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23345fi
23346
23347{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23348echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023349if test "$ac_cv_stat_tv_nsec" = yes
23350then
23351
23352cat >>confdefs.h <<\_ACEOF
23353#define HAVE_STAT_TV_NSEC 1
23354_ACEOF
23355
23356fi
23357
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023358# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023359{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23360echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023361if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23362 echo $ECHO_N "(cached) $ECHO_C" >&6
23363else
23364 cat >conftest.$ac_ext <<_ACEOF
23365/* confdefs.h. */
23366_ACEOF
23367cat confdefs.h >>conftest.$ac_ext
23368cat >>conftest.$ac_ext <<_ACEOF
23369/* end confdefs.h. */
23370#include <sys/stat.h>
23371int
23372main ()
23373{
23374
23375struct stat st;
23376st.st_mtimespec.tv_nsec = 1;
23377
23378 ;
23379 return 0;
23380}
23381_ACEOF
23382rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023383if { (ac_try="$ac_compile"
23384case "(($ac_try" in
23385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23386 *) ac_try_echo=$ac_try;;
23387esac
23388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023390 ac_status=$?
23391 grep -v '^ *+' conftest.er1 >conftest.err
23392 rm -f conftest.er1
23393 cat conftest.err >&5
23394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023395 (exit $ac_status); } && {
23396 test -z "$ac_c_werror_flag" ||
23397 test ! -s conftest.err
23398 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023399 ac_cv_stat_tv_nsec2=yes
23400else
23401 echo "$as_me: failed program was:" >&5
23402sed 's/^/| /' conftest.$ac_ext >&5
23403
Martin v. Löwiseba40652007-08-30 20:10:57 +000023404 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023405fi
23406
Martin v. Löwiseba40652007-08-30 20:10:57 +000023407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23408fi
23409
23410{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23411echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023412if test "$ac_cv_stat_tv_nsec2" = yes
23413then
23414
23415cat >>confdefs.h <<\_ACEOF
23416#define HAVE_STAT_TV_NSEC2 1
23417_ACEOF
23418
23419fi
23420
Jack Jansen666b1e72001-10-31 12:11:48 +000023421# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023422{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23423echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023424if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23425 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023426else
Martin v. Löwis11437992002-04-12 09:54:03 +000023427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023428/* confdefs.h. */
23429_ACEOF
23430cat confdefs.h >>conftest.$ac_ext
23431cat >>conftest.$ac_ext <<_ACEOF
23432/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023433#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023434int
23435main ()
23436{
Jack Jansen666b1e72001-10-31 12:11:48 +000023437
23438 int rtn;
23439 rtn = mvwdelch(0,0,0);
23440
Martin v. Löwis11437992002-04-12 09:54:03 +000023441 ;
23442 return 0;
23443}
23444_ACEOF
23445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023446if { (ac_try="$ac_compile"
23447case "(($ac_try" in
23448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23449 *) ac_try_echo=$ac_try;;
23450esac
23451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023454 grep -v '^ *+' conftest.er1 >conftest.err
23455 rm -f conftest.er1
23456 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023458 (exit $ac_status); } && {
23459 test -z "$ac_c_werror_flag" ||
23460 test ! -s conftest.err
23461 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023462 ac_cv_mvwdelch_is_expression=yes
23463else
Martin v. Löwis11437992002-04-12 09:54:03 +000023464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023465sed 's/^/| /' conftest.$ac_ext >&5
23466
Martin v. Löwiseba40652007-08-30 20:10:57 +000023467 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023468fi
23469
Martin v. Löwiseba40652007-08-30 20:10:57 +000023470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23471fi
23472
23473{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23474echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023475
23476if test "$ac_cv_mvwdelch_is_expression" = yes
23477then
Martin v. Löwis11437992002-04-12 09:54:03 +000023478
23479cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023480#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023481_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023482
23483fi
23484
Martin v. Löwiseba40652007-08-30 20:10:57 +000023485{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23486echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023487if test "${ac_cv_window_has_flags+set}" = set; then
23488 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023489else
Martin v. Löwis11437992002-04-12 09:54:03 +000023490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023491/* confdefs.h. */
23492_ACEOF
23493cat confdefs.h >>conftest.$ac_ext
23494cat >>conftest.$ac_ext <<_ACEOF
23495/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023496#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023497int
23498main ()
23499{
Jack Jansen666b1e72001-10-31 12:11:48 +000023500
23501 WINDOW *w;
23502 w->_flags = 0;
23503
Martin v. Löwis11437992002-04-12 09:54:03 +000023504 ;
23505 return 0;
23506}
23507_ACEOF
23508rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023509if { (ac_try="$ac_compile"
23510case "(($ac_try" in
23511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23512 *) ac_try_echo=$ac_try;;
23513esac
23514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023517 grep -v '^ *+' conftest.er1 >conftest.err
23518 rm -f conftest.er1
23519 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023521 (exit $ac_status); } && {
23522 test -z "$ac_c_werror_flag" ||
23523 test ! -s conftest.err
23524 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023525 ac_cv_window_has_flags=yes
23526else
Martin v. Löwis11437992002-04-12 09:54:03 +000023527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023528sed 's/^/| /' conftest.$ac_ext >&5
23529
Martin v. Löwiseba40652007-08-30 20:10:57 +000023530 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023531fi
23532
Martin v. Löwiseba40652007-08-30 20:10:57 +000023533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23534fi
23535
23536{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23537echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023538
Jack Jansen666b1e72001-10-31 12:11:48 +000023539
23540if test "$ac_cv_window_has_flags" = yes
23541then
Martin v. Löwis11437992002-04-12 09:54:03 +000023542
23543cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023544#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023545_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023546
23547fi
23548
Martin v. Löwiseba40652007-08-30 20:10:57 +000023549{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23550echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023551cat >conftest.$ac_ext <<_ACEOF
23552/* confdefs.h. */
23553_ACEOF
23554cat confdefs.h >>conftest.$ac_ext
23555cat >>conftest.$ac_ext <<_ACEOF
23556/* end confdefs.h. */
23557#include <curses.h>
23558int
23559main ()
23560{
23561void *x=is_term_resized
23562 ;
23563 return 0;
23564}
23565_ACEOF
23566rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023567if { (ac_try="$ac_compile"
23568case "(($ac_try" in
23569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23570 *) ac_try_echo=$ac_try;;
23571esac
23572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23573 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023574 ac_status=$?
23575 grep -v '^ *+' conftest.er1 >conftest.err
23576 rm -f conftest.er1
23577 cat conftest.err >&5
23578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023579 (exit $ac_status); } && {
23580 test -z "$ac_c_werror_flag" ||
23581 test ! -s conftest.err
23582 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023583
23584cat >>confdefs.h <<\_ACEOF
23585#define HAVE_CURSES_IS_TERM_RESIZED 1
23586_ACEOF
23587
Martin v. Löwiseba40652007-08-30 20:10:57 +000023588 { echo "$as_me:$LINENO: result: yes" >&5
23589echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023590else
23591 echo "$as_me: failed program was:" >&5
23592sed 's/^/| /' conftest.$ac_ext >&5
23593
Martin v. Löwiseba40652007-08-30 20:10:57 +000023594 { echo "$as_me:$LINENO: result: no" >&5
23595echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023596
23597fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023598
Martin v. Löwiseba40652007-08-30 20:10:57 +000023599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23600
23601{ echo "$as_me:$LINENO: checking for resize_term" >&5
23602echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023603cat >conftest.$ac_ext <<_ACEOF
23604/* confdefs.h. */
23605_ACEOF
23606cat confdefs.h >>conftest.$ac_ext
23607cat >>conftest.$ac_ext <<_ACEOF
23608/* end confdefs.h. */
23609#include <curses.h>
23610int
23611main ()
23612{
23613void *x=resize_term
23614 ;
23615 return 0;
23616}
23617_ACEOF
23618rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023619if { (ac_try="$ac_compile"
23620case "(($ac_try" in
23621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23622 *) ac_try_echo=$ac_try;;
23623esac
23624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23625 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023626 ac_status=$?
23627 grep -v '^ *+' conftest.er1 >conftest.err
23628 rm -f conftest.er1
23629 cat conftest.err >&5
23630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023631 (exit $ac_status); } && {
23632 test -z "$ac_c_werror_flag" ||
23633 test ! -s conftest.err
23634 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023635
23636cat >>confdefs.h <<\_ACEOF
23637#define HAVE_CURSES_RESIZE_TERM 1
23638_ACEOF
23639
Martin v. Löwiseba40652007-08-30 20:10:57 +000023640 { echo "$as_me:$LINENO: result: yes" >&5
23641echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023642else
23643 echo "$as_me: failed program was:" >&5
23644sed 's/^/| /' conftest.$ac_ext >&5
23645
Martin v. Löwiseba40652007-08-30 20:10:57 +000023646 { echo "$as_me:$LINENO: result: no" >&5
23647echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023648
23649fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023650
Martin v. Löwiseba40652007-08-30 20:10:57 +000023651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23652
23653{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23654echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023655cat >conftest.$ac_ext <<_ACEOF
23656/* confdefs.h. */
23657_ACEOF
23658cat confdefs.h >>conftest.$ac_ext
23659cat >>conftest.$ac_ext <<_ACEOF
23660/* end confdefs.h. */
23661#include <curses.h>
23662int
23663main ()
23664{
23665void *x=resizeterm
23666 ;
23667 return 0;
23668}
23669_ACEOF
23670rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023671if { (ac_try="$ac_compile"
23672case "(($ac_try" in
23673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23674 *) ac_try_echo=$ac_try;;
23675esac
23676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23677 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023678 ac_status=$?
23679 grep -v '^ *+' conftest.er1 >conftest.err
23680 rm -f conftest.er1
23681 cat conftest.err >&5
23682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023683 (exit $ac_status); } && {
23684 test -z "$ac_c_werror_flag" ||
23685 test ! -s conftest.err
23686 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023687
23688cat >>confdefs.h <<\_ACEOF
23689#define HAVE_CURSES_RESIZETERM 1
23690_ACEOF
23691
Martin v. Löwiseba40652007-08-30 20:10:57 +000023692 { echo "$as_me:$LINENO: result: yes" >&5
23693echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023694else
23695 echo "$as_me: failed program was:" >&5
23696sed 's/^/| /' conftest.$ac_ext >&5
23697
Martin v. Löwiseba40652007-08-30 20:10:57 +000023698 { echo "$as_me:$LINENO: result: no" >&5
23699echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023700
23701fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023702
Martin v. Löwiseba40652007-08-30 20:10:57 +000023703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23704
23705{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23706echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023707
23708if test -r /dev/ptmx
23709then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023710 { echo "$as_me:$LINENO: result: yes" >&5
23711echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023712
23713cat >>confdefs.h <<\_ACEOF
23714#define HAVE_DEV_PTMX 1
23715_ACEOF
23716
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023717else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023718 { echo "$as_me:$LINENO: result: no" >&5
23719echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023720fi
23721
Martin v. Löwiseba40652007-08-30 20:10:57 +000023722{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23723echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023724
23725if test -r /dev/ptc
23726then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023727 { echo "$as_me:$LINENO: result: yes" >&5
23728echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023729
23730cat >>confdefs.h <<\_ACEOF
23731#define HAVE_DEV_PTC 1
23732_ACEOF
23733
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023734else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023735 { echo "$as_me:$LINENO: result: no" >&5
23736echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023737fi
23738
Martin v. Löwiseba40652007-08-30 20:10:57 +000023739{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23740echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023741if test "$cross_compiling" = yes; then
23742 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23743See \`config.log' for more details." >&5
23744echo "$as_me: error: cannot run test program while cross compiling
23745See \`config.log' for more details." >&2;}
23746 { (exit 1); exit 1; }; }
23747else
23748 cat >conftest.$ac_ext <<_ACEOF
23749/* confdefs.h. */
23750_ACEOF
23751cat confdefs.h >>conftest.$ac_ext
23752cat >>conftest.$ac_ext <<_ACEOF
23753/* end confdefs.h. */
23754#include <stdio.h>
23755#include <stddef.h>
23756#include <string.h>
23757
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023758#ifdef HAVE_SYS_TYPES_H
23759#include <sys/types.h>
23760#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023761
23762#ifdef HAVE_SSIZE_T
23763typedef ssize_t Py_ssize_t;
23764#elif SIZEOF_VOID_P == SIZEOF_LONG
23765typedef long Py_ssize_t;
23766#else
23767typedef int Py_ssize_t;
23768#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023769
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023770int main()
23771{
23772 char buffer[256];
23773
Brett Cannon09d12362006-05-11 05:11:33 +000023774 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23775 return 1;
23776
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023777 if (strcmp(buffer, "123"))
23778 return 1;
23779
23780 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23781 return 1;
23782
23783 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023784 return 1;
23785
23786 return 0;
23787}
23788_ACEOF
23789rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023790if { (ac_try="$ac_link"
23791case "(($ac_try" in
23792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23793 *) ac_try_echo=$ac_try;;
23794esac
23795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23796 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023797 ac_status=$?
23798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023800 { (case "(($ac_try" in
23801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23802 *) ac_try_echo=$ac_try;;
23803esac
23804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23805 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023806 ac_status=$?
23807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23808 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023809 { echo "$as_me:$LINENO: result: yes" >&5
23810echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023811
23812cat >>confdefs.h <<\_ACEOF
23813#define PY_FORMAT_SIZE_T "z"
23814_ACEOF
23815
23816else
23817 echo "$as_me: program exited with status $ac_status" >&5
23818echo "$as_me: failed program was:" >&5
23819sed 's/^/| /' conftest.$ac_ext >&5
23820
23821( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023822{ echo "$as_me:$LINENO: result: no" >&5
23823echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023825rm -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 +000023826fi
23827
Martin v. Löwiseba40652007-08-30 20:10:57 +000023828
23829
23830{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23831echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023832if test "${ac_cv_type_socklen_t+set}" = set; then
23833 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023834else
Martin v. Löwis11437992002-04-12 09:54:03 +000023835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023836/* confdefs.h. */
23837_ACEOF
23838cat confdefs.h >>conftest.$ac_ext
23839cat >>conftest.$ac_ext <<_ACEOF
23840/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023841
23842#ifdef HAVE_SYS_TYPES_H
23843#include <sys/types.h>
23844#endif
23845#ifdef HAVE_SYS_SOCKET_H
23846#include <sys/socket.h>
23847#endif
23848
23849
Martin v. Löwiseba40652007-08-30 20:10:57 +000023850typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023851int
23852main ()
23853{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023854if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023855 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023856if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023857 return 0;
23858 ;
23859 return 0;
23860}
23861_ACEOF
23862rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023863if { (ac_try="$ac_compile"
23864case "(($ac_try" in
23865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23866 *) ac_try_echo=$ac_try;;
23867esac
23868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023871 grep -v '^ *+' conftest.er1 >conftest.err
23872 rm -f conftest.er1
23873 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023875 (exit $ac_status); } && {
23876 test -z "$ac_c_werror_flag" ||
23877 test ! -s conftest.err
23878 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000023879 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000023880else
Martin v. Löwis11437992002-04-12 09:54:03 +000023881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023882sed 's/^/| /' conftest.$ac_ext >&5
23883
Martin v. Löwiseba40652007-08-30 20:10:57 +000023884 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000023885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023886
23887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023889{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23890echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023891if test $ac_cv_type_socklen_t = yes; then
23892 :
23893else
Guido van Rossum95713eb2000-05-18 20:53:31 +000023894
Martin v. Löwis01c04012002-11-11 14:58:44 +000023895cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023896#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000023897_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023898
23899fi
23900
Michael W. Hudson54241132001-12-07 15:38:26 +000023901
Michael W. Hudson54241132001-12-07 15:38:26 +000023902
23903
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000023904for h in `(cd $srcdir;echo Python/thread_*.h)`
23905do
23906 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
23907done
23908
Michael W. Hudson54241132001-12-07 15:38:26 +000023909
Neal Norwitzd24499d2005-12-18 21:36:39 +000023910SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023911{ echo "$as_me:$LINENO: checking for build directories" >&5
23912echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023913for dir in $SRCDIRS; do
23914 if test ! -d $dir; then
23915 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000023916 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023917done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023918{ echo "$as_me:$LINENO: result: done" >&5
23919echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000023920
Guido van Rossum627b2d71993-12-24 10:39:16 +000023921# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000023922ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000023923
Martin v. Löwis11437992002-04-12 09:54:03 +000023924cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023925# This file is a shell script that caches the results of configure
23926# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000023927# scripts and configure runs, see configure's option --config-cache.
23928# It is not useful on other systems. If it contains results you don't
23929# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023930#
Martin v. Löwis11437992002-04-12 09:54:03 +000023931# config.status only pays attention to the cache file if you give it
23932# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023933#
Skip Montanaro6dead952003-09-25 14:50:04 +000023934# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000023935# loading this file, other *unset* `ac_cv_foo' will be assigned the
23936# following values.
23937
23938_ACEOF
23939
Guido van Rossumf78abae1997-01-21 22:02:36 +000023940# The following way of writing the cache mishandles newlines in values,
23941# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023942# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023943# Ultrix sh set writes to stderr and can't be redirected directly,
23944# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023945(
23946 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23947 eval ac_val=\$$ac_var
23948 case $ac_val in #(
23949 *${as_nl}*)
23950 case $ac_var in #(
23951 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23952echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23953 esac
23954 case $ac_var in #(
23955 _ | IFS | as_nl) ;; #(
23956 *) $as_unset $ac_var ;;
23957 esac ;;
23958 esac
23959 done
23960
Martin v. Löwis11437992002-04-12 09:54:03 +000023961 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000023962 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23963 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000023964 # `set' does not quote correctly, so add quotes (double-quote
23965 # substitution turns \\\\ into \\, and sed turns \\ into \).
23966 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023967 "s/'/'\\\\''/g;
23968 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023969 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000023970 *)
23971 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023972 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000023973 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023974 esac |
23975 sort
23976) |
Martin v. Löwis11437992002-04-12 09:54:03 +000023977 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023978 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000023979 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000023980 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000023981 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23982 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000023983 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23984 :end' >>confcache
23985if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23986 if test -w "$cache_file"; then
23987 test "x$cache_file" != "x/dev/null" &&
23988 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23989echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023990 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023991 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023992 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23993echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023994 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023995fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023996rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000023997
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023998test "x$prefix" = xNONE && prefix=$ac_default_prefix
23999# Let make expand exec_prefix.
24000test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024001
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024002DEFS=-DHAVE_CONFIG_H
24003
Skip Montanaro6dead952003-09-25 14:50:04 +000024004ac_libobjs=
24005ac_ltlibobjs=
24006for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24007 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024008 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24009 ac_i=`echo "$ac_i" | sed "$ac_script"`
24010 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24011 # will be set to the directory where LIBOBJS objects are built.
24012 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24013 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024014done
24015LIBOBJS=$ac_libobjs
24016
24017LTLIBOBJS=$ac_ltlibobjs
24018
24019
Martin v. Löwis11437992002-04-12 09:54:03 +000024020
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024021: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024022ac_clean_files_save=$ac_clean_files
24023ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24024{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24025echo "$as_me: creating $CONFIG_STATUS" >&6;}
24026cat >$CONFIG_STATUS <<_ACEOF
24027#! $SHELL
24028# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024029# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024030# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024031# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024032
Martin v. Löwis11437992002-04-12 09:54:03 +000024033debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024034ac_cs_recheck=false
24035ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024036SHELL=\${CONFIG_SHELL-$SHELL}
24037_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024038
Martin v. Löwis11437992002-04-12 09:54:03 +000024039cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024040## --------------------- ##
24041## M4sh Initialization. ##
24042## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024043
Martin v. Löwiseba40652007-08-30 20:10:57 +000024044# Be more Bourne compatible
24045DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024046if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24047 emulate sh
24048 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024049 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24050 # is contrary to our usage. Disable this feature.
24051 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024052 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024053else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024054 case `(set -o) 2>/dev/null` in
24055 *posix*) set -o posix ;;
24056esac
24057
Martin v. Löwis11437992002-04-12 09:54:03 +000024058fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024059
Skip Montanaro6dead952003-09-25 14:50:04 +000024060
Martin v. Löwis11437992002-04-12 09:54:03 +000024061
24062
Martin v. Löwiseba40652007-08-30 20:10:57 +000024063# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024064# Avoid depending upon Character Ranges.
24065as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24066as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24067as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24068as_cr_digits='0123456789'
24069as_cr_alnum=$as_cr_Letters$as_cr_digits
24070
24071# The user is always right.
24072if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024073 echo "#! /bin/sh" >conf$$.sh
24074 echo "exit 0" >>conf$$.sh
24075 chmod +x conf$$.sh
24076 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024077 PATH_SEPARATOR=';'
24078 else
24079 PATH_SEPARATOR=:
24080 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024081 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024082fi
24083
Martin v. Löwiseba40652007-08-30 20:10:57 +000024084# Support unset when possible.
24085if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24086 as_unset=unset
24087else
24088 as_unset=false
24089fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024090
Martin v. Löwiseba40652007-08-30 20:10:57 +000024091
24092# IFS
24093# We need space, tab and new line, in precisely that order. Quoting is
24094# there to prevent editors from complaining about space-tab.
24095# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24096# splitting by setting IFS to empty value.)
24097as_nl='
24098'
24099IFS=" "" $as_nl"
24100
24101# Find who we are. Look in the path if we contain no directory separator.
24102case $0 in
24103 *[\\/]* ) as_myself=$0 ;;
24104 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024105for as_dir in $PATH
24106do
24107 IFS=$as_save_IFS
24108 test -z "$as_dir" && as_dir=.
24109 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24110done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024111IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024112
Martin v. Löwiseba40652007-08-30 20:10:57 +000024113 ;;
24114esac
24115# We did not find ourselves, most probably we were run as `sh COMMAND'
24116# in which case we are not to be found in the path.
24117if test "x$as_myself" = x; then
24118 as_myself=$0
24119fi
24120if test ! -f "$as_myself"; then
24121 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24122 { (exit 1); exit 1; }
24123fi
24124
24125# Work around bugs in pre-3.0 UWIN ksh.
24126for as_var in ENV MAIL MAILPATH
24127do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24128done
24129PS1='$ '
24130PS2='> '
24131PS4='+ '
24132
24133# NLS nuisances.
24134for as_var in \
24135 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24136 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24137 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024138do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024139 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24140 eval $as_var=C; export $as_var
24141 else
24142 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24143 fi
24144done
24145
24146# Required to use basename.
24147if expr a : '\(a\)' >/dev/null 2>&1 &&
24148 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24149 as_expr=expr
24150else
24151 as_expr=false
24152fi
24153
24154if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24155 as_basename=basename
24156else
24157 as_basename=false
24158fi
24159
24160
24161# Name of the executable.
24162as_me=`$as_basename -- "$0" ||
24163$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24164 X"$0" : 'X\(//\)$' \| \
24165 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24166echo X/"$0" |
24167 sed '/^.*\/\([^/][^/]*\)\/*$/{
24168 s//\1/
24169 q
24170 }
24171 /^X\/\(\/\/\)$/{
24172 s//\1/
24173 q
24174 }
24175 /^X\/\(\/\).*/{
24176 s//\1/
24177 q
24178 }
24179 s/.*/./; q'`
24180
24181# CDPATH.
24182$as_unset CDPATH
24183
24184
24185
Martin v. Löwis11437992002-04-12 09:54:03 +000024186 as_lineno_1=$LINENO
24187 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024188 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024189 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024190
Martin v. Löwis11437992002-04-12 09:54:03 +000024191 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24192 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024193 # line-number line after each line using $LINENO; the second 'sed'
24194 # does the real work. The second script uses 'N' to pair each
24195 # line-number line with the line containing $LINENO, and appends
24196 # trailing '-' during substitution so that $LINENO is not a special
24197 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024198 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024199 # scripts with optimization help from Paolo Bonzini. Blame Lee
24200 # E. McMahon (1931-1989) for sed's syntax. :-)
24201 sed -n '
24202 p
24203 /[$]LINENO/=
24204 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024205 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024206 s/[$]LINENO.*/&-/
24207 t lineno
24208 b
24209 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024210 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024211 :loop
24212 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024213 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024214 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024215 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024216 chmod +x "$as_me.lineno" ||
24217 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024218 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024219
Martin v. Löwis11437992002-04-12 09:54:03 +000024220 # Don't try to exec as it changes $[0], causing all sort of problems
24221 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024222 # original and so on. Autoconf is especially sensitive to this).
24223 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024224 # Exit status is that of the last command.
24225 exit
24226}
24227
24228
Martin v. Löwiseba40652007-08-30 20:10:57 +000024229if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24230 as_dirname=dirname
24231else
24232 as_dirname=false
24233fi
24234
24235ECHO_C= ECHO_N= ECHO_T=
24236case `echo -n x` in
24237-n*)
24238 case `echo 'x\c'` in
24239 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24240 *) ECHO_C='\c';;
24241 esac;;
24242*)
24243 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024244esac
24245
Martin v. Löwiseba40652007-08-30 20:10:57 +000024246if expr a : '\(a\)' >/dev/null 2>&1 &&
24247 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024248 as_expr=expr
24249else
24250 as_expr=false
24251fi
24252
24253rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024254if test -d conf$$.dir; then
24255 rm -f conf$$.dir/conf$$.file
24256else
24257 rm -f conf$$.dir
24258 mkdir conf$$.dir
24259fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024260echo >conf$$.file
24261if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024262 as_ln_s='ln -s'
24263 # ... but there are two gotchas:
24264 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24265 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24266 # In both cases, we have to default to `cp -p'.
24267 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024268 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024269elif ln conf$$.file conf$$ 2>/dev/null; then
24270 as_ln_s=ln
24271else
24272 as_ln_s='cp -p'
24273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024274rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24275rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024276
Skip Montanaro6dead952003-09-25 14:50:04 +000024277if mkdir -p . 2>/dev/null; then
24278 as_mkdir_p=:
24279else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024280 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024281 as_mkdir_p=false
24282fi
24283
Martin v. Löwiseba40652007-08-30 20:10:57 +000024284if test -x / >/dev/null 2>&1; then
24285 as_test_x='test -x'
24286else
24287 if ls -dL / >/dev/null 2>&1; then
24288 as_ls_L_option=L
24289 else
24290 as_ls_L_option=
24291 fi
24292 as_test_x='
24293 eval sh -c '\''
24294 if test -d "$1"; then
24295 test -d "$1/.";
24296 else
24297 case $1 in
24298 -*)set "./$1";;
24299 esac;
24300 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24301 ???[sx]*):;;*)false;;esac;fi
24302 '\'' sh
24303 '
24304fi
24305as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024306
24307# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024308as_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 +000024309
24310# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024311as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024312
24313
Martin v. Löwis11437992002-04-12 09:54:03 +000024314exec 6>&1
24315
Martin v. Löwiseba40652007-08-30 20:10:57 +000024316# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024317# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024318# values after options handling.
24319ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024320This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024321generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024322
24323 CONFIG_FILES = $CONFIG_FILES
24324 CONFIG_HEADERS = $CONFIG_HEADERS
24325 CONFIG_LINKS = $CONFIG_LINKS
24326 CONFIG_COMMANDS = $CONFIG_COMMANDS
24327 $ $0 $@
24328
Martin v. Löwiseba40652007-08-30 20:10:57 +000024329on `(hostname || uname -n) 2>/dev/null | sed 1q`
24330"
24331
Martin v. Löwis11437992002-04-12 09:54:03 +000024332_ACEOF
24333
Martin v. Löwiseba40652007-08-30 20:10:57 +000024334cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024335# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024336config_files="$ac_config_files"
24337config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024338
Martin v. Löwiseba40652007-08-30 20:10:57 +000024339_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024340
24341cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024342ac_cs_usage="\
24343\`$as_me' instantiates files from templates according to the
24344current configuration.
24345
24346Usage: $0 [OPTIONS] [FILE]...
24347
24348 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024349 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024350 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024351 -d, --debug don't remove temporary files
24352 --recheck update $as_me by reconfiguring in the same conditions
24353 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024354 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024355 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024356 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024357
24358Configuration files:
24359$config_files
24360
24361Configuration headers:
24362$config_headers
24363
24364Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024365
Martin v. Löwiseba40652007-08-30 20:10:57 +000024366_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024367cat >>$CONFIG_STATUS <<_ACEOF
24368ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024369python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024370configured by $0, generated by GNU Autoconf 2.61,
24371 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024372
Martin v. Löwiseba40652007-08-30 20:10:57 +000024373Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024374This config.status script is free software; the Free Software Foundation
24375gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024376
24377ac_pwd='$ac_pwd'
24378srcdir='$srcdir'
24379INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024380_ACEOF
24381
24382cat >>$CONFIG_STATUS <<\_ACEOF
24383# If no file are specified by the user, then we need to provide default
24384# value. By we need to know if files were specified by the user.
24385ac_need_defaults=:
24386while test $# != 0
24387do
24388 case $1 in
24389 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024390 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24391 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024392 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024393 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024394 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024395 ac_option=$1
24396 ac_optarg=$2
24397 ac_shift=shift
24398 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024399 esac
24400
Skip Montanaro6dead952003-09-25 14:50:04 +000024401 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024402 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024403 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24404 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024405 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24406 echo "$ac_cs_version"; exit ;;
24407 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024408 debug=: ;;
24409 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024410 $ac_shift
24411 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024412 ac_need_defaults=false;;
24413 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024414 $ac_shift
24415 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024416 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024417 --he | --h)
24418 # Conflict between --help and --header
24419 { echo "$as_me: error: ambiguous option: $1
24420Try \`$0 --help' for more information." >&2
24421 { (exit 1); exit 1; }; };;
24422 --help | --hel | -h )
24423 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024424 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24425 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24426 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024427
24428 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024429 -*) { echo "$as_me: error: unrecognized option: $1
24430Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024431 { (exit 1); exit 1; }; } ;;
24432
Martin v. Löwiseba40652007-08-30 20:10:57 +000024433 *) ac_config_targets="$ac_config_targets $1"
24434 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024435
24436 esac
24437 shift
24438done
24439
Skip Montanaro6dead952003-09-25 14:50:04 +000024440ac_configure_extra_args=
24441
24442if $ac_cs_silent; then
24443 exec 6>/dev/null
24444 ac_configure_extra_args="$ac_configure_extra_args --silent"
24445fi
24446
24447_ACEOF
24448cat >>$CONFIG_STATUS <<_ACEOF
24449if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024450 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24451 CONFIG_SHELL=$SHELL
24452 export CONFIG_SHELL
24453 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024454fi
24455
Martin v. Löwis11437992002-04-12 09:54:03 +000024456_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024457cat >>$CONFIG_STATUS <<\_ACEOF
24458exec 5>>config.log
24459{
24460 echo
24461 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24462## Running $as_me. ##
24463_ASBOX
24464 echo "$ac_log"
24465} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024466
Martin v. Löwiseba40652007-08-30 20:10:57 +000024467_ACEOF
24468cat >>$CONFIG_STATUS <<_ACEOF
24469_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024470
24471cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024472
24473# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024474for ac_config_target in $ac_config_targets
24475do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024476 case $ac_config_target in
24477 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24478 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24479 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24480 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
24481 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24482 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24483
Martin v. Löwis11437992002-04-12 09:54:03 +000024484 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24485echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24486 { (exit 1); exit 1; }; };;
24487 esac
24488done
24489
Martin v. Löwiseba40652007-08-30 20:10:57 +000024490
Martin v. Löwis11437992002-04-12 09:54:03 +000024491# If the user did not use the arguments to specify the items to instantiate,
24492# then the envvar interface is used. Set only those that are not.
24493# We use the long form for the default assignment because of an extremely
24494# bizarre bug on SunOS 4.1.3.
24495if $ac_need_defaults; then
24496 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24497 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24498fi
24499
Skip Montanaro6dead952003-09-25 14:50:04 +000024500# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024501# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024502# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024503# Hook for its removal unless debugging.
24504# Note that there is a small window in which the directory will not be cleaned:
24505# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024506$debug ||
24507{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024508 tmp=
24509 trap 'exit_status=$?
24510 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24511' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024512 trap '{ (exit 1); exit 1; }' 1 2 13 15
24513}
Martin v. Löwis11437992002-04-12 09:54:03 +000024514# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024515
Martin v. Löwis11437992002-04-12 09:54:03 +000024516{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024517 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024518 test -n "$tmp" && test -d "$tmp"
24519} ||
24520{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024521 tmp=./conf$$-$RANDOM
24522 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024523} ||
24524{
Skip Montanaro6dead952003-09-25 14:50:04 +000024525 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024526 { (exit 1); exit 1; }
24527}
24528
Martin v. Löwis11437992002-04-12 09:54:03 +000024529#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024530# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024531#
24532
24533# No need to generate the scripts if there are no CONFIG_FILES.
24534# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024535if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024536
24537_ACEOF
24538
Martin v. Löwiseba40652007-08-30 20:10:57 +000024539
24540
24541ac_delim='%!_!# '
24542for ac_last_try in false false false false false :; do
24543 cat >conf$$subs.sed <<_ACEOF
24544SHELL!$SHELL$ac_delim
24545PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24546PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24547PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24548PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24549PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24550PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24551exec_prefix!$exec_prefix$ac_delim
24552prefix!$prefix$ac_delim
24553program_transform_name!$program_transform_name$ac_delim
24554bindir!$bindir$ac_delim
24555sbindir!$sbindir$ac_delim
24556libexecdir!$libexecdir$ac_delim
24557datarootdir!$datarootdir$ac_delim
24558datadir!$datadir$ac_delim
24559sysconfdir!$sysconfdir$ac_delim
24560sharedstatedir!$sharedstatedir$ac_delim
24561localstatedir!$localstatedir$ac_delim
24562includedir!$includedir$ac_delim
24563oldincludedir!$oldincludedir$ac_delim
24564docdir!$docdir$ac_delim
24565infodir!$infodir$ac_delim
24566htmldir!$htmldir$ac_delim
24567dvidir!$dvidir$ac_delim
24568pdfdir!$pdfdir$ac_delim
24569psdir!$psdir$ac_delim
24570libdir!$libdir$ac_delim
24571localedir!$localedir$ac_delim
24572mandir!$mandir$ac_delim
24573DEFS!$DEFS$ac_delim
24574ECHO_C!$ECHO_C$ac_delim
24575ECHO_N!$ECHO_N$ac_delim
24576ECHO_T!$ECHO_T$ac_delim
24577LIBS!$LIBS$ac_delim
24578build_alias!$build_alias$ac_delim
24579host_alias!$host_alias$ac_delim
24580target_alias!$target_alias$ac_delim
24581VERSION!$VERSION$ac_delim
24582SOVERSION!$SOVERSION$ac_delim
24583CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24584UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24585PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
24586PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24587PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24588PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24589FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24590FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24591FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24592FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24593FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24594MACHDEP!$MACHDEP$ac_delim
24595SGI_ABI!$SGI_ABI$ac_delim
24596EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24597EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24598CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24599EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24600CC!$CC$ac_delim
24601CFLAGS!$CFLAGS$ac_delim
24602LDFLAGS!$LDFLAGS$ac_delim
24603CPPFLAGS!$CPPFLAGS$ac_delim
24604ac_ct_CC!$ac_ct_CC$ac_delim
24605EXEEXT!$EXEEXT$ac_delim
24606OBJEXT!$OBJEXT$ac_delim
24607CXX!$CXX$ac_delim
24608MAINCC!$MAINCC$ac_delim
24609CPP!$CPP$ac_delim
24610GREP!$GREP$ac_delim
24611EGREP!$EGREP$ac_delim
24612BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24613LIBRARY!$LIBRARY$ac_delim
24614LDLIBRARY!$LDLIBRARY$ac_delim
24615DLLLIBRARY!$DLLLIBRARY$ac_delim
24616BLDLIBRARY!$BLDLIBRARY$ac_delim
24617LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24618INSTSONAME!$INSTSONAME$ac_delim
24619RUNSHARED!$RUNSHARED$ac_delim
24620LINKCC!$LINKCC$ac_delim
24621RANLIB!$RANLIB$ac_delim
24622AR!$AR$ac_delim
24623SVNVERSION!$SVNVERSION$ac_delim
24624INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24625INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24626INSTALL_DATA!$INSTALL_DATA$ac_delim
24627LN!$LN$ac_delim
24628OPT!$OPT$ac_delim
24629BASECFLAGS!$BASECFLAGS$ac_delim
24630OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24631LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24632SO!$SO$ac_delim
24633LDSHARED!$LDSHARED$ac_delim
24634BLDSHARED!$BLDSHARED$ac_delim
24635CCSHARED!$CCSHARED$ac_delim
24636LINKFORSHARED!$LINKFORSHARED$ac_delim
24637CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24638SHLIBS!$SHLIBS$ac_delim
24639USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
24640SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
24641_ACEOF
24642
24643 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24644 break
24645 elif $ac_last_try; then
24646 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24647echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24648 { (exit 1); exit 1; }; }
24649 else
24650 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024651 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024652done
24653
24654ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24655if test -n "$ac_eof"; then
24656 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24657 ac_eof=`expr $ac_eof + 1`
24658fi
24659
24660cat >>$CONFIG_STATUS <<_ACEOF
24661cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24662/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24663_ACEOF
24664sed '
24665s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24666s/^/s,@/; s/!/@,|#_!!_#|/
24667:n
24668t n
24669s/'"$ac_delim"'$/,g/; t
24670s/$/\\/; p
24671N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24672' >>$CONFIG_STATUS <conf$$subs.sed
24673rm -f conf$$subs.sed
24674cat >>$CONFIG_STATUS <<_ACEOF
24675CEOF$ac_eof
24676_ACEOF
24677
24678
24679ac_delim='%!_!# '
24680for ac_last_try in false false false false false :; do
24681 cat >conf$$subs.sed <<_ACEOF
24682USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24683LDLAST!$LDLAST$ac_delim
24684THREADOBJ!$THREADOBJ$ac_delim
24685DLINCLDIR!$DLINCLDIR$ac_delim
24686DYNLOADFILE!$DYNLOADFILE$ac_delim
24687MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24688TRUE!$TRUE$ac_delim
24689LIBOBJS!$LIBOBJS$ac_delim
24690HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24691HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24692HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24693HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24694HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24695LIBM!$LIBM$ac_delim
24696LIBC!$LIBC$ac_delim
24697UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24698THREADHEADERS!$THREADHEADERS$ac_delim
24699SRCDIRS!$SRCDIRS$ac_delim
24700LTLIBOBJS!$LTLIBOBJS$ac_delim
24701_ACEOF
24702
24703 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
24704 break
24705 elif $ac_last_try; then
24706 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24707echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24708 { (exit 1); exit 1; }; }
24709 else
24710 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24711 fi
24712done
24713
24714ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24715if test -n "$ac_eof"; then
24716 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24717 ac_eof=`expr $ac_eof + 1`
24718fi
24719
24720cat >>$CONFIG_STATUS <<_ACEOF
24721cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24722/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24723_ACEOF
24724sed '
24725s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24726s/^/s,@/; s/!/@,|#_!!_#|/
24727:n
24728t n
24729s/'"$ac_delim"'$/,g/; t
24730s/$/\\/; p
24731N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24732' >>$CONFIG_STATUS <conf$$subs.sed
24733rm -f conf$$subs.sed
24734cat >>$CONFIG_STATUS <<_ACEOF
24735:end
24736s/|#_!!_#|//g
24737CEOF$ac_eof
24738_ACEOF
24739
24740
24741# VPATH may cause trouble with some makes, so we remove $(srcdir),
24742# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24743# trailing colons and then remove the whole line if VPATH becomes empty
24744# (actually we leave an empty line to preserve line numbers).
24745if test "x$srcdir" = x.; then
24746 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24747s/:*\$(srcdir):*/:/
24748s/:*\${srcdir}:*/:/
24749s/:*@srcdir@:*/:/
24750s/^\([^=]*=[ ]*\):*/\1/
24751s/:*$//
24752s/^[^=]*=[ ]*$//
24753}'
24754fi
24755
24756cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024757fi # test -n "$CONFIG_FILES"
24758
Martin v. Löwiseba40652007-08-30 20:10:57 +000024759
24760for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24761do
24762 case $ac_tag in
24763 :[FHLC]) ac_mode=$ac_tag; continue;;
24764 esac
24765 case $ac_mode$ac_tag in
24766 :[FHL]*:*);;
24767 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24768echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24769 { (exit 1); exit 1; }; };;
24770 :[FH]-) ac_tag=-:-;;
24771 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24772 esac
24773 ac_save_IFS=$IFS
24774 IFS=:
24775 set x $ac_tag
24776 IFS=$ac_save_IFS
24777 shift
24778 ac_file=$1
24779 shift
24780
24781 case $ac_mode in
24782 :L) ac_source=$1;;
24783 :[FH])
24784 ac_file_inputs=
24785 for ac_f
24786 do
24787 case $ac_f in
24788 -) ac_f="$tmp/stdin";;
24789 *) # Look for the file first in the build tree, then in the source tree
24790 # (if the path is not absolute). The absolute path cannot be DOS-style,
24791 # because $ac_f cannot contain `:'.
24792 test -f "$ac_f" ||
24793 case $ac_f in
24794 [\\/$]*) false;;
24795 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24796 esac ||
24797 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24798echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24799 { (exit 1); exit 1; }; };;
24800 esac
24801 ac_file_inputs="$ac_file_inputs $ac_f"
24802 done
24803
24804 # Let's still pretend it is `configure' which instantiates (i.e., don't
24805 # use $as_me), people would be surprised to read:
24806 # /* config.h. Generated by config.status. */
24807 configure_input="Generated from "`IFS=:
24808 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24809 if test x"$ac_file" != x-; then
24810 configure_input="$ac_file. $configure_input"
24811 { echo "$as_me:$LINENO: creating $ac_file" >&5
24812echo "$as_me: creating $ac_file" >&6;}
24813 fi
24814
24815 case $ac_tag in
24816 *:-:* | *:-) cat >"$tmp/stdin";;
24817 esac
24818 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024819 esac
24820
Martin v. Löwiseba40652007-08-30 20:10:57 +000024821 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024822$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024823 X"$ac_file" : 'X\(//\)[^/]' \| \
24824 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024825 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024826echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024827 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24828 s//\1/
24829 q
24830 }
24831 /^X\(\/\/\)[^/].*/{
24832 s//\1/
24833 q
24834 }
24835 /^X\(\/\/\)$/{
24836 s//\1/
24837 q
24838 }
24839 /^X\(\/\).*/{
24840 s//\1/
24841 q
24842 }
24843 s/.*/./; q'`
24844 { as_dir="$ac_dir"
24845 case $as_dir in #(
24846 -*) as_dir=./$as_dir;;
24847 esac
24848 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024849 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024850 while :; do
24851 case $as_dir in #(
24852 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24853 *) as_qdir=$as_dir;;
24854 esac
24855 as_dirs="'$as_qdir' $as_dirs"
24856 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024857$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024858 X"$as_dir" : 'X\(//\)[^/]' \| \
24859 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024860 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024861echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024862 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24863 s//\1/
24864 q
24865 }
24866 /^X\(\/\/\)[^/].*/{
24867 s//\1/
24868 q
24869 }
24870 /^X\(\/\/\)$/{
24871 s//\1/
24872 q
24873 }
24874 /^X\(\/\).*/{
24875 s//\1/
24876 q
24877 }
24878 s/.*/./; q'`
24879 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000024880 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024881 test -z "$as_dirs" || eval "mkdir $as_dirs"
24882 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24883echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000024884 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024885 ac_builddir=.
24886
Martin v. Löwiseba40652007-08-30 20:10:57 +000024887case "$ac_dir" in
24888.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24889*)
Martin v. Löwis11437992002-04-12 09:54:03 +000024890 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000024891 # A ".." for each directory in $ac_dir_suffix.
24892 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24893 case $ac_top_builddir_sub in
24894 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24895 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24896 esac ;;
24897esac
24898ac_abs_top_builddir=$ac_pwd
24899ac_abs_builddir=$ac_pwd$ac_dir_suffix
24900# for backward compatibility:
24901ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000024902
24903case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024904 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000024905 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024906 ac_top_srcdir=$ac_top_builddir_sub
24907 ac_abs_top_srcdir=$ac_pwd ;;
24908 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000024909 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024910 ac_top_srcdir=$srcdir
24911 ac_abs_top_srcdir=$srcdir ;;
24912 *) # Relative name.
24913 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24914 ac_top_srcdir=$ac_top_build_prefix$srcdir
24915 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024916esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024917ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000024918
Martin v. Löwis11437992002-04-12 09:54:03 +000024919
Martin v. Löwiseba40652007-08-30 20:10:57 +000024920 case $ac_mode in
24921 :F)
24922 #
24923 # CONFIG_FILE
24924 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024925
24926 case $INSTALL in
24927 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024928 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024929 esac
Brett Cannon19fab762007-06-02 03:02:29 +000024930_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024931
24932cat >>$CONFIG_STATUS <<\_ACEOF
24933# If the template does not know about datarootdir, expand it.
24934# FIXME: This hack should be removed a few years after 2.60.
24935ac_datarootdir_hack=; ac_datarootdir_seen=
24936
24937case `sed -n '/datarootdir/ {
24938 p
24939 q
24940}
24941/@datadir@/p
24942/@docdir@/p
24943/@infodir@/p
24944/@localedir@/p
24945/@mandir@/p
24946' $ac_file_inputs` in
24947*datarootdir*) ac_datarootdir_seen=yes;;
24948*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24949 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24950echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24951_ACEOF
24952cat >>$CONFIG_STATUS <<_ACEOF
24953 ac_datarootdir_hack='
24954 s&@datadir@&$datadir&g
24955 s&@docdir@&$docdir&g
24956 s&@infodir@&$infodir&g
24957 s&@localedir@&$localedir&g
24958 s&@mandir@&$mandir&g
24959 s&\\\${datarootdir}&$datarootdir&g' ;;
24960esac
24961_ACEOF
24962
24963# Neutralize VPATH when `$srcdir' = `.'.
24964# Shell code in configure.ac might set extrasub.
24965# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000024966cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024967 sed "$ac_vpsub
24968$extrasub
24969_ACEOF
24970cat >>$CONFIG_STATUS <<\_ACEOF
24971:t
24972/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000024973s&@configure_input@&$configure_input&;t t
24974s&@top_builddir@&$ac_top_builddir_sub&;t t
24975s&@srcdir@&$ac_srcdir&;t t
24976s&@abs_srcdir@&$ac_abs_srcdir&;t t
24977s&@top_srcdir@&$ac_top_srcdir&;t t
24978s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24979s&@builddir@&$ac_builddir&;t t
24980s&@abs_builddir@&$ac_abs_builddir&;t t
24981s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24982s&@INSTALL@&$ac_INSTALL&;t t
24983$ac_datarootdir_hack
24984" $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 +000024985
Martin v. Löwiseba40652007-08-30 20:10:57 +000024986test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24987 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24988 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24989 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24990which seems to be undefined. Please make sure it is defined." >&5
24991echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24992which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024993
Martin v. Löwiseba40652007-08-30 20:10:57 +000024994 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000024995 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024996 -) cat "$tmp/out"; rm -f "$tmp/out";;
24997 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024998 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024999 ;;
25000 :H)
25001 #
25002 # CONFIG_HEADER
25003 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025004_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025005
Martin v. Löwiseba40652007-08-30 20:10:57 +000025006# Transform confdefs.h into a sed script `conftest.defines', that
25007# substitutes the proper values into config.h.in to produce config.h.
25008rm -f conftest.defines conftest.tail
25009# First, append a space to every undef/define line, to ease matching.
25010echo 's/$/ /' >conftest.defines
25011# Then, protect against being on the right side of a sed subst, or in
25012# an unquoted here document, in config.status. If some macros were
25013# called several times there might be several #defines for the same
25014# symbol, which is useless. But do not sort them, since the last
25015# AC_DEFINE must be honored.
25016ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25017# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25018# NAME is the cpp macro being defined, VALUE is the value it is being given.
25019# PARAMS is the parameter list in the macro definition--in most cases, it's
25020# just an empty string.
25021ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25022ac_dB='\\)[ (].*,\\1define\\2'
25023ac_dC=' '
25024ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025025
Martin v. Löwiseba40652007-08-30 20:10:57 +000025026uniq confdefs.h |
25027 sed -n '
25028 t rset
25029 :rset
25030 s/^[ ]*#[ ]*define[ ][ ]*//
25031 t ok
25032 d
25033 :ok
25034 s/[\\&,]/\\&/g
25035 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25036 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25037 ' >>conftest.defines
25038
25039# Remove the space that was appended to ease matching.
25040# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025041# example, in the case of _POSIX_SOURCE, which is predefined and required
25042# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025043# (The regexp can be short, since the line contains either #define or #undef.)
25044echo 's/ $//
25045s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025046
Martin v. Löwiseba40652007-08-30 20:10:57 +000025047# Break up conftest.defines:
25048ac_max_sed_lines=50
25049
25050# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25051# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25052# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25053# et cetera.
25054ac_in='$ac_file_inputs'
25055ac_out='"$tmp/out1"'
25056ac_nxt='"$tmp/out2"'
25057
25058while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025059do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025060 # Write a here document:
25061 cat >>$CONFIG_STATUS <<_ACEOF
25062 # First, check the format of the line:
25063 cat >"\$tmp/defines.sed" <<\\CEOF
25064/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25065/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25066b
25067:def
25068_ACEOF
25069 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025070 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025071 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25072 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25073 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25074 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025075 rm -f conftest.defines
25076 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025077done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025078rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025079
Martin v. Löwiseba40652007-08-30 20:10:57 +000025080echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025081cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025082 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025083 echo "/* $configure_input */" >"$tmp/config.h"
25084 cat "$ac_result" >>"$tmp/config.h"
25085 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025086 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25087echo "$as_me: $ac_file is unchanged" >&6;}
25088 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025089 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025090 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025091 fi
25092 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025093 echo "/* $configure_input */"
25094 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025095 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025096 rm -f "$tmp/out12"
25097 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025098
Martin v. Löwiseba40652007-08-30 20:10:57 +000025099
25100 esac
25101
25102done # for ac_tag
25103
Guido van Rossum627b2d71993-12-24 10:39:16 +000025104
Martin v. Löwis11437992002-04-12 09:54:03 +000025105{ (exit 0); exit 0; }
25106_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025107chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025108ac_clean_files=$ac_clean_files_save
25109
25110
25111# configure is writing to config.log, and then calls config.status.
25112# config.status does its own redirection, appending to config.log.
25113# Unfortunately, on DOS this fails, as config.log is still kept open
25114# by configure, so config.status won't be able to write to it; its
25115# output is simply discarded. So we exec the FD to /dev/null,
25116# effectively closing config.log, so it can be properly (re)opened and
25117# appended to by config.status. When coming back to configure, we
25118# need to make the FD available again.
25119if test "$no_create" != yes; then
25120 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025121 ac_config_status_args=
25122 test "$silent" = yes &&
25123 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025124 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025125 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025126 exec 5>>config.log
25127 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25128 # would make configure fail if this is the last instruction.
25129 $ac_cs_success || { (exit 1); exit 1; }
25130fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025131
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025132
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025133echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025134if test ! -f Modules/Setup
25135then
25136 cp $srcdir/Modules/Setup.dist Modules/Setup
25137fi
25138
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025139echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025140if test ! -f Modules/Setup.local
25141then
25142 echo "# Edit this file for local setup changes" >Modules/Setup.local
25143fi
25144
25145echo "creating Makefile"
25146$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25147 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025148 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025149
25150case $ac_sys_system in
25151BeOS)
25152 { echo "$as_me:$LINENO: WARNING:
25153
25154 Support for BeOS is deprecated as of Python 2.6.
25155 See PEP 11 for the gory details.
25156 " >&5
25157echo "$as_me: WARNING:
25158
25159 Support for BeOS is deprecated as of Python 2.6.
25160 See PEP 11 for the gory details.
25161 " >&2;}
25162 ;;
25163*) ;;
25164esac
25165
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025166mv config.c Modules